Filipe Manana
1bea79d6c1
generic: fsync files with multiple links
...
Test that when we have a file with multiple hard links belonging to
different parent directories, if we remove one of those links, fsync the
file using one of its other links (that has a parent directory different
from the one we removed a link from), power fail and then replay the
fsync log/journal, the hard link we removed is not available anymore and
all the filesystem metadata is in a consistent state.
This test is motivated by an issue found in btrfs, where the test fails
with:
generic/107 2s ... - output mismatch (see .../results/generic/107.out.bad)
--- tests/generic/107.out 2015-08-04 09:47:46.922131256 +0100
+++ /home/fdmanana/git/hub/xfstests/results//generic/107.out.bad
@@ -1,3 +1,5 @@
QA output created by 107
Entries in testdir:
foo2
+foo3
+rmdir: failed to remove '/home/fdmanana/btrfs-tests/scratch_1/testdir': Directory not empty
...
(Run 'diff -u tests/generic/107.out .../generic/107.out.bad' to see the entire diff)
_check_btrfs_filesystem: filesystem on /dev/sdc is inconsistent (see .../generic/107.full)
_check_dmesg: something found in dmesg (see .../generic/107.dmesg)
$ cat /home/fdmanana/git/hub/xfstests/results//generic/107.full
_check_btrfs_filesystem: filesystem on /dev/sdc is inconsistent
*** fsck.btrfs output ***
checking extents
checking free space cache
checking fs roots
root 5 inode 257 errors 200, dir isize wrong
unresolved ref dir 257 index 3 namelen 4 name foo3 filetype 1 \
errors 5, no dir item, no inode ref
$ cat /home/fdmanana/git/hub/xfstests/results//generic/107.dmesg
(...)
[188897.707311] BTRFS info (device dm-0): failed to delete reference to \
foo3, inode 258 parent 257
[188897.711345] ------------[ cut here ]------------
[188897.713369] WARNING: CPU: 10 PID: 19452 at fs/btrfs/inode.c:3956 \
__btrfs_unlink_inode+0x182/0x35a [btrfs]()
[188897.717661] BTRFS: Transaction aborted (error -2)
(...)
[188897.747898] Call Trace:
[188897.748519] [<ffffffff8145f077>] dump_stack+0x4f/0x7b
[188897.749602] [<ffffffff81095de5>] ? console_unlock+0x356/0x3a2
[188897.750682] [<ffffffff8104b3b0>] warn_slowpath_common+0xa1/0xbb
[188897.751936] [<ffffffffa04c5d09>] ? __btrfs_unlink_inode+0x182/0x35a [btrfs]
[188897.753485] [<ffffffff8104b410>] warn_slowpath_fmt+0x46/0x48
[188897.754781] [<ffffffffa04c5d09>] __btrfs_unlink_inode+0x182/0x35a [btrfs]
[188897.756295] [<ffffffffa04c6e8f>] btrfs_unlink_inode+0x1e/0x40 [btrfs]
[188897.757692] [<ffffffffa04c6f11>] btrfs_unlink+0x60/0x9b [btrfs]
[188897.758978] [<ffffffff8116fb48>] vfs_unlink+0x9c/0xed
[188897.760151] [<ffffffff81173481>] do_unlinkat+0x12b/0x1fb
[188897.761354] [<ffffffff81253855>] ? lockdep_sys_exit_thunk+0x12/0x14
[188897.762692] [<ffffffff81174056>] SyS_unlinkat+0x29/0x2b
[188897.763741] [<ffffffff81465197>] system_call_fastpath+0x12/0x6f
[188897.764894] ---[ end trace bbfddacb7aaada8c ]---
[188897.765801] BTRFS warning (device dm-0): __btrfs_unlink_inode:3956: \
Aborting unused transaction(No such entry).
Tested against ext3/4, xfs, reiserfs and f2fs too, and all these
filesystems currently pass this test (on a 4.1 linux kernel at least).
The btrfs issue is fixed by the linux kernel patch titled:
"Btrfs: fix stale dir entries after removing a link and fsync".
Signed-off-by: Filipe Manana <fdmanana@suse.com >
Reviewed-by: Eryu Guan <eguan@redhat.com >
Signed-off-by: Dave Chinner <david@fromorbit.com >
2015-09-21 11:04:25 +10:00
..
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-11-10 18:06:23 +11:00
2014-02-19 08:26:56 +11:00
2014-08-13 11:08:41 +10:00
2014-04-14 10:37:33 +10:00
2014-09-08 22:26:52 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2014-03-13 15:19:03 +11:00
2014-08-13 11:08:41 +10:00
2014-04-04 17:17:21 +11:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2014-04-04 17:18:43 +11:00
2014-09-08 22:26:52 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2014-04-04 17:18:43 +11:00
2014-10-14 17:40:32 +11:00
2014-10-14 17:40:32 +11:00
2015-05-26 12:50:53 +10:00
2014-04-04 17:18:43 +11:00
2015-08-04 14:10:49 +10:00
2014-04-04 17:18:43 +11:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2014-04-04 17:18:43 +11:00
2014-08-13 11:08:41 +10:00
2014-04-11 10:18:20 +10:00
2014-09-08 22:26:52 +10:00
2014-04-14 10:35:27 +10:00
2014-09-08 22:26:52 +10:00
2014-04-14 11:19:23 +10:00
2014-09-08 22:26:52 +10:00
2014-04-14 10:37:32 +10:00
2014-08-13 11:08:41 +10:00
2014-04-28 10:55:12 +10:00
2015-03-18 14:57:49 +11:00
2014-05-27 12:07:17 +10:00
2014-08-13 11:08:41 +10:00
2014-06-18 09:31:38 +10:00
2014-12-12 11:26:15 +11:00
2014-09-29 12:56:48 +10:00
2014-12-12 11:26:15 +11:00
2014-09-29 12:57:37 +10:00
2014-12-12 11:26:15 +11:00
2014-09-29 12:58:24 +10:00
2014-12-12 11:26:15 +11:00
2014-09-29 13:10:05 +10:00
2014-12-12 11:26:15 +11:00
2014-09-29 13:10:25 +10:00
2015-02-25 15:36:52 +11:00
2014-09-29 13:26:32 +10:00
2014-10-14 17:40:34 +11:00
2014-10-14 17:40:34 +11:00
2014-11-10 18:06:19 +11:00
2014-11-10 18:06:19 +11:00
2014-11-10 18:06:23 +11:00
2014-11-10 18:06:23 +11:00
2015-09-21 11:03:22 +10:00
2014-12-12 11:07:22 +11:00
2015-05-04 22:56:13 +10:00
2015-01-21 15:58:23 +11:00
2015-02-25 15:36:52 +11:00
2015-01-21 16:00:01 +11:00
2015-02-25 15:36:52 +11:00
2015-01-21 16:01:25 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:20:27 +11:00
2015-02-12 14:22:59 +11:00
2015-02-12 14:22:59 +11:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2015-02-12 14:22:59 +11:00
2015-02-12 14:22:59 +11:00
2015-02-12 14:22:59 +11:00
2015-02-12 14:22:59 +11:00
2015-02-25 15:36:52 +11:00
2015-02-16 10:13:27 +11:00
2015-02-25 15:36:52 +11:00
2015-02-16 10:14:15 +11:00
2015-02-25 15:32:47 +11:00
2015-02-25 15:32:47 +11:00
2015-05-04 22:56:13 +10:00
2015-02-16 11:36:12 +11:00
2015-02-25 15:33:06 +11:00
2015-02-25 15:33:06 +11:00
2015-02-25 15:33:19 +11:00
2015-02-25 15:33:19 +11:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2015-02-25 15:33:55 +11:00
2015-02-25 15:33:55 +11:00
2015-02-25 15:34:21 +11:00
2015-02-25 15:34:21 +11:00
2015-03-18 14:56:40 +11:00
2015-03-18 14:56:40 +11:00
2015-02-25 15:38:26 +11:00
2015-02-25 15:38:26 +11:00
2015-04-01 11:27:33 +11:00
2015-04-01 11:27:33 +11:00
2014-08-13 11:01:04 +10:00
2013-03-26 11:43:49 -05:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2015-03-18 14:58:51 +11:00
2015-03-18 14:58:51 +11:00
2015-04-01 11:29:56 +11:00
2015-04-01 11:29:56 +11:00
2015-04-01 11:31:03 +11:00
2015-04-01 11:31:03 +11:00
2014-09-29 12:56:16 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2015-05-14 20:27:53 +10:00
2013-03-26 11:43:49 -05:00
2015-04-01 11:29:16 +11:00
2013-03-26 11:43:49 -05:00
2015-03-18 14:55:21 +11:00
2015-03-18 14:55:21 +11:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2015-04-01 15:39:36 +11:00
2015-04-01 15:39:36 +11:00
2015-08-04 14:10:48 +10:00
2015-04-02 09:41:15 +11:00
2015-05-04 22:55:25 +10:00
2015-05-04 22:55:25 +10:00
2014-08-13 11:01:04 +10:00
2013-03-26 11:43:49 -05:00
2015-05-04 22:55:33 +10:00
2015-05-04 22:55:33 +10:00
2015-05-04 22:55:47 +10:00
2015-05-04 22:55:47 +10:00
2015-05-04 22:56:13 +10:00
2015-05-04 22:56:13 +10:00
2015-05-26 12:51:57 +10:00
2015-05-26 12:51:57 +10:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:48 +10:00
2015-08-04 14:10:48 +10:00
2014-12-16 14:01:06 +11:00
2013-03-26 11:43:49 -05:00
2015-05-26 12:51:57 +10:00
2015-05-26 12:51:57 +10:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:48 +10:00
2015-08-04 14:10:48 +10:00
2015-08-04 14:10:48 +10:00
2015-08-04 14:10:48 +10:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-09-29 13:09:37 +10:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:49 +10:00
2015-08-04 14:10:49 +10:00
2015-09-21 11:04:25 +10:00
2015-09-21 11:04:25 +10:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:01:04 +10:00
2013-03-26 11:43:49 -05:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2015-05-26 12:51:57 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2013-12-03 10:29:26 +11:00
2013-03-26 11:43:49 -05:00
2013-12-03 10:29:26 +11:00
2013-03-26 11:43:49 -05:00
2014-12-16 14:01:06 +11:00
2013-03-26 11:43:49 -05:00
2014-09-08 22:26:52 +10:00
2013-03-26 11:43:49 -05:00
2013-12-03 10:29:26 +11:00
2013-03-26 11:43:49 -05:00
2014-12-16 14:01:06 +11:00
2013-03-26 11:43:49 -05:00
2015-05-26 12:51:57 +10:00
2013-03-26 11:43:49 -05:00
2013-12-03 10:29:26 +11:00
2013-03-26 11:43:49 -05:00
2013-05-14 08:33:44 -05:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-11-10 18:06:23 +11:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-10-16 14:58:28 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2015-05-04 22:56:13 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-09-29 13:07:26 +10:00
2013-03-26 11:43:49 -05:00
2013-05-14 08:33:44 -05:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2015-05-26 12:51:53 +10:00
2013-03-26 11:43:49 -05:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:20:59 +10:00
2013-03-26 11:43:49 -05:00
2014-12-16 14:01:06 +11:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2013-05-14 08:33:44 -05:00
2013-10-16 14:58:28 -05:00
2014-04-22 10:46:49 +10:00
2013-03-26 11:43:49 -05:00
2013-05-03 09:22:13 -05:00
2013-03-26 11:43:49 -05:00
2013-05-14 08:34:44 -05:00
2013-03-26 11:43:49 -05:00
2013-04-04 06:55:21 -05:00
2013-03-26 11:43:49 -05:00
2013-05-16 06:53:05 -05:00
2013-10-16 14:58:28 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-10-14 17:07:52 +11:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-10-16 14:58:28 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-09-29 12:56:16 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-12-16 10:53:57 +11:00
2014-12-16 10:53:57 +11:00
2014-08-13 11:08:41 +10:00
2014-02-04 11:52:37 +11:00
2014-10-14 17:07:52 +11:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-12-16 10:53:57 +11:00
2013-03-26 11:43:49 -05:00
2014-12-16 14:01:06 +11:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:49 +10:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:49 +10:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:48 +10:00
2013-03-26 11:43:49 -05:00
2014-04-28 10:55:12 +10:00
2013-03-26 11:43:49 -05:00
2015-05-26 12:51:56 +10:00
2013-03-26 11:43:49 -05:00
2014-11-10 18:06:23 +11:00
2013-03-26 11:43:49 -05:00
2014-03-13 15:20:28 +11:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-03-26 11:43:49 -05:00
2014-09-29 13:07:26 +10:00
2013-03-26 11:43:49 -05:00
2015-08-04 14:10:44 +10:00
2013-03-26 11:43:49 -05:00
2013-10-16 15:17:35 -05:00
2013-10-16 14:58:28 -05:00
2014-12-16 14:01:06 +11:00
2013-03-26 11:43:49 -05:00
2014-12-16 14:01:06 +11:00
2013-03-26 11:43:49 -05:00
2014-08-13 11:08:41 +10:00
2013-10-16 14:58:28 -05:00
2013-05-15 08:17:51 -05:00
2013-04-05 08:26:47 -05:00
2014-10-14 17:07:52 +11:00
2013-04-05 08:26:47 -05:00
2014-08-13 11:08:41 +10:00
2013-04-05 08:26:47 -05:00
2014-09-29 13:09:07 +10:00
2013-04-05 12:25:29 -05:00
2015-02-25 15:36:52 +11:00
2013-05-03 14:13:09 -05:00
2014-08-13 11:01:04 +10:00
2013-05-15 07:48:41 -05:00
2014-08-13 11:08:41 +10:00
2013-07-08 16:59:48 -05:00
2014-08-13 11:08:41 +10:00
2013-07-26 11:15:42 -05:00
2014-12-12 10:55:24 +11:00
2013-07-19 17:16:27 -05:00
2014-08-13 11:08:41 +10:00
2014-02-04 11:52:37 +11:00
2014-06-18 09:34:39 +10:00
2013-08-19 09:47:20 -05:00
2014-06-18 09:34:39 +10:00
2013-11-04 14:15:52 -06:00
2013-10-16 16:19:25 -05:00
2013-10-16 16:19:25 -05:00
2014-08-13 11:01:04 +10:00
2013-11-12 20:19:48 -06:00
2015-02-25 15:36:52 +11:00
2013-12-03 10:29:36 +11:00
2015-02-25 15:36:52 +11:00
2014-01-20 12:47:56 +11:00
2014-12-12 11:26:15 +11:00
2014-08-13 11:00:38 +10:00
2014-12-16 10:53:57 +11:00
2014-08-13 11:19:33 +10:00
2015-05-04 22:56:13 +10:00
2015-02-25 15:35:20 +11:00
2015-09-21 11:04:25 +10:00
2013-04-12 13:17:46 -05:00