Re: [PATCH 2/2] ext4: Mark the buffer_heads as dirty and uptodate after prepare_write

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

 



On Fri, Nov 07, 2008 at 03:12:28PM +0530, Aneesh Kumar K.V wrote:
> We need to make sure we mark the buffer_heads as dirty and uptodate
> so that block_write_full_page write them correctly.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
> ---
>  fs/ext4/inode.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 95d0d12..d986018 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2351,6 +2351,8 @@ static int ext4_da_writepage(struct page *page,
>  			unlock_page(page);
>  			return 0;
>  		}
> +		/* now mark the buffer_heads as dirty and uptodate */
> +		block_commit_write(page, 0, PAGE_CACHE_SIZE);
>  	}
> 
>  	if (test_opt(inode->i_sb, NOBH) && ext4_should_writeback_data(inode))


With this patch i am able to run the mmap program from Linus without
errors. Can you test the changes with rtorrent and see if the change
fixes the file corruption ?

-aneesh
--
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