Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

f2fs: introduce FAULT_LOCK_TIMEOUT

This patch introduce a new fault type FAULT_LOCK_TIMEOUT, it can
be used to inject timeout into lock duration.

Timeout type can be set via /sys/fs/f2fs/<disk>/inject_timeout_type

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Chao Yu and committed by
Jaegeuk Kim
c56254e2 7a127c80

+7
+1
Documentation/ABI/testing/sysfs-fs-f2fs
··· 743 743 FAULT_INCONSISTENT_FOOTER 0x00200000 744 744 FAULT_ATOMIC_TIMEOUT 0x00400000 (1000ms) 745 745 FAULT_VMALLOC 0x00800000 746 + FAULT_LOCK_TIMEOUT 0x01000000 (1000ms) 746 747 =========================== ========== 747 748 748 749 What: /sys/fs/f2fs/<disk>/discard_io_aware_gran
+1
Documentation/filesystems/f2fs.rst
··· 217 217 FAULT_INCONSISTENT_FOOTER 0x00200000 218 218 FAULT_ATOMIC_TIMEOUT 0x00400000 (1000ms) 219 219 FAULT_VMALLOC 0x00800000 220 + FAULT_LOCK_TIMEOUT 0x01000000 (1000ms) 220 221 =========================== ========== 221 222 mode=%s Control block allocation mode which supports "adaptive" 222 223 and "lfs". In "lfs" mode, there should be no random
+3
fs/f2fs/checkpoint.c
··· 63 63 if (!lc->lock_trace) 64 64 return; 65 65 66 + if (time_to_inject(sem->sbi, FAULT_LOCK_TIMEOUT)) 67 + f2fs_io_schedule_timeout_killable(DEFAULT_FAULT_TIMEOUT); 68 + 66 69 get_lock_elapsed_time(&tts); 67 70 68 71 total_time = div_u64(tts.total_time - lc->ts.total_time, npm);
+1
fs/f2fs/f2fs.h
··· 65 65 FAULT_INCONSISTENT_FOOTER, 66 66 FAULT_ATOMIC_TIMEOUT, 67 67 FAULT_VMALLOC, 68 + FAULT_LOCK_TIMEOUT, 68 69 FAULT_MAX, 69 70 }; 70 71
+1
fs/f2fs/super.c
··· 69 69 [FAULT_INCONSISTENT_FOOTER] = "inconsistent footer", 70 70 [FAULT_ATOMIC_TIMEOUT] = "atomic timeout", 71 71 [FAULT_VMALLOC] = "vmalloc", 72 + [FAULT_LOCK_TIMEOUT] = "lock timeout", 72 73 }; 73 74 74 75 int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate,