public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/073: avoid large recurise diff
@ 2024-06-20 12:48 Christoph Hellwig
  2024-06-20 15:23 ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2024-06-20 12:48 UTC (permalink / raw)
  To: djwong, zlang; +Cc: linux-xfs, fstests

xfs/073 has been failing for me for a while on most of my test setups
with:

diff: memory exhausted

from the large recursive diff it does.  Replace that with a pipe using
md5sum to reduce the memory usage.

Based on a snipplet from Darrick Wong.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/073 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/xfs/073 b/tests/xfs/073
index c7616b9e9..0f96fdb09 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -76,7 +76,8 @@ _verify_copy()
 	fi
 
 	echo comparing new image files to old
-	diff -Naur $source_dir $target_dir
+	(cd $source_dir; find . -type f -print0 | xargs -0 md5sum) | \
+	(cd $target_dir ; md5sum -c --quiet)
 
 	echo comparing new image directories to old
 	find $source_dir | _filter_path $source_dir > $tmp.manifest1
-- 
2.43.0


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

* Re: [PATCH] xfs/073: avoid large recurise diff
  2024-06-20 12:48 [PATCH] xfs/073: avoid large recurise diff Christoph Hellwig
@ 2024-06-20 15:23 ` Darrick J. Wong
  2024-06-21  5:04   ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Darrick J. Wong @ 2024-06-20 15:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: zlang, linux-xfs, fstests

On Thu, Jun 20, 2024 at 02:48:44PM +0200, Christoph Hellwig wrote:
> xfs/073 has been failing for me for a while on most of my test setups
> with:
> 
> diff: memory exhausted
> 
> from the large recursive diff it does.  Replace that with a pipe using
> md5sum to reduce the memory usage.
> 
> Based on a snipplet from Darrick Wong.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

LGTM
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

> ---
>  tests/xfs/073 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index c7616b9e9..0f96fdb09 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -76,7 +76,8 @@ _verify_copy()
>  	fi
>  
>  	echo comparing new image files to old
> -	diff -Naur $source_dir $target_dir
> +	(cd $source_dir; find . -type f -print0 | xargs -0 md5sum) | \
> +	(cd $target_dir ; md5sum -c --quiet)

Dumb nit: shellcheck   ^^ tells me these semicolons should be a '&&' so
that the find/md5sum won't run if the cd fails, but the incorrect file
list and whatever error messages cd coughs up will be enough to fail the
test anyway.

--D

>  
>  	echo comparing new image directories to old
>  	find $source_dir | _filter_path $source_dir > $tmp.manifest1
> -- 
> 2.43.0
> 
> 

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

* Re: [PATCH] xfs/073: avoid large recurise diff
  2024-06-20 15:23 ` Darrick J. Wong
@ 2024-06-21  5:04   ` Christoph Hellwig
  2024-06-21 15:51     ` Zorro Lang
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2024-06-21  5:04 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, zlang, linux-xfs, fstests

Looking at the reply I noticed I misspelled recursive in the subject,
so maybe this can get fixed up when applying the patch?


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

* Re: [PATCH] xfs/073: avoid large recurise diff
  2024-06-21  5:04   ` Christoph Hellwig
@ 2024-06-21 15:51     ` Zorro Lang
  0 siblings, 0 replies; 4+ messages in thread
From: Zorro Lang @ 2024-06-21 15:51 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Darrick J. Wong, zlang, linux-xfs, fstests

On Fri, Jun 21, 2024 at 07:04:16AM +0200, Christoph Hellwig wrote:
> Looking at the reply I noticed I misspelled recursive in the subject,
> so maybe this can get fixed up when applying the patch?

Sure, I've noticed that and have changed it in my local branch :)

Thanks,
Zorro

> 
> 


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

end of thread, other threads:[~2024-06-21 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20 12:48 [PATCH] xfs/073: avoid large recurise diff Christoph Hellwig
2024-06-20 15:23 ` Darrick J. Wong
2024-06-21  5:04   ` Christoph Hellwig
2024-06-21 15:51     ` Zorro Lang

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