From: Mingming Cao <cmm@us.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: tytso@mit.edu, sandeen@redhat.com, Solofo.Ramangalahy@bull.net,
dmonakhov@openvz.org, linux-ext4@vger.kernel.org
Subject: Re: [RFC PATCH] ext4: Return unwritten buffer head when trying to read from prealloc space.
Date: Mon, 24 Mar 2008 09:04:23 -0700 [thread overview]
Message-ID: <1206374663.3606.2.camel@localhost.localdomain> (raw)
In-Reply-To: <20080324081141.GA6581@skywalker>
On Mon, 2008-03-24 at 13:41 +0530, Aneesh Kumar K.V wrote:
> On Fri, Mar 21, 2008 at 03:13:58PM -0700, Mingming Cao wrote:
> > On Fri, 2008-03-21 at 11:48 +0530, Aneesh Kumar K.V wrote:
> > > ext4_ext_get_blocks returns number of blocks allocated with buffer head
> > > unmapped for a read from prealloc space. This is needed so that delayed
> > > allocation doesn't do block reservation for prealloc space since the blocks
> > > are already resevred on disk. Fix ext4_ext_get_blocks to not return greater
> > > than max_blocks and also mark the buffer head unwritten. Some code path tries
> > > to read the block if buffer_head is not new and no uptodate. Marking the buffer
> > > head unwritten avoid this reading.
> > >
> >
> > Seems this patch fixes two bugs together, it would be nice to split to
> > two as they cause two different problems.
>
> Split patches here.
>
> http://www.radian.org/~kvaneesh/ext4/patches-to-patchqueue/
>
I will pick them up in patch queue.
> >
> > To fix the bh->b_size warning solof founds for delayed allocation, I
> > would say we need to fix it in ext4_get_blocks_handle() (for indirect
> > files) and ext4_ext_get_blocks()(for extent files) both, not allowing
> > returning b_size greater than what the caller asking for. Also, the
> > patch below seems only address the preallocation map case, we need to
> > fix in in general block lookup case.
> >
>
> ext4_ext_get_blocks already make sure we doesn't return > max_blocks.
> for normal allocation.
>
> 2694 out:
> 2695 if (allocated > max_blocks)
> 2696 allocated = max_blocks;
>
Oh I see, I missed that.
Regards,
Mingming
>
> -aneesh
next prev parent reply other threads:[~2008-03-24 16:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-21 6:18 [RFC PATCH] ext4: Update i_diskzie during writepage for delayed allocation Aneesh Kumar K.V
2008-03-21 6:18 ` [RFC PATCH] ext4: Return unwritten buffer head when trying to read from prealloc space Aneesh Kumar K.V
2008-03-21 22:13 ` Mingming Cao
2008-03-24 8:11 ` Aneesh Kumar K.V
2008-03-24 16:04 ` Mingming Cao [this message]
2008-03-21 22:08 ` [RFC PATCH] ext4: Update i_diskzie during writepage for delayed allocation Mingming Cao
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=1206374663.3606.2.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=Solofo.Ramangalahy@bull.net \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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