Skip to contentSkip to conversation

ext4/057: add test for ext4 uuid get/set ioctls during fsstress.

PATCH New Jeremy Bongio 1 participant 1 message Jul 21, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 ext4/057: add test for ext4 uuid get/set ioctls during fsstress.

Adds a utility to get/set 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.

---

Changes in v6:

Based on latest "for-upstream" branch.

Removed fsstress_pid from wait command.

Test renamed from ext4/056 to ext4/057.

Added Reviewed-by from Zorro Lang.

 .gitignore         |   1 +
 src/Makefile       |   5 ++-
 src/uuid_ioctl.c   | 105 +++++++++++++++++++++++++++++++++++++++++++++
 tests/ext4/057     |  64 +++++++++++++++++++++++++++
 tests/ext4/057.out |   2 +
 5 files changed, 175 insertions(+), 2 deletions(-)
 create mode 100644 src/uuid_ioctl.c
 create mode 100755 tests/ext4/057
 create mode 100644 tests/ext4/057.out
.gitignore +1 -0
index 88c79412..c1d75b01 100644
@@ -172,6 +172,7 @@ tags
 /src/unwritten_sync
 /src/uring_read_fault
 /src/usemem
+/src/uuid_ioctl
 /src/writemod
 /src/writev_on_pagefault
 /src/xfsctl
src/Makefile +3 -2
index 7eeb08ef..665edcf9 100644
@@ -31,14 +31,15 @@ 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 t_readdir_3 splice2pipe
+	detached_mounts_propagation ext4_resize t_readdir_3 splice2pipe \
+	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/057 new file +64 -0

64 lines not on this page · raw message

tests/ext4/057.out new file +2 -0
new file mode 100644
index 00000000..185023c7
@@ -0,0 +1,2 @@
+QA output created by 057
+Silence is golden
Signature · 1 line
2.37.1.359.gd136c6c3e2-goog