lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 Sep 2006 18:25:58 +0100
From:	Roger Gammans <roger@...puter-surgery.co.uk>
To:	Randy Dunlap <rdunlap@...otime.net>
Cc:	Zach Brown <zab@...bo.net>,
	Roger Gammans <roger@...puter-surgery.co.uk>,
	lkml <linux-kernel@...r.kernel.org>, axboe@...nel.dk
Subject: Re: fs/bio.c - Hardcoded sector size ?

On Fri, Sep 29, 2006 at 01:32:05PM -0700, Randy Dunlap wrote:
> > How about adding kerneldoc for sector_t itself?
> 
> Good idea, but afaik it would have to be added for the entire
> struct, not just one field.

sector_t 's a simple typedef from unsigned long or u64 depending on
config rather than a struct - will kerneldoc still pick up the comments
on theese?

Assuming it will I suggest the following. I've kept my shorter text in
the bi_sector field as it is now more fully explained with sector_t.


Signed-Off-By: Roger Gammans <rgammans@...puter-surgery.co.uk>

diff --git a/include/linux/bio.h b/include/linux/bio.h
index 76bdaea..77a8e6b 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -70,7 +70,8 @@ typedef void (bio_destructor_t) (struct
  * stacking drivers)
  */
 struct bio {
-       sector_t                bi_sector;
+       sector_t                bi_sector;      /* device address in 512 byte
+                                                  sectors */
        struct bio              *bi_next;       /* request queue link */
        struct block_device     *bi_bdev;
        unsigned long           bi_flags;       /* status, command, etc
*/
diff --git a/include/linux/types.h b/include/linux/types.h
index 3f23566..0ddfa1a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -127,8 +127,12 @@ #endif
 /* this is a special 64bit data type that is 8-byte aligned */
 #define aligned_u64 unsigned long long __attribute__((aligned(8)))

-/*
+/**
  * The type used for indexing onto a disc or disc partition.
+ *
+ * Linux always considers sectors to be 512 bytes long independently
+ * of the devices real block size.
+ *
  * If required, asm/types.h can override it and define
  * HAVE_SECTOR_T
  */


-- 
Roger.                          Home| http://www.sandman.uklinux.net/
Master of Peng Shui.      (Ancient oriental art of Penguin Arranging)
Work|Independent Sys Consultant | http://www.computer-surgery.co.uk/
So what are the eigenvalues and eigenvectors of 'The Matrix'? --anon

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ