mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Gammans <roger@computer-surgery.co.uk>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: Zach Brown <zab@zabbo.net>,
	Roger Gammans <roger@computer-surgery.co.uk>,
	lkml <linux-kernel@vger.kernel.org>,
	axboe@kernel.dk
Subject: Re: fs/bio.c - Hardcoded sector size ?
Date: Fri, 29 Sep 2006 18:25:58 +0100	[thread overview]
Message-ID: <20060929172558.GB4478@julia.computer-surgery.co.uk> (raw)
In-Reply-To: <20060929133205.19c318cb.rdunlap@xenotime.net>

[-- Attachment #1: Type: text/plain, Size: 2089 bytes --]

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@computer-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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-09-30 17:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28 18:22 Roger Gammans
2006-09-29 18:38 ` Randy Dunlap
2006-09-28 18:58   ` linux-kernel-owner
2006-09-29 19:11     ` Randy Dunlap
2006-09-28 19:19       ` Roger Gammans
2006-09-29 19:37         ` Randy Dunlap
2006-09-28 19:56           ` Roger Gammans
2006-09-29 20:17             ` Randy Dunlap
2006-09-29 20:22               ` Zach Brown
2006-09-29 20:32                 ` Randy Dunlap
2006-09-29 17:25                   ` Roger Gammans [this message]
2006-09-30 19:31                     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060929172558.GB4478@julia.computer-surgery.co.uk \
    --to=roger@computer-surgery.co.uk \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=zab@zabbo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®