generic/158,304: filter dedupe error message
authorEryu Guan <eguan@redhat.com>
Fri, 30 Dec 2016 03:34:19 +0000 (11:34 +0800)
committerEryu Guan <eguan@redhat.com>
Fri, 6 Jan 2017 08:53:10 +0000 (16:53 +0800)
commit1300cbc873b125a916e1a95fc6e3834b97a96666
treea997e5a660618a6cc506fc47bed7f130241e3c58
parenta1d861da98f37e7a284d4701faf8cf6719c93c5b
generic/158,304: filter dedupe error message

Kernel commit 22725ce4e4a0 ("vfs: fix isize/pos/len checks for reflink &
dedupe") added more checks on reflink and dedupe, rejected dedupe past
EOF early and explicitly, and causes generic/158 and generic/304 to fail.

  Try dedupe from past EOF
 -dedupe: Invalid argument
 +XFS_IOC_FILE_EXTENT_SAME: Invalid argument
  Try dedupe to past EOF, destination offset beyond EOF

Also there's an xfsprogs patch from Darrick ("xfs_io: prefix dedupe
command error messages consistently") to change all xfs_io dedupe
error message prefixes to "XFS_IOC_FILE_EXTENT_SAME".

So introduce a new _filter_dedupe_error, change all "dedupe" prefix
to XFS_IOC_FILE_EXTENT_SAME, make tests pass with both old/new
kernel & userspace.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/reflink
tests/generic/158
tests/generic/158.out
tests/generic/304
tests/generic/304.out