From: Hongbo Li <lihongbo22@huawei.com>
To: Youling Tang <youling.tang@linux.dev>,
Kent Overstreet <kent.overstreet@linux.dev>
Cc: <linux-bcachefs@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Youling Tang <tangyouling@kylinos.cn>
Subject: Re: [PATCH v2] bcachefs: Align the display format of `btrees/inodes/keys`
Date: Thu, 18 Apr 2024 09:09:45 +0800 [thread overview]
Message-ID: <bd0b9517-63d1-4a49-90fd-c68e66dd464a@huawei.com> (raw)
In-Reply-To: <20240418005055.45482-1-youling.tang@linux.dev>
On 2024/4/18 8:50, Youling Tang wrote:
> From: Youling Tang <tangyouling@kylinos.cn>
>
> Before patch:
> ```
> #cat btrees/inodes/keys
> u64s 17 type inode_v3 0:4096:U32_MAX len 0 ver 0: mode=40755
> flags= (16300000)
> bi_size=0
> ```
>
> After patch:
> ```
> #cat btrees/inodes/keys
> u64s 17 type inode_v3 0:4096:U32_MAX len 0 ver 0:
> mode=40755
> flags=(16300000)
> bi_size=0
> ```
>
> Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
> ---
> v2:
> - Adjust where to add new lines of code.
> - Remove flags ` ` by Hongbo suggestion.
>
> fs/bcachefs/inode.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c
> index f0da2b0048cc..5c9ee41baa72 100644
> --- a/fs/bcachefs/inode.c
> +++ b/fs/bcachefs/inode.c
> @@ -534,12 +534,13 @@ int bch2_inode_v3_invalid(struct bch_fs *c, struct bkey_s_c k,
> static void __bch2_inode_unpacked_to_text(struct printbuf *out,
> struct bch_inode_unpacked *inode)
> {
> + prt_printf(out, "\n");
> printbuf_indent_add(out, 2);
> prt_printf(out, "mode=%o\n", inode->bi_mode);
>
> prt_str(out, "flags=");
> prt_bitflags(out, bch2_inode_flag_strs, inode->bi_flags & ((1U << 20) - 1));
> - prt_printf(out, " (%x)\n", inode->bi_flags);
> + prt_printf(out, "(%x)\n", inode->bi_flags);
>
> prt_printf(out, "journal_seq=%llu\n", inode->bi_journal_seq);
> prt_printf(out, "bi_size=%llu\n", inode->bi_size);
Reviewed-by: Hongbo Li <lihongbo22@huawei.com>
Thanks.
Hongbo Li
prev parent reply other threads:[~2024-04-18 1:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 0:50 [PATCH v2] bcachefs: Align the display format of `btrees/inodes/keys` Youling Tang
2024-04-18 1:09 ` Hongbo Li [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=bd0b9517-63d1-4a49-90fd-c68e66dd464a@huawei.com \
--to=lihongbo22@huawei.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tangyouling@kylinos.cn \
--cc=youling.tang@linux.dev \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).