linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Sheng Yong <shengyong2021@gmail.com>
To: Chao Yu <chao@kernel.org>, jaegeuk@kernel.org
Cc: shengyong1@xiaomi.com, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] inject.f2fs: support inject inode.i_xattr_nid
Date: Mon, 11 Aug 2025 19:39:59 +0800	[thread overview]
Message-ID: <7337b81c-3c94-4e61-ac95-3cf700baa30d@gmail.com> (raw)
In-Reply-To: <20250811094705.1054251-1-chao@kernel.org>

On 8/11/25 17:47, Chao Yu via Linux-f2fs-devel wrote:
> Support to inject .i_xattr_nid on inode node.
> 
> Cc: Sheng Yong <shengyong1@xiaomi.com>
> Signed-off-by: Chao Yu <chao@kernel.org>

It looks good to me. Thanks!

Reviewed-by: Sheng Yong <shengyong1@xiaomi.com>

> ---
>   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 bd6ab84..b291d9d 100644
> --- a/fsck/inject.c
> +++ b/fsck/inject.c
> @@ -192,6 +192,7 @@ 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_xattr_nid: inject inode i_xattr_nid\n");
>   	MSG(0, "  i_extra_isize: inject inode i_extra_isize\n");
>   	MSG(0, "  i_inode_checksum: inject inode i_inode_checksum\n");
>   	MSG(0, "  i_addr: inject inode i_addr array selected by --idx <index>\n");
> @@ -794,6 +795,10 @@ 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_xattr_nid")) {
> +		MSG(0, "Info: inject inode i_xattr_nid of nid %u: %u -> %u\n",
> +		    opt->nid, le32_to_cpu(inode->i_xattr_nid), (u32)opt->val);
> +		inode->i_xattr_nid = 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",
> diff --git a/man/inject.f2fs.8 b/man/inject.f2fs.8
> index 01d58ef..65ac658 100644
> --- a/man/inject.f2fs.8
> +++ b/man/inject.f2fs.8
> @@ -170,6 +170,9 @@ inode i_size.
>   .BI i_blocks
>   inode i_blocks.
>   .TP
> +.BI i_xattr_nid
> +inode i_xattr_nid.
> +.TP
>   .BI i_extra_isize
>   inode i_extra_isize.
>   .TP



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

      reply	other threads:[~2025-08-11 11:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11  9:47 [f2fs-dev] [PATCH] inject.f2fs: support inject inode.i_xattr_nid Chao Yu via Linux-f2fs-devel
2025-08-11 11:39 ` Sheng Yong [this message]

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=7337b81c-3c94-4e61-ac95-3cf700baa30d@gmail.com \
    --to=shengyong2021@gmail.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=shengyong1@xiaomi.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).