Message ID | 1226050948-32221-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com |
---|---|
State | Accepted, archived |
Headers | show |
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@linux.vnet.ibm.com> > --- > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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))
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@linux.vnet.ibm.com> --- fs/ext4/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)