From: Andrew Morton <akpm@osdl.org>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: adilger@clusterfs.com, torvalds@osdl.org, aia21@cam.ac.uk,
ext2-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
sct@redhat.com
Subject: Re: [PATCH] sector_t overflow in block layer
Date: Fri, 19 May 2006 13:11:30 -0700 [thread overview]
Message-ID: <20060519131130.71c390d9.akpm@osdl.org> (raw)
In-Reply-To: <1148067412.5156.65.camel@sisko.sctweedie.blueyonder.co.uk>
"Stephen C. Tweedie" <sct@redhat.com> wrote:
>
> Hi,
>
> On Thu, 2006-05-18 at 17:23 -0600, Andreas Dilger wrote:
>
> > I looked at that also, but it isn't clear from the use of "b_size" here
> > that there is any constraint that b_size is a power of two, only that it
> > is a multiple of 512. Granted, I don't know whether there are any users
> > of such a crazy thing, but the fact that this is in bytes instead of a
> > shift made me think twice.
>
> Yeah. It was very strongly constrained to a power-of-two in the dim and
> distant past, when buffer_heads were only ever used for true buffer-
> cache data (the entire IO path had to be special-cased for IO that
> wasn't from the buffer cache, such as swap IO.)
>
> But more recently it has been a lot more relaxed, and we've had patches
> like Jens' "varyIO" patches on 2.4 which routinely generated odd-sized
> b_size buffer_heads when doing raw/direct IO on unaligned disk offsets.
>
> But in 2.6, I _think_ such paths should be going straight to bio, not
> via submit_bh. Direct IO certainly doesn't use bh's any more, and
> pretty much any other normal disk IO paths are page-aligned. I might be
> missing something, though.
>
We use various values of b_size when using a buffer_head for gathering a
disk mapping. See, for example, fs/direct-io.c:get_more_blocks().
I don't think we ever play such tricks when a bh is used as an IO
container. But we might - I see nothing in submit_bh() which would prevent
it.
btw, it seems odd to me that we're trying to handle the
device-too-large-for-sector_t problem at the submit_bh() level. What
happens if someone uses submit_bio()? Isn't it something we can check at
mount time, or partition parsing, or...?
next prev parent reply other threads:[~2006-05-19 20:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1147849273.16827.27.camel@localhost.localdomain>
[not found] ` <m3odxxukcp.fsf@bzzz.home.net>
[not found] ` <1147884610.16827.44.camel@localhost.localdomain>
[not found] ` <m34pzo36d4.fsf@bzzz.home.net>
[not found] ` <1147888715.12067.38.camel@dyn9047017100.beaverton.ibm.com>
[not found] ` <m364k4zfor.fsf@bzzz.home.net>
[not found] ` <20060517235804.GA5731@schatzie.adilger.int>
[not found] ` <1147947803.5464.19.camel@sisko.sctweedie.blueyonder.co.uk>
2006-05-18 18:59 ` Andreas Dilger
2006-05-18 20:58 ` Alexey Dobriyan
2006-05-18 21:06 ` Linus Torvalds
2006-05-18 22:12 ` Anton Altaparmakov
2006-05-18 22:41 ` Linus Torvalds
2006-05-18 23:23 ` Andreas Dilger
2006-05-19 19:36 ` Stephen C. Tweedie
2006-05-19 20:11 ` Andrew Morton [this message]
2006-05-19 20:55 ` Andreas Dilger
2006-05-19 21:15 ` Andrew Morton
2006-05-19 21:05 ` Stephen C. Tweedie
2006-05-18 22:43 ` Andreas Dilger
2006-05-22 0:14 ` Pavel Machek
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=20060519131130.71c390d9.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=adilger@clusterfs.com \
--cc=aia21@cam.ac.uk \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sct@redhat.com \
--cc=torvalds@osdl.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®