[PATCH 10/12] common/populate: label newly created xfs filesystems

Darrick J. Wong
2025-02-19T00:56:04Z

From: Darrick J. Wong <djwong@kernel.org>

When we're creating fully populated filesystems, add an obviously weird
label to the filesystem images so that it's obvious that it's a test
filesystem.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
common/populate | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/common/populate b/common/populate
index c907e04efd0ea9..7690f269df8e79 100644
--- a/common/populate
+++ b/common/populate
@@ -280,6 +280,10 @@ _scratch_xfs_populate() {
esac
done

+ # fill the fs label with obvious emoji because nobody uses them in prod
+ # and blkid throws a fit
+ _scratch_xfs_admin -L 'I❤🐸s'
+
_populate_xfs_qmount_option
_scratch_mount

@@ -537,6 +541,10 @@ _scratch_ext4_populate() {
esac
done

+ # fill the fs label with obvious emoji because nobody uses them in prod
+ # and blkid throws a fit
+ $TUNE2FS_PROG -L 'I❤🐸s' $SCRATCH_DEV
+
_scratch_mount
blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
dblksz="${blksz}"