* [PATCH] generic/694: sync before sampling i_blocks
@ 2024-10-08 7:12 Christoph Hellwig
2024-10-09 14:48 ` Darrick J. Wong
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2024-10-08 7:12 UTC (permalink / raw)
To: zlang; +Cc: fstests
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
+sync
+
iblocks=`stat -c '%b' $junk_file`
_test_cycle_mount
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] generic/694: sync before sampling i_blocks
2024-10-08 7:12 [PATCH] generic/694: sync before sampling i_blocks Christoph Hellwig
@ 2024-10-09 14:48 ` Darrick J. Wong
2024-10-10 6:37 ` Zorro Lang
2024-10-10 6:59 ` Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Darrick J. Wong @ 2024-10-09 14:48 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: zlang, fstests
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
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] generic/694: sync before sampling i_blocks
2024-10-09 14:48 ` Darrick J. Wong
@ 2024-10-10 6:37 ` Zorro Lang
2024-10-10 6:59 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Zorro Lang @ 2024-10-10 6:37 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, fstests
On Wed, Oct 09, 2024 at 07:48:17AM -0700, Darrick J. Wong wrote:
> 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
I can help to do this change, if you don't have more review points besides that.
Thanks,
Zorro
>
> --D
>
> > +
> > iblocks=`stat -c '%b' $junk_file`
> >
> > _test_cycle_mount
> > --
> > 2.45.2
> >
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] generic/694: sync before sampling i_blocks
2024-10-09 14:48 ` Darrick J. Wong
2024-10-10 6:37 ` Zorro Lang
@ 2024-10-10 6:59 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2024-10-10 6:59 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, zlang, fstests
On Wed, Oct 09, 2024 at 07:48:17AM -0700, Darrick J. Wong wrote:
> > +# 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
I didn't even know sync took an optional file argument. But yes,
that should be fine.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-10 6:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 7:12 [PATCH] generic/694: sync before sampling i_blocks Christoph Hellwig
2024-10-09 14:48 ` Darrick J. Wong
2024-10-10 6:37 ` Zorro Lang
2024-10-10 6:59 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox