ext4/308,generic/324: require fallocate support
PATCH 1/1 ext4/308,generic/324: require fallocate support
These tests use the falloc command in xfs_io, and there are some file systems (ext3) or file system configurations (ext4 in ext3 compatibility mode) which do not support fallocate. So add the explicit requirement to avoid false test failures.
--- tests/ext4/308 | 1 + tests/generic/324 | 1 + 2 files changed, 2 insertions(+)
tests/ext4/308 +1 -0
@@ -46,6 +46,7 @@ _supported_os Linux _need_to_be_root _require_scratch _require_defrag +_require_xfs_io_command "falloc" rm -f $seqres.full
tests/generic/324 +1 -0
@@ -44,6 +44,7 @@ _supported_os Linux _need_to_be_root _require_scratch _require_defrag +_require_xfs_io_command "falloc" rm -f $seqres.full
Signature · 1 line
2.1.0
Quoted 4 lines · Theodore Ts'o
These tests use the falloc command in
xfs_io, and there are some file systems (ext3) or file system configurations (ext4 in ext3 compatibility mode) which do not support fallocate. So add the explicit requirement to avoid false test failures.
The two tests fail because of no defrag support on ext3 on my test host.
ext4/308 [not run] defragmentation not supported for fstype "ext3"
generic/324 19s ... [not run] defragmentation not supported for fstype "ext3"
But the check makes sense to me.
Quoted 12 lines
Signed-off-by Theodore Ts'o <[email protected]>--- tests/ext4/308 | 1 + tests/generic/324 | 1 + 2 files changed, 2 insertions(+)tests/ext4/308 +0
-0
tests/ext4/308 _supported_os Linux · line 49
Quoted 4 lines
tests/ext4/308 +1
-0@@ -46,6 +46,7 @@ _supported_os Linux _need_to_be_root _require_scratch _require_defrag +_require_xfs_io_command "falloc"
ext4/308 also uses fiemap command, I think we need another check here
_require_xfs_io_command "fiemap"
Thanks,
Eryu
Quoted 10 lines · Eryu Guan
Quoted 4 lines · Theodore Ts'o
These tests use the falloc command in
xfs_io, and there are some file systems (ext3) or file system configurations (ext4 in ext3 compatibility mode) which do not support fallocate. So add the explicit requirement to avoid false test failures.The two tests fail because of no defrag support on ext3 on my test host.
ext4/308 [not run] defragmentation not supported for fstype "ext3"
generic/324 19s ... [not run] defragmentation not supported for fstype "ext3"
The problem is if you are using ext4 in compatibility mode for ext3 file system, it does support the defrag ioctl, but it can't support fallocate for non-extent-mapped files (since we can't mark the blocks as being uninitialized). (Well, we could support fallocate in no-hide-stale mode, but that's only something that Google and Tao Bao is using, and that patch isn't upstream anyway, since it's been declared unclean. :-)
Quoted 3 lines
ext4/308 also uses fiemap command, I think we need another check here
_require_xfs_io_command"fiemap"
ext4 is always going to support the fiemap ioctl, so I think we're good there.
Cheers,
- Ted
Eryu Guan
Reviewed-byQuoted 20 lines · Theodore Ts'o
Quoted 10 lines · Eryu Guan
Quoted 4 lines · Theodore Ts'o
These tests use the falloc command in
xfs_io, and there are some file systems (ext3) or file system configurations (ext4 in ext3 compatibility mode) which do not support fallocate. So add the explicit requirement to avoid false test failures.The two tests fail because of no defrag support on ext3 on my test host.
ext4/308 [not run] defragmentation not supported for fstype "ext3"
generic/324 19s ... [not run] defragmentation not supported for fstype "ext3"The problem is if you are using ext4 in compatibility mode for ext3 file system, it does support the defrag ioctl, but it can't support fallocate for non-extent-mapped files (since we can't mark the blocks as being uninitialized). (Well, we could support fallocate in no-hide-stale mode, but that's only something that Google and Tao Bao is using, and that patch isn't upstream anyway, since it's been declared unclean. :-)
Quoted 6 lines
Quoted 3 lines
ext4/308 also uses fiemap command, I think we need another check here
_require_xfs_io_command"fiemap"ext4 is always going to support the fiemap ioctl, so I think we're good there.
That makes sense, thanks for the explanation! The change looks good to me.