Fix fsx errors due to unsupported FIDEDUPERANGE
PATCH 1/1 Fix fsx 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 <[email protected]>
--- ltp/fsx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
ltp/fsx.c +2 -1
@@ -1482,7 +1482,8 @@ test_dedupe_range(void)else error =0 ; -if (error ==EOPNOTSUPP || error ==ENOTTY ) { +/* Older kernels may return EINVAL... */ +if (error ==EOPNOTSUPP || error ==ENOTTY || error ==EINVAL ) {if (!quiet)fprintf (stderr, "main: filesystem does not support "
Signature · 1 line
2.16.4
Quoted 4 lines · Jan Kara
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.
Bleh, I forgot about that age-old quirk...
Reviewed-by Darrick J. Wong <[email protected]>
--D
Quoted 22 lines
Signed-off-by Jan Kara <[email protected]>--- ltp/fsx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)ltp/fsx.c +2
-1@@ -1482,7 +1482,8 @@ test_dedupe_range(void)else error =0 ; -if (error ==EOPNOTSUPP || error ==ENOTTY ) { +/* Older kernels may return EINVAL... */ +if (error ==EOPNOTSUPP || error ==ENOTTY || error ==EINVAL ) {if (!quiet)fprintf (stderr, "main: filesystem does not support "Signature · 1 line
2.16.4