aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-06-03 11:39:42 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-06-04 05:41:38 -0400
commitb6fe5873cb422417ae3fc914954bc5a10fd4e003 (patch)
treed9e958f62b4ed402a1b10e2592453320c6ff1447 /fs/f2fs/data.c
parent1dbe4152168d44fa164edbdc9f1243de70b98f7a (diff)
f2fs: fix to recover data written by dio
If data are overwritten through dio, previous f2fs doesn't remain the fsync mark due to no additional node writes. Note that this patch should resolve the xfstests:311. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 8c250a5d6f26..39fe7d70791a 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1041,6 +1041,9 @@ static ssize_t f2fs_direct_IO(int rw, struct kiocb *iocb,
1041 if (check_direct_IO(inode, rw, iov, offset, nr_segs)) 1041 if (check_direct_IO(inode, rw, iov, offset, nr_segs))
1042 return 0; 1042 return 0;
1043 1043
1044 /* clear fsync mark to recover these blocks */
1045 fsync_mark_clear(F2FS_SB(inode->i_sb), inode->i_ino);
1046
1044 return blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, 1047 return blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
1045 get_data_block); 1048 get_data_block);
1046} 1049}