From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Sheng Yong <shengyong2021@gmail.com>, jaegeuk@kernel.org
Cc: shengyong1@xiaomi.com, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [RFC PATCH v2 12/32] inject.f2fs: add members in inject_node
Date: Fri, 13 Jun 2025 15:38:50 +0800 [thread overview]
Message-ID: <025216b1-f33a-4851-aea3-669890bea056@kernel.org> (raw)
In-Reply-To: <20250610123743.667183-13-shengyong1@xiaomi.com>
On 2025/6/10 20:37, Sheng Yong wrote:
> From: Sheng Yong <shengyong1@xiaomi.com>
>
> This patch adds new members in inject_node to inject inode:
> * i_ext.fofs: extent fofs
> * i_ext.blk_addr: extent blk_addr
> * i_ext.len: extent len
> * i_inline_xattr_size: inline xattr size
> * i_compr_blocks: compression blocks
>
> Signed-off-by: Sheng Yong <shengyong1@xiaomi.com>
> ---
> fsck/inject.c | 28 ++++++++++++++++++++++++++++
> man/inject.f2fs.8 | 17 ++++++++++++++++-
> 2 files changed, 44 insertions(+), 1 deletion(-)
>
> diff --git a/fsck/inject.c b/fsck/inject.c
> index 0b5aecbf8061..8c2f8c5dc332 100644
> --- a/fsck/inject.c
> +++ b/fsck/inject.c
> @@ -198,8 +198,13 @@ static void inject_node_usage(void)
> MSG(0, " i_links: inject inode i_links\n");
> MSG(0, " i_size: inject inode i_size\n");
> MSG(0, " i_blocks: inject inode i_blocks\n");
> + MSG(0, " i_ext.fofs: inject inode i_ext.fofs\n");
> + MSG(0, " i_ext.blk_addr: inject inode i_ext.blk_addr\n");
> + MSG(0, " i_ext.len: inject inode i_ext.len\n");
> MSG(0, " i_extra_isize: inject inode i_extra_isize\n");
> + MSG(0, " i_inline_xattr_size: inject inode i_inline_xattr_size\n");
> MSG(0, " i_inode_checksum: inject inode i_inode_checksum\n");
> + MSG(0, " i_compr_blocks: inject inode i_compr_blocks\n");
> MSG(0, " i_addr: inject inode i_addr array selected by --idx <index>\n");
> MSG(0, " i_nid: inject inode i_nid array selected by --idx <index>\n");
> MSG(0, " addr: inject {in}direct node nid/addr array selected by --idx <index>\n");
> @@ -967,16 +972,39 @@ static int inject_inode(struct f2fs_sb_info *sbi, struct f2fs_node *node,
> MSG(0, "Info: inject inode i_blocks of nid %u: %"PRIu64" -> %"PRIu64"\n",
> opt->nid, le64_to_cpu(inode->i_blocks), (u64)opt->val);
> inode->i_blocks = cpu_to_le64((u64)opt->val);
> + } else if (!strcmp(opt->mb, "i_ext.fofs")) {
> + MSG(0, "Info: inject inode i_ext.fofs of nid %u: %u -> %u\n",
> + opt->nid, le32_to_cpu(inode->i_ext.fofs), (u32)opt->val);
> + inode->i_ext.fofs = cpu_to_le32((u32)opt->val);
> + } else if (!strcmp(opt->mb, "i_ext.blk_addr")) {
> + MSG(0, "Info: inject inode i_ext.blk_addr of nid %u: "
> + "0x%x -> 0x%x\n", opt->nid,
> + le32_to_cpu(inode->i_ext.blk_addr), (u32)opt->val);
> + inode->i_ext.blk_addr = cpu_to_le32((u32)opt->val);
> + } else if (!strcmp(opt->mb, "i_ext.len")) {
> + MSG(0, "Info: inject inode i_ext.len of nid %u: %u -> %u\n",
> + opt->nid, le32_to_cpu(inode->i_ext.len), (u32)opt->val);
> + inode->i_ext.len = cpu_to_le32((u32)opt->val);
> } else if (!strcmp(opt->mb, "i_extra_isize")) {
> /* do not care if F2FS_EXTRA_ATTR is enabled */
> MSG(0, "Info: inject inode i_extra_isize of nid %u: %d -> %d\n",
> opt->nid, le16_to_cpu(inode->i_extra_isize), (u16)opt->val);
> inode->i_extra_isize = cpu_to_le16((u16)opt->val);
> + } else if (!strcmp(opt->mb, "i_inline_xattr_size")) {
> + MSG(0, "Info: inject inode i_inline_xattr_size of nid %u: "
> + "%d -> %d\n", opt->nid,
> + le16_to_cpu(inode->i_inline_xattr_size), (u16)opt->val);
> + inode->i_inline_xattr_size = cpu_to_le16((u16)opt->val);
> } else if (!strcmp(opt->mb, "i_inode_checksum")) {
> MSG(0, "Info: inject inode i_inode_checksum of nid %u: "
> "0x%x -> 0x%x\n", opt->nid,
> le32_to_cpu(inode->i_inode_checksum), (u32)opt->val);
> inode->i_inode_checksum = cpu_to_le32((u32)opt->val);
> + } else if (!strcmp(opt->mb, "i_compr_blocks")) {
> + MSG(0, "Info: inject inode i_compr_blocks of nid %u: "
> + "%lu -> %lu\n", opt->nid,
%llu -> %llu
> + le64_to_cpu(inode->i_compr_blocks), (u64)opt->val);
> + inode->i_compr_blocks = cpu_to_le64((u64)opt->val);
> } else if (!strcmp(opt->mb, "i_addr")) {
> /* do not care if it is inline data */
> if (opt->idx >= DEF_ADDRS_PER_INODE) {
> diff --git a/man/inject.f2fs.8 b/man/inject.f2fs.8
> index 5ae556015a79..72d1c90f7ce4 100644
> --- a/man/inject.f2fs.8
> +++ b/man/inject.f2fs.8
> @@ -145,7 +145,7 @@ summary entry ofs_in_node.
> .RE
> .TP
> .BI \-\-node
> -Inject node block specified by \fInid\P.
> +Inject node block specified by \fInid\fP.
> The available \fImb\fP of \fInode\fP are:
> .RS 1.2i
> .TP
> @@ -182,12 +182,27 @@ inode i_size.
> .BI i_blocks
> inode i_blocks.
> .TP
> +.BI i_ext.fofs
> +inode i_ext.fofs.
> +.TP
> +.BI i_ext.blk_addr
> +inode i_ext.blk_addr.
> +.TP
> +.BI i_ext.len
> +inode i_ext.len.
> +.TP
> .BI i_extra_isize
> inode i_extra_isize.
> .TP
> +.BI i_inline_xattr_size
> +inode i_inline_xattr_size.
> +.TP
> .BI i_inode_checksum
> inode i_inode_checksum.
> .TP
> +.BI i_compr_blocks
> +inode i_compr_blocks.
> +.TP
> .BI i_addr
> inode i_addr array specified by \fIidx\fP.
> .TP
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2025-06-13 7:39 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 12:37 [f2fs-dev] [RFC PATCH v2 00/32] f2fs-tools: add testcases Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 01/32] fsck.f2fs: do not finish/reset zone if dry-run is true Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 02/32] f2fs-tools: add option N to answer no for all questions Sheng Yong
2025-06-11 9:22 ` Chao Yu via Linux-f2fs-devel
2025-06-11 9:36 ` Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 03/32] f2fs-tools: cleanup {nid|segno}_in_journal Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 04/32] fsck.f2fs: fix invalidate checkpoint Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 05/32] dump.f2fs: print more info Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 06/32] f2fs-tools: add and export lookup_sit_in_journal Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 07/32] inject.f2fs: fix injecting sit/nat in journal Sheng Yong
2025-06-11 11:42 ` Chao Yu via Linux-f2fs-devel
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 08/32] inject.f2fs: fix injection on zoned device Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 09/32] inject.f2fs: fix and cleanup parsing numeric options Sheng Yong
2025-06-13 6:08 ` Chao Yu via Linux-f2fs-devel
2025-06-16 1:49 ` Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 10/32] inject.f2fs: add members in inject_cp Sheng Yong
2025-06-13 7:30 ` Chao Yu via Linux-f2fs-devel
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 11/32] inject.f2fs: add member `feature' in inject_sb Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 12/32] inject.f2fs: add members in inject_node Sheng Yong
2025-06-13 7:38 ` Chao Yu via Linux-f2fs-devel [this message]
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 13/32] inject.f2fs: add member `filename' in inject_dentry Sheng Yong
2025-06-13 7:55 ` Chao Yu via Linux-f2fs-devel
2025-06-16 2:01 ` Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 14/32] tests: prepare helper scripts for testcases Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 15/32] tests: add fsck testcase of fixing bad super magic Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 16/32] tests: add fsck testcase of fixing errors recorded in sb Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 17/32] tests: add fsck testcase of fixing cp crc Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 18/32] tests: add fsck testcase of fixing nat entry with invalid ino Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 19/32] tests: add fsck testcase of fixing nat entry with invalid blkaddr Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 20/32] tests: add fsck testcase of fixing sit entry type Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 21/32] tests: add fsck testcase of fixing sit entry vblocks Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 22/32] tests: add fsck testcase of fixing sit entry valid_map Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 23/32] tests: add fsck testcase of fixing sum entry nid Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 24/32] tests: add fsck testcase of fixing sum footer type Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 25/32] tests: add fsck testcase of fixing sum entry ofs_in_node Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 26/32] tests: add fsck testcase of fixing inode invalid i_addr Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 27/32] tests: add fsck testcase of fixing dentry hash code Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 28/32] tests: add fsck testcase of fixing lost dots Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 29/32] tests: add fsck testcase of fixing duplicated dots Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 30/32] tests: add fsck testcase of fixing loop fsync dnodes Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 31/32] tests: add inject testcase of injecting META area Sheng Yong
2025-06-10 12:37 ` [f2fs-dev] [RFC PATCH v2 32/32] tests: add inject testcase of injecting node block Sheng Yong
2025-08-15 10:38 ` [f2fs-dev] [RFC PATCH v2 00/32] f2fs-tools: add testcases Chao Yu via Linux-f2fs-devel
2025-08-15 11:27 ` Sheng Yong
2025-08-16 7:04 ` Chao Yu via Linux-f2fs-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=025216b1-f33a-4851-aea3-669890bea056@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=shengyong1@xiaomi.com \
--cc=shengyong2021@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).