Skip to contentSkip to conversation

f2fs/009: use common _scratch_shutdown helper

PATCH In review Chao Yu 2 participants 2 messages Jun 15 – Jun 16

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 f2fs/009: use common _scratch_shutdown helper

f2fs has supported ioctl(_IOR ('X', 125, uint32_t)), so that "f2fs_io shutdown" can be completely replaced w/ _scratch_shutdown(), let's clean up in f2fs/009.

---
 tests/f2fs/009 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/f2fs/009 +2 -1
index fa4a39d16..39a4bad3d 100755
@@ -12,6 +12,7 @@
 _begin_fstest auto quick
 
 _require_scratch
+_require_scratch_shutdown
 _require_inject_f2fs_command node i_links
 _require_command "$(type -P socket)" socket
 
@@ -106,7 +107,7 @@ ino=`stat -c '%i' $filename`
 $F2FS_IO_PROG write 1 0 1 zero atomic_commit $filename 5000 >> $seqres.full 2>&1 &
 stat $filename >> $seqres.full
 rm $filename
-$F2FS_IO_PROG shutdown 1 $SCRATCH_MNT/ >> $seqres.full
+_scratch_shutdown -f
 sleep 6
 check_links 1 0 $ino
 
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Chao Yu

f2fs has supported ioctl(_IOR ('X', 125, uint32_t)), so that "f2fs_io shutdown" can be completely replaced w/ _scratch_shutdown(), let's clean up in f2fs/009.

---
 tests/f2fs/009 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/f2fs/009 +1 -0
index fa4a39d16..39a4bad3d 100755
@@ -12,6 +12,7 @@
 _begin_fstest auto quick
 
 _require_scratch
+_require_scratch_shutdown
 _require_inject_f2fs_command node i_links
 _require_command "$(type -P socket)" socket
 

tests/f2fs/009 ino=`stat -c '%i' $filename` · line 110

Quoted 5 lines
tests/f2fs/009 +1 -1
@@ -106,7 +107,7 @@ ino=`stat -c '%i' $filename`
 $F2FS_IO_PROG write 1 0 1 zero atomic_commit $filename 5000 >> $seqres.full 2>&1 &
 stat $filename >> $seqres.full
 rm $filename
-$F2FS_IO_PROG shutdown 1 $SCRATCH_MNT/ >> $seqres.full
+_scratch_shutdown -f

Great! Glad to see fs specific code being replaced by common helper.

Quoted 6 lines
tests/f2fs/009 +0 -0
 sleep 6
 check_links 1 0 $ino
 
Signature · 1 line
2.49.0