[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1212385116.4368.90.camel@localhost.localdomain>
Date: Sun, 01 Jun 2008 22:38:35 -0700
From: Mingming Cao <cmm@...ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc: jack@...e.cz, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: Need clear buffer_delay after page writeout for
delayed allocation
On Mon, 2008-06-02 at 09:39 +0530, Aneesh Kumar K.V wrote:
> On Sun, Jun 01, 2008 at 08:50:32PM -0700, Mingming Cao wrote:
> > On Mon, 2008-06-02 at 08:44 +0530, Aneesh Kumar K.V wrote:
> > > On Sun, Jun 01, 2008 at 02:10:02PM -0700, Mingming Cao wrote:
> > > > ext4: Need clear buffer_delay after page writeout for delayed allocation
> > > >
> > > > From: Mingming Cao <cmm@...ibm.com>
> > > >
> > > > Need clear buffer_delay in ext4_da_writepage() after page has been writeout
> > > >
> > > > Signed-off-by: Mingming Cao <cmm@...ibm.com>
> > > >
> > > > ---
> > >
> > > We do that in mpage_put_bnr_to_bhs.
> > >
> > Normally delayed buffer could be cleared in that case, but if allocation
> > failed in __mapge_da_writepages(), it will keep buffer_delay marked and
> > deferring to later ext4_da_writepage() to do block allocation. This
> > patch handles clear bh delay bit in this case.
> >
>
> Why not do it in ext4_da_get_block_write then.
The buffer head passed to ext4_da_get_block_write() calling from
mpage_da_map_blocks is a dummy one, to store the allocated extent, not
the bh that need map.
> The reason being
> block_write_full_page can return an error even though we have some of
> the blocks allocated. With 1K block size we could allocate 3 blocks and
> fail for the last block in that case with the above patch we don't
> clear the delay bit of the buffer head of all the blocks allocated.
>
It only clear the delayed bits if block_write_full_page() returns
successfully. But that reminds me to do some block reservation handling
for the error case.
> -aneesh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists