generic: test XATTR_REPLACE doesn't take the fs down
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 1 May 2018 15:39:26 +0000 (08:39 -0700)
committerEryu Guan <guaneryu@gmail.com>
Wed, 2 May 2018 07:13:55 +0000 (15:13 +0800)
commit38cdd5be450e6e2c719709cca3da6580f8f875d0
tree70d63e6ecdc86623ebc43301912dfe04f1c2d489
parentd0f42b25301041ee5c72025d0a00cc3b5f3dc3da
generic: test XATTR_REPLACE doesn't take the fs down

Kanda Motohiro reported that expanding a tiny xattr into a large
xattr fails on XFS because we remove the tiny xattr from a shortform
fork and then try to re-add it after converting the fork to extents
format having not removed the ATTR_REPLACE flag.  This fails because
the attr is no longer present, causing a fs shutdown.

[Eryu: introduce function "fail" and use it where appropriate]

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199119
Reported-by: kanda.motohiro@gmail.com
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
.gitignore
src/Makefile
src/attr_replace_test.c [new file with mode: 0644]
tests/generic/486 [new file with mode: 0755]
tests/generic/486.out [new file with mode: 0644]
tests/generic/group