From: Andrew Morton <akpm@osdl.org>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] pass b_size to ->get_block()
Date: Wed, 1 Mar 2006 17:52:18 -0800 [thread overview]
Message-ID: <20060301175218.6360cf7f.akpm@osdl.org> (raw)
In-Reply-To: <1141075413.10542.23.camel@dyn9047017100.beaverton.ibm.com>
Badari Pulavarty <pbadari@us.ibm.com> wrote:
>
> Pass amount of disk needs to be mapped to get_block().
> This way one can modify the fs ->get_block() functions
> to map multiple blocks at the same time.
I can't say I terribly like this patch. Initialising b_size all over the
place seems fragile.
We're _already_ setting bh.b_size to the right thing in
alloc_page_buffers(), and for a bh which is attached to
pagecache_page->private, there's no reason why b_size would ever change.
So what I think I'll do is to convert those places where you're needlessly
assigning to b_size into temporary WARN_ON(b_size != blocksize).
The only place where we need to initialise b_size is where we've got a
non-pagecache bh allocated on the stack.
We need to be sure that no ->get_block() implementations write garbage into
bh->b_size if something goes wrong. b_size on a pagecache-based
buffer_head must remain inviolate.
next prev parent reply other threads:[~2006-03-02 1:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 21:20 [PATCH 0/4] map multiple blocks in get_block() and mpage_readpages() Badari Pulavarty
2006-02-27 21:22 ` [PATCH 1/4] change buffer_head.b_size to size_t Badari Pulavarty
2006-03-02 1:51 ` Andrew Morton
2006-03-02 1:51 ` Andrew Morton
2006-03-02 2:22 ` Nathan Scott
2006-03-02 2:56 ` Andrew Morton
2006-03-06 19:54 ` Tim Pepper
2006-02-27 21:23 ` [PATCH 2/4] pass b_size to ->get_block() Badari Pulavarty
2006-03-02 1:52 ` Andrew Morton [this message]
2006-03-03 17:17 ` Badari Pulavarty
2006-02-27 21:24 ` [PATCH 3/4] map multiple blocks for mpage_readpages() Badari Pulavarty
2006-03-02 4:45 ` Andrew Morton
2006-03-03 16:51 ` Badari Pulavarty
2006-02-27 21:24 ` [PATCH 4/4] remove ->get_blocks() support Badari Pulavarty
2006-03-02 1:52 ` [PATCH 0/4] map multiple blocks in get_block() and mpage_readpages() Andrew Morton
2006-03-03 17:05 ` Badari Pulavarty
2006-03-03 20:32 ` Andrew Morton
2006-03-03 21:54 ` Badari Pulavarty
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=20060301175218.6360cf7f.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@us.ibm.com \
/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