From: Fawad Lateef <fawadlateef@gmail.com>
To: Block Device <blockdevice@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Block I/O sizes
Date: Tue, 25 Oct 2005 15:15:07 +0500 [thread overview]
Message-ID: <1e62d1370510250315n690e3455j13f2e1651476d784@mail.gmail.com> (raw)
In-Reply-To: <64c763540510250243v64c0c22bt4a6e57bb5490fb77@mail.gmail.com>
On 10/25/05, Block Device <blockdevice@gmail.com> wrote:
> When any fs i/o is done, the bi_sector value is in terms of fs
> block size and not sector size (for the block device). When i perform
> raw i/o to the device ( dd for eg ), bi_sector is in terms of sectors
> and not fs blocks.
>
> In both the cases though, bio_sectors(bio) returns the amount of
> data written in sectors.
>
> To me this is rather strange. Should it not be in terms of sector size always ?
> Can someone please explain ?
>
bio_sectors is a macro which calculates nr_sectors from the bi_size
field, and as far as bi_sector is concerned, I always considered and
used as a sector (in terms of sector size) in my block-device drivers
whether the user is performing dd or anything else. And you can also
see ll_rw_blk.c in function __make_request its considering
bio->bi_sector as sector like this:
sector_t sector;
sector = bio->bi_sector;
nr_sectors = bio_sectors(bio);
So, I don't think bi_sector in some case contains block_nr or
sector_nr, rather it always keeps sector_nr (CMIIW)
And __please__ change your name from Block Device to your real name,
its annoying to see Block Device as a name of a person. :(
--
Fawad Lateef
next prev parent reply other threads:[~2005-10-25 10:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-25 9:43 Block Device
2005-10-25 10:15 ` Fawad Lateef [this message]
[not found] ` <64c763540510250521yf5e1ac3g221f42ed658d1bf0@mail.gmail.com>
2005-10-25 14:12 ` Fawad Lateef
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=1e62d1370510250315n690e3455j13f2e1651476d784@mail.gmail.com \
--to=fawadlateef@gmail.com \
--cc=blockdevice@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®