kernel-ark/fs/f2fs
Jaegeuk Kim 8ef2af45ae f2fs: increase i_size to avoid missing data
When finsert is doing with dirting pages, we should increase i_size right away.
Otherwise, the moved page is able to be dropped by the following
filemap_write_and_wait_range before updating i_size.
Especially, it can be done by
	if ((page->index >= end_index + 1) || !offset)
		goto out;
in f2fs_write_data_page.

This should resolve the below xfstests/091 failure reported by Dave.

$ diff -u tests/generic/091.out /home/dave/src/xfstests-dev/results//f2fs/generic/091.out.bad
--- tests/generic/091.out       2014-01-20 16:57:33.000000000 +1100
+++ /home/dave/src/xfstests-dev/results//f2fs/generic/091.out.bad       2016-02-08 15:21:02.701375087 +1100
@@ -1,7 +1,18 @@
 QA output created by 091
 fsx -N 10000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
-fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
-fsx -N 10000 -o 32768 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
-fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
-fsx -N 10000 -o 32768 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
-fsx -N 10000 -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -W
+mapped writes DISABLED
+skipping insert range behind EOF
+skipping insert range behind EOF
+truncating to largest ever: 0x11e00
+dowrite: write: Invalid argument
+LOG DUMP (7 total operations):
+1(  1 mod 256): SKIPPED (no operation)
+2(  2 mod 256): SKIPPED (no operation)
+3(  3 mod 256): FALLOC   0x2e0f2 thru 0x3134a  (0x3258 bytes) PAST_EOF
+4(  4 mod 256): SKIPPED (no operation)
+5(  5 mod 256): SKIPPED (no operation)
+6(  6 mod 256): TRUNCATE UP    from 0x0 to 0x11e00
+7(  7 mod 256): WRITE    0x73400 thru 0x79fff  (0x6c00 bytes) HOLE
+Log of operations saved to "/mnt/test/junk.fsxops"; replay with --replay-ops
+Correct content saved for comparison
+(maybe hexdump "/mnt/test/junk" vs "/mnt/test/junk.fsxgood")

Reported-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 16:07:23 -08:00
..
acl.c f2fs: make posix_acl_create() safer and cleaner 2015-05-07 11:38:31 -07:00
acl.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
checkpoint.c f2fs: fix missing skip pages info 2016-02-22 16:07:23 -08:00
crypto_fname.c f2fs crypto: clean up error handling in f2fs_fname_setup_filename 2015-06-01 16:21:08 -07:00
crypto_key.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
crypto_policy.c f2fs crypto: do not set encryption policy for non-directory by ioctl 2015-06-01 16:21:07 -07:00
crypto.c f2fs crypto: add alloc_bounce_page 2015-06-11 15:04:20 -07:00
data.c f2fs: preallocate blocks for buffered aio writes 2016-02-22 16:07:23 -08:00
debug.c Merge tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs 2016-01-13 21:01:44 -08:00
dir.c f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
extent_cache.c f2fs: remove unneeded pointer conversion 2016-02-22 16:07:23 -08:00
f2fs_crypto.h f2fs crypto: remove alloc_page for bounce_page 2015-06-01 16:21:10 -07:00
f2fs.h f2fs: preallocate blocks for buffered aio writes 2016-02-22 16:07:23 -08:00
file.c f2fs: increase i_size to avoid missing data 2016-02-22 16:07:23 -08:00
gc.c f2fs: remove unneeded pointer conversion 2016-02-22 16:07:23 -08:00
gc.h f2fs: detect idle time depending on user behavior 2016-01-11 15:56:37 -08:00
hash.c f2fs: introduce dot and dotdot name check 2015-05-28 15:41:34 -07:00
inline.c f2fs: delete unnecessary wait for page writeback 2016-02-22 16:07:23 -08:00
inode.c f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
Kconfig f2fs: fix typo 2015-08-21 22:43:32 -07:00
Makefile f2fs: maintain extent cache in separated file 2015-08-04 14:09:58 -07:00
namei.c Merge tag 'for-f2fs-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs 2016-01-13 21:01:44 -08:00
node.c f2fs: fix missing skip pages info 2016-02-22 16:07:23 -08:00
node.h f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
recovery.c f2fs: remove unneeded pointer conversion 2016-02-22 16:07:23 -08:00
segment.c f2fs: introduce f2fs_submit_merged_bio_cond 2016-02-22 16:07:23 -08:00
segment.h f2fs: fix conflict on page->private usage 2016-02-22 16:07:23 -08:00
shrinker.c f2fs: speed up shrinking extent tree entries 2015-12-30 10:13:00 -08:00
super.c f2fs: flush bios to handle cp_error in put_super 2016-02-22 16:07:23 -08:00
trace.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
trace.h f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
xattr.c f2fs: use wait_for_stable_page to avoid contention 2016-02-22 16:07:23 -08:00
xattr.h vfs: Distinguish between full xattr names and proper prefixes 2015-12-06 21:33:52 -05:00