FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] ext4/308,generic/324: require fallocate support
@ 2014-12-15 15:47 Theodore Ts'o
  2014-12-15 17:32 ` Eryu Guan
  0 siblings, 1 reply; 4+ messages in thread
From: Theodore Ts'o @ 2014-12-15 15:47 UTC (permalink / raw)
  To: fstests; +Cc: 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.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/ext4/308    | 1 +
 tests/generic/324 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/ext4/308 b/tests/ext4/308
index 8df24ba..948ff3f 100755
--- a/tests/ext4/308
+++ b/tests/ext4/308
@@ -46,6 +46,7 @@ _supported_os Linux
 _need_to_be_root
 _require_scratch
 _require_defrag
+_require_xfs_io_command "falloc"
 
 rm -f $seqres.full
 
diff --git a/tests/generic/324 b/tests/generic/324
index 1868bbc..5e642dc 100755
--- a/tests/generic/324
+++ b/tests/generic/324
@@ -44,6 +44,7 @@ _supported_os Linux
 _need_to_be_root
 _require_scratch
 _require_defrag
+_require_xfs_io_command "falloc"
 
 rm -f $seqres.full
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ext4/308,generic/324: require fallocate support
  2014-12-15 15:47 [PATCH] ext4/308,generic/324: require fallocate support Theodore Ts'o
@ 2014-12-15 17:32 ` Eryu Guan
  2014-12-15 20:02   ` Theodore Ts'o
  0 siblings, 1 reply; 4+ messages in thread
From: Eryu Guan @ 2014-12-15 17:32 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests

On Mon, Dec 15, 2014 at 10:47:23AM -0500, Theodore Ts'o wrote:
> 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.

> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
>  tests/ext4/308    | 1 +
>  tests/generic/324 | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/tests/ext4/308 b/tests/ext4/308
> index 8df24ba..948ff3f 100755
> --- a/tests/ext4/308
> +++ b/tests/ext4/308
> @@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ext4/308,generic/324: require fallocate support
  2014-12-15 17:32 ` Eryu Guan
@ 2014-12-15 20:02   ` Theodore Ts'o
  2014-12-16  4:00     ` Eryu Guan
  0 siblings, 1 reply; 4+ messages in thread
From: Theodore Ts'o @ 2014-12-15 20:02 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On Tue, Dec 16, 2014 at 01:32:00AM +0800, Eryu Guan wrote:
> On Mon, Dec 15, 2014 at 10:47:23AM -0500, Theodore Ts'o wrote:
> > 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.  :-)

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ext4/308,generic/324: require fallocate support
  2014-12-15 20:02   ` Theodore Ts'o
@ 2014-12-16  4:00     ` Eryu Guan
  0 siblings, 0 replies; 4+ messages in thread
From: Eryu Guan @ 2014-12-16  4:00 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests

On Mon, Dec 15, 2014 at 03:02:09PM -0500, Theodore Ts'o wrote:
> On Tue, Dec 16, 2014 at 01:32:00AM +0800, Eryu Guan wrote:
> > On Mon, Dec 15, 2014 at 10:47:23AM -0500, Theodore Ts'o wrote:
> > > 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.  :-)
> 
> > 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.

Reviewed-by: Eryu Guan <eguan@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-16  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15 15:47 [PATCH] ext4/308,generic/324: require fallocate support Theodore Ts'o
2014-12-15 17:32 ` Eryu Guan
2014-12-15 20:02   ` Theodore Ts'o
2014-12-16  4:00     ` Eryu Guan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox