fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] common/rc: don't clear superblock for zoned scratch pools
@ 2023-02-23 15:40 Johannes Thumshirn
  2023-02-23 17:01 ` Filipe Manana
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2023-02-23 15:40 UTC (permalink / raw)
  To: Zorro Lang; +Cc: linux-btrfs, fstests, Johannes Thumshirn

_require_scratch_dev_pool() zeros the first 100 sectors of each device to
clear eventual remains of older filesystems.

On zoned devices this creates all sorts of problems, so just skip the
clearing there.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 common/rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 654730b21ead..d763501be2b2 100644
--- a/common/rc
+++ b/common/rc
@@ -3461,7 +3461,9 @@ _require_scratch_dev_pool()
 		fi
 		# to help better debug when something fails, we remove
 		# traces of previous btrfs FS on the dev.
-		dd if=/dev/zero of=$i bs=4096 count=100 > /dev/null 2>&1
+		if [ "`_zone_type "$i"`" = "none" ]; then
+			dd if=/dev/zero of=$i bs=4096 count=100 > /dev/null 2>&1
+		fi
 	done
 }
 
-- 
2.39.1


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

end of thread, other threads:[~2023-02-24 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 15:40 [PATCH] common/rc: don't clear superblock for zoned scratch pools Johannes Thumshirn
2023-02-23 17:01 ` Filipe Manana
2023-02-24  9:25   ` Johannes Thumshirn
2023-02-24  7:26 ` Naohiro Aota
2023-02-24  9:23   ` Johannes Thumshirn
2023-02-24 13:40 ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).