Skip to contentSkip to conversation

ext4/056: add a check to make sure ext4 uuid ioctls get/set during fsstress.

PATCH Superseded Jeremy Bongio 1 participant 1 message Jul 19, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 ext4/056: add a check to make sure ext4 uuid ioctls get/set during fsstress.

Adds a utility to set/get uuid through ext4 ioctl. Executes the ioctls while running fsstress. These ioctls are used by tune2fs to safely change the uuid without racing other filesystem modifications.

---

Added reviewed-by tag.

Added wait after killing fsstress pids.

Removed _scratch_mount output redirection.

 .gitignore         |   1 +
 src/Makefile       |   4 +-
 src/uuid_ioctl.c   | 105 +++++++++++++++++++++++++++++++++++++++++++++
 tests/ext4/056     |  64 +++++++++++++++++++++++++++
 tests/ext4/056.out |   2 +
 5 files changed, 174 insertions(+), 2 deletions(-)
 create mode 100644 src/uuid_ioctl.c
 create mode 100755 tests/ext4/056
 create mode 100644 tests/ext4/056.out
.gitignore +1 -0
index ba0c572b..dab24d68 100644
@@ -169,6 +169,7 @@ tags
 /src/unwritten_mmap
 /src/unwritten_sync
 /src/usemem
+/src/uuid_ioctl
 /src/writemod
 /src/writev_on_pagefault
 /src/xfsctl
src/Makefile +2 -2
index 111ce1d9..e33e04de 100644
@@ -31,14 +31,14 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
 	dio-invalidate-cache stat_test t_encrypted_d_revalidate \
 	attr_replace_test swapon mkswap t_attr_corruption t_open_tmpfiles \
 	fscrypt-crypt-util bulkstat_null_ocount splice-test chprojid_fail \
-	detached_mounts_propagation ext4_resize
+	detached_mounts_propagation ext4_resize uuid_ioctl
 
 EXTRA_EXECS = dmerror fill2attr fill2fs fill2fs_check scaleread.sh \
 	      btrfs_crc32c_forged_name.py
 
 SUBDIRS = log-writes perf
 
-LLDLIBS = $(LIBHANDLE) $(LIBACL) -lpthread -lrt
+LLDLIBS = $(LIBHANDLE) $(LIBACL) -lpthread -lrt -luuid
 
 ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
 LINUX_TARGETS += loggen
src/uuid_ioctl.c new file +105 -0

105 lines not on this page · raw message

tests/ext4/056 new file +64 -0

64 lines not on this page · raw message

tests/ext4/056.out new file +2 -0
new file mode 100644
index 00000000..6142fcd2
@@ -0,0 +1,2 @@
+QA output created by 056
+Silence is golden
Signature · 1 line
2.37.0.170.g444d1eabd0-goog