FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: zlang@kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] generic/694: sync before sampling i_blocks
Date: Wed, 9 Oct 2024 07:48:17 -0700	[thread overview]
Message-ID: <20241009144817.GL21840@frogsfrogsfrogs> (raw)
In-Reply-To: <20241008071209.160188-1-hch@lst.de>

On Tue, Oct 08, 2024 at 09:12:09AM +0200, Christoph Hellwig wrote:
> Without a sync there might still be temporary blocks in i_blocks like
> indirect block reservations or additional blocks reserved for out of
> place writes.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/generic/694 | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/generic/694 b/tests/generic/694
> index 02253ef75..b6bc8a75f 100755
> --- a/tests/generic/694
> +++ b/tests/generic/694
> @@ -37,6 +37,10 @@ if [ $? -ne 0 ]; then
>  	echo "Could not create 4G test file"
>  fi
>  
> +# make sure indirect block reservations and other temporary block reservations
> +# are release before sampling i_blocks

Nit: '...are released before...'

> +sync

Should this be more targeted since we only care about junk_file's
i_blocks, not flushing everything in the system. e.g.

sync $junk_file

--D

> +
>  iblocks=`stat -c '%b' $junk_file`
>  
>  _test_cycle_mount
> -- 
> 2.45.2
> 
> 

  reply	other threads:[~2024-10-09 14:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08  7:12 [PATCH] generic/694: sync before sampling i_blocks Christoph Hellwig
2024-10-09 14:48 ` Darrick J. Wong [this message]
2024-10-10  6:37   ` Zorro Lang
2024-10-10  6:59   ` Christoph Hellwig

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=20241009144817.GL21840@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=zlang@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox