Skip to contentSkip to conversation

common: call _require_scratch_dedupe from _require_scratch_duperemove

PATCH In review Christoph Hellwig 4 participants 4 messages Dec 10, 2024 – Dec 13, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: call _require_scratch_dedupe from _require_scratch_duperemove

_require_scratch_duperemove doesn't check if the scratch file system actually supports dedup, so add the proper call for that.

---

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(+)
common/reflink +2 -0
index 22adc4449bc6..9177c45e70bb 100644
@@ -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" \
Signature · 1 line
2.45.2
Tested-by on v1 1/1
#1 lore raw
Quoted 18 lines · Christoph Hellwig

_require_scratch_duperemove doesn't check if the scratch file system actually supports dedup, so add the proper call for that.

---

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(+)
common/reflink +0 -0
index 22adc4449bc6..9177c45e70bb 100644

common/reflink _require_scratch_duperemove() · line 90

Quoted 8 lines
common/reflink +2 -0
@@ -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" \
Signature · 1 line
Chuck Lever
Reviewed-by on v1 1/1
#2 lore raw
In reply to Christoph Hellwig
Quoted 4 lines · Christoph Hellwig

_require_scratch_duperemove doesn't check if the scratch file system actually supports dedup, so add the proper call for that.

Looks ok,

Quoted 5 lines

---

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

Quoted 20 lines
 common/reflink | 2 ++
 1 file changed, 2 insertions(+)
common/reflink +2 -0
index 22adc4449bc6..9177c45e70bb 100644
@@ -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" \
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#3 lore raw
In reply to Christoph Hellwig
Quoted 18 lines · Christoph Hellwig

_require_scratch_duperemove doesn't check if the scratch file system actually supports dedup, so add the proper call for that.

---

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(+)
common/reflink +0 -0
index 22adc4449bc6..9177c45e70bb 100644

common/reflink _require_scratch_duperemove() · line 86

Quoted 4 lines
common/reflink +1 -0
@@ -83,6 +83,8 @@ _require_scratch_duperemove()
 
 	_scratch_mkfs > /dev/null
 	_scratch_mount
+	_require_scratch_dedupe

Thanks, it makes sense to me.

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

Quoted 8 lines
common/reflink +1 -0
+
 	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" \
Signature · 1 line
2.45.2