Re: Patches for the patchqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2008-06-05 at 15:25 +0530, Aneesh Kumar K.V wrote:
> f) clear the delay bit in ext4_da_get_block_write instead of
> __block_write_full_page
> so that we clear the delay bit for every successfull block allocation.
> We may fail
> while marking inode dirty in ext4_da_get_block_write after allocating
> block. So
> it is better to clear the delay bit in ext4_da_get_block_write rather
> than
> __block_write_full_page
> 

> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
> ---

> @@ -1555,7 +1565,15 @@ static int ext4_da_get_block_write(struct inode
> *inode, sector_t iblock,
>                 bh_result->b_size = (ret << inode->i_blkbits);
> 
>                 /* release reserved-but-unused meta blocks */
> -               ext4_da_release_space(inode, ret, 0);
> +               if (buffer_delay(bh_result)) {
> +                       ext4_da_release_space(inode, ret, 0);
> +                       /*
> +                        * clear the delay bit now that we allocated
> +                        * blocks. If it is not a single block request
> +                        * we clear the delay bit in
> mpage_put_bnr_to_bhs
> +                        */
> +                       clear_buffer_delay(bh_result);
> +               }
> 
>                 /*
>                  * Update on-disk size along with block allocation

It seems with this fix, the buffer_delay bit is still cleared before the
ext4_mark_inode_dirty() could return error? Actually the already
allocated blocks are leaked if mark_inode-dirty() returns error, and we
cleared the buffer_delay for the buffer needs block.

Mingming

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux