This patch adds a new member `feature' in inject_sb to inject features.
Signed-off-by: Sheng Yong <[email protected]>
---
fsck/inject.c | 5 +++++
man/inject.f2fs.8 | 3 +++
2 files changed, 8 insertions(+)
diff --git a/fsck/inject.c b/fsck/inject.c
index c3e68eb35246..c997334ec57d 100644
--- a/fsck/inject.c
+++ b/fsck/inject.c
@@ -121,6 +121,7 @@ static void inject_sb_usage(void)
MSG(0, " magic: inject magic number\n");
MSG(0, " s_stop_reason: inject s_stop_reason array selected by --idx
<index>\n");
MSG(0, " s_errors: inject s_errors array selected by --idx <index>\n");
+ MSG(0, " feature: inject feature\n");
MSG(0, " devs.path: inject path in devs array selected by --idx
<index> specified by --str <string>\n");
}
@@ -412,6 +413,10 @@ static int inject_sb(struct f2fs_sb_info *sbi, struct
inject_option *opt)
MSG(0, "Info: inject s_errors[%d] of sb %d: %x -> %x\n",
opt->idx, opt->sb, sb->s_errors[opt->idx], (u8)opt->val);
sb->s_errors[opt->idx] = (u8)opt->val;
+ } else if (!strcmp(opt->mb, "feature")) {
+ MSG(0, "Info: inject feature of sb %d: 0x%x -> 0x%x\n",
+ opt->sb, get_sb(feature), (u32)opt->val);
+ set_sb(feature, (u32)opt->val);
} else if (!strcmp(opt->mb, "devs.path")) {
if (opt->idx >= MAX_DEVICES) {
ERR_MSG("invalid index %u of sb->devs[]\n", opt->idx);
diff --git a/man/inject.f2fs.8 b/man/inject.f2fs.8
index 6cf66bcbf2a3..5196aa46699a 100644
--- a/man/inject.f2fs.8
+++ b/man/inject.f2fs.8
@@ -53,6 +53,9 @@ s_stop_reason array.
.BI s_errors
s_errors array.
.TP
+.BI feature
+feature.
+.TP
.BI devs.path
path in devs array.
.RE
--
2.40.1
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel