fsx: fix errors due to unsupported FIDEDUPERANGE
authorJan Kara <jack@suse.cz>
Thu, 28 Mar 2019 10:51:19 +0000 (11:51 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 31 Mar 2019 15:33:44 +0000 (23:33 +0800)
commitb591875529d13006c2b4e62dbc4b5726d8e2d77a
tree4736a10509d1da0522c2eb1d497cb5c41279aa1f
parentb0ef2879a77486b13ec7d8755f08722a79c36eb1
fsx: fix errors due to unsupported FIDEDUPERANGE

Older kernels (prior commit 494633fac7896 "vfs: vfs_dedupe_file_range()
doesn't return EOPNOTSUPP") will return EINVAL when operation is not
supported. Make fsx treat this error as a sign of unsupported
deduplication as well to make it usable with these older kernels.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
ltp/fsx.c