diff mbox series

common: call _require_scratch_dedupe from _require_scratch_duperemove

Message ID 20241210065346.1234550-1-hch@lst.de (mailing list archive)
State New
Headers show
Series common: call _require_scratch_dedupe from _require_scratch_duperemove | expand

Commit Message

Christoph Hellwig Dec. 10, 2024, 6:53 a.m. UTC
_require_scratch_duperemove doesn't check if the scratch file system
actually supports dedup, so add the proper call for that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---

Btw, I wonder if we should simply stop using dupremove in favor of the
xfs_io dedup command which seems lot less cumbersome?  For now this is
a quick fix, though.

 common/reflink | 2 ++
 1 file changed, 2 insertions(+)

Comments

Chuck Lever Dec. 10, 2024, 2:50 p.m. UTC | #1
On 12/10/24 1:53 AM, Christoph Hellwig wrote:
> _require_scratch_duperemove doesn't check if the scratch file system
> actually supports dedup, so add the proper call for that.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> 
> Btw, I wonder if we should simply stop using dupremove in favor of the
> xfs_io dedup command which seems lot less cumbersome?  For now this is
> a quick fix, though.
> 
>   common/reflink | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/common/reflink b/common/reflink
> index 22adc4449bc6..9177c45e70bb 100644
> --- a/common/reflink
> +++ b/common/reflink
> @@ -83,6 +83,8 @@ _require_scratch_duperemove()
>   
>   	_scratch_mkfs > /dev/null
>   	_scratch_mount
> +	_require_scratch_dedupe
> +
>   	dd if=/dev/zero of="$SCRATCH_MNT/file1" bs=128k count=1 >& /dev/null
>   	dd if=/dev/zero of="$SCRATCH_MNT/file2" bs=128k count=1 >& /dev/null
>   	if ! "$DUPEREMOVE_PROG" -d "$SCRATCH_MNT/file1" \

Tested-by: Chuck Lever <chuck.lever@oracle.com>
Darrick J. Wong Dec. 12, 2024, 6:40 a.m. UTC | #2
On Tue, Dec 10, 2024 at 07:53:15AM +0100, Christoph Hellwig wrote:
> _require_scratch_duperemove doesn't check if the scratch file system
> actually supports dedup, so add the proper call for that.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks ok,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

> ---
> 
> Btw, I wonder if we should simply stop using dupremove in favor of the
> xfs_io dedup command which seems lot less cumbersome?  For now this is
> a quick fix, though.

In the old days of xfs reflink support, duperemove was a good trigger of
argument parsing bugs because it would effectively launch 1000 ships of
weird at the kernel.  I haven't seen 559 or 560 barf in a few years
though, and I've had 561 disabled for years because it takes forever to
finish.

--D

>  common/reflink | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/reflink b/common/reflink
> index 22adc4449bc6..9177c45e70bb 100644
> --- a/common/reflink
> +++ b/common/reflink
> @@ -83,6 +83,8 @@ _require_scratch_duperemove()
>  
>  	_scratch_mkfs > /dev/null
>  	_scratch_mount
> +	_require_scratch_dedupe
> +
>  	dd if=/dev/zero of="$SCRATCH_MNT/file1" bs=128k count=1 >& /dev/null
>  	dd if=/dev/zero of="$SCRATCH_MNT/file2" bs=128k count=1 >& /dev/null
>  	if ! "$DUPEREMOVE_PROG" -d "$SCRATCH_MNT/file1" \
> -- 
> 2.45.2
> 
>
Zorro Lang Dec. 13, 2024, 11:43 a.m. UTC | #3
On Tue, Dec 10, 2024 at 07:53:15AM +0100, Christoph Hellwig wrote:
> _require_scratch_duperemove doesn't check if the scratch file system
> actually supports dedup, so add the proper call for that.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> 
> Btw, I wonder if we should simply stop using dupremove in favor of the
> xfs_io dedup command which seems lot less cumbersome?  For now this is
> a quick fix, though.
> 
>  common/reflink | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/reflink b/common/reflink
> index 22adc4449bc6..9177c45e70bb 100644
> --- a/common/reflink
> +++ b/common/reflink
> @@ -83,6 +83,8 @@ _require_scratch_duperemove()
>  
>  	_scratch_mkfs > /dev/null
>  	_scratch_mount
> +	_require_scratch_dedupe

Thanks, it makes sense to me.

Reviewed-by: Zorro Lang <zlang@redhat.com>

I brought in "duperemove" just for giving dedupe feature a random stress test.
I never thought the duperemove project can't be stable long time. If anyone
knows any other tools can replace duperemove, I can change duperemove to
others.

Thanks,
Zorro

> +
>  	dd if=/dev/zero of="$SCRATCH_MNT/file1" bs=128k count=1 >& /dev/null
>  	dd if=/dev/zero of="$SCRATCH_MNT/file2" bs=128k count=1 >& /dev/null
>  	if ! "$DUPEREMOVE_PROG" -d "$SCRATCH_MNT/file1" \
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/common/reflink b/common/reflink
index 22adc4449bc6..9177c45e70bb 100644
--- a/common/reflink
+++ b/common/reflink
@@ -83,6 +83,8 @@  _require_scratch_duperemove()
 
 	_scratch_mkfs > /dev/null
 	_scratch_mount
+	_require_scratch_dedupe
+
 	dd if=/dev/zero of="$SCRATCH_MNT/file1" bs=128k count=1 >& /dev/null
 	dd if=/dev/zero of="$SCRATCH_MNT/file2" bs=128k count=1 >& /dev/null
 	if ! "$DUPEREMOVE_PROG" -d "$SCRATCH_MNT/file1" \