* xfstests/091 failures
@ 2016-02-08 4:58 Dave Chinner
2016-02-09 1:23 ` Jaegeuk Kim
0 siblings, 1 reply; 2+ messages in thread
From: Dave Chinner @ 2016-02-08 4:58 UTC (permalink / raw)
To: linux-f2fs-devel
Hi f2fs folks,
When I run xfstests on f2fs, i see several tests failing reliably.
I'm running on a ramdisk with a sector size of 4k. The first test to
fail is generic/091, and it fails pretty quickly:
$ 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")
It looks like the first write() call is failing with -EINVAL, which
seems like a bug. Tests generic/114, generic/240 and generic/263
also all fail with unexpected EINVAL errors to read/write calls.
generic/102 fails with a short write, which may or may not be the
same problem....
>From a quick look, it seems that the issue is that EINVAL is being
returned when non-aligned IO are being done, probably direct IO.
These tests pass just fine on the same block device using XFS, so
I suspect there's a logical vs physical sector size detection
problem somewhere in the f2fs code...
FWIW, a ramdisk on x86-64 has the following capabilities:
# blockdev --report /dev/ram0
RO RA SSZ BSZ StartSec Size Device
rw 256 512 4096 0 4096000000 /dev/ram0
# blkid -i /dev/ram0
DEVNAME=/dev/ram0
MINIMUM_IO_SIZE=4096
PHYSICAL_SECTOR_SIZE=4096
LOGICAL_SECTOR_SIZE=512
#
which says it can do 512 byte IOs even though the physical sector
size is 4k. i.e. it can emulate 512 byte sector devices correctly.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: xfstests/091 failures
2016-02-08 4:58 xfstests/091 failures Dave Chinner
@ 2016-02-09 1:23 ` Jaegeuk Kim
0 siblings, 0 replies; 2+ messages in thread
From: Jaegeuk Kim @ 2016-02-09 1:23 UTC (permalink / raw)
To: Dave Chinner; +Cc: linux-f2fs-devel
Hi Dave,
Thank you for the report.
I've figured out that there is a bug in f2fs_insert_range, which dropps a dirty
data page when flushing blocks after finsert is done.
That is caused by not updating i_size instantly.
I wrote a patch for this like below.
Thanks,
>From 108daea1bd02014d118aa1dbc83553671f6848e9 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Mon, 8 Feb 2016 14:17:38 -0800
Subject: [PATCH] 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>
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 9e210b5..a4362d4 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -891,7 +891,7 @@ static int __exchange_data_block(struct inode *inode, pgoff_t src,
psrc = get_lock_data_page(inode, src, true);
if (IS_ERR(psrc))
return PTR_ERR(psrc);
- pdst = get_new_data_page(inode, NULL, dst, false);
+ pdst = get_new_data_page(inode, NULL, dst, true);
if (IS_ERR(pdst)) {
f2fs_put_page(psrc, 1);
return PTR_ERR(pdst);
--
2.6.3
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-09 1:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 4:58 xfstests/091 failures Dave Chinner
2016-02-09 1:23 ` Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).