* [xfstests-bld PATCH] test-appliance: support f2fs-tools v1.9 and later
@ 2018-04-05 22:21 Eric Biggers via Linux-f2fs-devel
2018-04-06 13:30 ` Theodore Y. Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Eric Biggers via Linux-f2fs-devel @ 2018-04-05 22:21 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: Eric Biggers, fstests, linux-f2fs-devel
Pass the -f option to mkfs.f2fs when it appears to support it. This is
required by f2fs-tools v1.9 and later in order to format the filesystem
even when an existing filesystem is detected. But earlier versions did
not accept this option.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
kvm-xfstests/test-appliance/files/root/fs/f2fs/config | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
index 45fb2dd..0efcb76 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
+++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
@@ -20,6 +20,10 @@ function format_filesystem()
local dev="$1"
local opts="$2"
+ if grep -q 'force overwrite' /sbin/mkfs.f2fs; then
+ # f2fs-tools v1.9+
+ opts+=" -f"
+ fi
/sbin/mkfs.f2fs -q $opts "$dev"
return $?
}
--
2.17.0.484.g0c8726318c-goog
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [xfstests-bld PATCH] test-appliance: support f2fs-tools v1.9 and later
2018-04-05 22:21 [xfstests-bld PATCH] test-appliance: support f2fs-tools v1.9 and later Eric Biggers via Linux-f2fs-devel
@ 2018-04-06 13:30 ` Theodore Y. Ts'o
2018-04-09 19:00 ` Eric Biggers via Linux-f2fs-devel
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Y. Ts'o @ 2018-04-06 13:30 UTC (permalink / raw)
To: Eric Biggers; +Cc: fstests, linux-f2fs-devel
On Thu, Apr 05, 2018 at 03:21:41PM -0700, Eric Biggers wrote:
> Pass the -f option to mkfs.f2fs when it appears to support it. This is
> required by f2fs-tools v1.9 and later in order to format the filesystem
> even when an existing filesystem is detected. But earlier versions did
> not accept this option.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied for now, but ugh. Grepping strings out of binaries is not
something I really like to depend upon. Can we convince the f2fs
folks to provide a "/sbin/mkfs.f2fs -V" which prints a version string,
or some such?
- Ted
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [xfstests-bld PATCH] test-appliance: support f2fs-tools v1.9 and later
2018-04-06 13:30 ` Theodore Y. Ts'o
@ 2018-04-09 19:00 ` Eric Biggers via Linux-f2fs-devel
0 siblings, 0 replies; 3+ messages in thread
From: Eric Biggers via Linux-f2fs-devel @ 2018-04-09 19:00 UTC (permalink / raw)
To: Theodore Y. Ts'o; +Cc: fstests, linux-f2fs-devel
On Fri, Apr 06, 2018 at 09:30:36AM -0400, Theodore Y. Ts'o wrote:
> On Thu, Apr 05, 2018 at 03:21:41PM -0700, Eric Biggers wrote:
> > Pass the -f option to mkfs.f2fs when it appears to support it. This is
> > required by f2fs-tools v1.9 and later in order to format the filesystem
> > even when an existing filesystem is detected. But earlier versions did
> > not accept this option.
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
>
> Applied for now, but ugh. Grepping strings out of binaries is not
> something I really like to depend upon. Can we convince the f2fs
> folks to provide a "/sbin/mkfs.f2fs -V" which prints a version string,
> or some such?
>
Yes, it's ugly. As something maybe a bit better, I've proposed
mkfs.f2fs --help |& grep -q "[[:space:]]-f[[:space:]|]"
in v2 of the xfstests patch to common/config. So if that gets accepted into
xfstests I'll change this to use the same method.
Thanks,
Eric
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-09 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-05 22:21 [xfstests-bld PATCH] test-appliance: support f2fs-tools v1.9 and later Eric Biggers via Linux-f2fs-devel
2018-04-06 13:30 ` Theodore Y. Ts'o
2018-04-09 19:00 ` Eric Biggers via Linux-f2fs-devel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).