public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: call mark_inode_dirty when i_size is updated
@ 2009-02-02 11:00 Hisashi Hifumi
  2009-02-02 14:12 ` Chris Mason
  0 siblings, 1 reply; 6+ messages in thread
From: Hisashi Hifumi @ 2009-02-02 11:00 UTC (permalink / raw)
  To: chris.mason, linux-btrfs

Hi Chris.

I think it is needed to call mark_inode_dirty() when file size expands
in order to flush metadata updates to HDD through sync() syscall or
background_writeout().

Thanks.

Signed-off-by: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>

diff -Nrup linux-2.6.29-rc3.org/fs/btrfs/file.c linux-2.6.29-rc3/fs/btrfs/file.c
--- linux-2.6.29-rc3.org/fs/btrfs/file.c	2009-02-02 16:53:18.000000000 +0900
+++ linux-2.6.29-rc3/fs/btrfs/file.c	2009-02-02 18:21:00.000000000 +0900
@@ -152,7 +152,7 @@ static noinline int dirty_and_release_pa
 	}
 	if (end_pos > isize) {
 		i_size_write(inode, end_pos);
-		btrfs_update_inode(trans, root, inode);
+		mark_inode_dirty(inode);
 	}
 	err = btrfs_end_transaction(trans, root);
 out_unlock:


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-03 16:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-02 11:00 [PATCH] btrfs: call mark_inode_dirty when i_size is updated Hisashi Hifumi
2009-02-02 14:12 ` Chris Mason
2009-02-03  0:36   ` Hisashi Hifumi
2009-02-03  1:04     ` Chris Mason
2009-02-03  2:43       ` Hisashi Hifumi
2009-02-03 16:22         ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox