All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: "Darrick J . Wong" <djwong@kernel.org>,
	Eric Sandeen <sandeen@sandeen.net>,
	ltp@lists.linux.it, Eric Sandeen <sandeen@redhat.com>
Subject: Re: [LTP] [PATCH 2/2] df01.sh: Use tst_fsfreeze for XFS on kernel >= 5.19
Date: Mon, 13 Mar 2023 15:38:43 +0100	[thread overview]
Message-ID: <ZA81c11hvBu4xlsd@yuki> (raw)
In-Reply-To: <20230307145517.1359-3-pvorel@suse.cz>

Hi!
> XFS since kernel 5.19 postpone certain operation.  Use LTP fsfreeze
> implementation to force all the background garbage collection to run
> to completion.
> 
> Link: https://lore.kernel.org/linux-block/974cc110-d47e-5fae-af5f-e2e610720e2d@redhat.com/
> Suggested-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/commands/df/df01.sh | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
> index ae0449c3c..699d1538f 100755
> --- a/testcases/commands/df/df01.sh
> +++ b/testcases/commands/df/df01.sh
> @@ -1,7 +1,7 @@
>  #!/bin/sh
>  # SPDX-License-Identifier: GPL-2.0-or-later
>  # Copyright (c) 2015 Fujitsu Ltd.
> -# Copyright (c) 2018-2022 Petr Vorel <pvorel@suse.cz>
> +# Copyright (c) 2018-2023 Petr Vorel <pvorel@suse.cz>
>  # Author: Zhang Jin <jy_zhangjin@cn.fujitsu.com>
>  #
>  # Test df command with some basic options.
> @@ -46,6 +46,11 @@ df_test()
>  
>  	ROD_SILENT rm -rf $TST_MNTPOINT/testimg
>  
> +	# force all the background garbage collection to run to completion
> +	if [ "$TST_FS_TYPE" = "xfs" ] && tst_kvcmp -ge "5.19"; then
> +		tst_fsfreeze $TST_MNTPOINT
> +	fi

This looks overly specific, can't we just freeze and unfreeze the FS
without looking at kernel version? Or will we get errors on older XFS?

I suppose that this may still start to fail on distribution kernels if
some of the newer functionality gets backported...

Otherwise it looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-03-13 14:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 14:55 [LTP] [PATCH 0/2] df01.sh: fix for XFS on kernel >= 5.19 Petr Vorel
2023-03-07 14:55 ` [LTP] [PATCH 1/2] lib: Add tst_fsfreeze.c Petr Vorel
2023-03-07 14:55 ` [LTP] [PATCH 2/2] df01.sh: Use tst_fsfreeze for XFS on kernel >= 5.19 Petr Vorel
2023-03-13 14:38   ` Cyril Hrubis [this message]
2023-03-13 15:09     ` Eric Sandeen
2023-03-13 15:30       ` Petr Vorel
2023-03-13 15:33         ` Petr Vorel
2023-03-13 16:12           ` Darrick J. Wong
2023-03-13 22:08             ` Petr Vorel
2023-03-15 12:23             ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZA81c11hvBu4xlsd@yuki \
    --to=chrubis@suse.cz \
    --cc=djwong@kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.