From: David Sterba <dsterba@suse.cz>
To: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Cc: boris@bur.io, linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs-progs: add print support for verity items.
Date: Thu, 24 Mar 2022 00:38:22 +0100 [thread overview]
Message-ID: <20220323233822.GG2237@twin.jikos.cz> (raw)
In-Reply-To: <20220323194504.1777182-1-sweettea-kernel@dorminy.me>
On Wed, Mar 23, 2022 at 03:45:05PM -0400, Sweet Tea Dorminy wrote:
> 'btrfs inspect-internals dump-tree' doesn't currently know about the two
> types of verity items and prints them as 'UNKNOWN.36' or 'UNKNOWN.37'.
> So add them to the known item types.
>
> Suggested-by: Boris Burkov <boris@bur.io>
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
>
> ---
>
> Inspired by Boris' recent patchset noting that these items were not yet
> properly printed:
> https://lore.kernel.org/linux-btrfs/5579a70597cd660ffb265db9e97840a1faca8812.1647382272.git.boris@bur.io/T/#u
>
> ---
>
> kernel-shared/ctree.h | 4 ++++
> kernel-shared/print-tree.c | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h
> index bf71fc85..b8d7e5a8 100644
> --- a/kernel-shared/ctree.h
> +++ b/kernel-shared/ctree.h
> @@ -1350,6 +1350,10 @@ static inline u32 BTRFS_MAX_XATTR_SIZE(const struct btrfs_fs_info *info)
> #define BTRFS_INODE_REF_KEY 12
> #define BTRFS_INODE_EXTREF_KEY 13
> #define BTRFS_XATTR_ITEM_KEY 24
> +
> +#define BTRFS_VERITY_DESC_ITEM_KEY 36
> +#define BTRFS_VERITY_MERKLE_ITEM_KEY 37
> +
> #define BTRFS_ORPHAN_ITEM_KEY 48
>
> #define BTRFS_DIR_LOG_ITEM_KEY 60
> diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
> index 73f969c3..ee7f679c 100644
> --- a/kernel-shared/print-tree.c
> +++ b/kernel-shared/print-tree.c
> @@ -647,6 +647,8 @@ void print_key_type(FILE *stream, u64 objectid, u8 type)
> [BTRFS_DIR_LOG_ITEM_KEY] = "DIR_LOG_ITEM",
> [BTRFS_DIR_LOG_INDEX_KEY] = "DIR_LOG_INDEX",
> [BTRFS_XATTR_ITEM_KEY] = "XATTR_ITEM",
> + [BTRFS_VERITY_DESC_ITEM_KEY] = "VERITY_DESC_ITEM",
> + [BTRFS_VERITY_MERKLE_ITEM_KEY = "VERITY_MERKLE_ITEM",
[CC] kernel-shared/print-tree.o
kernel-shared/print-tree.c: In function ‘print_key_type’:
kernel-shared/print-tree.c:650:49: error: lvalue required as left operand of assignment
650 | [BTRFS_VERITY_MERKLE_ITEM_KEY = "VERITY_MERKLE_ITEM",
| ^
kernel-shared/print-tree.c:650:71: error: expected ‘]’ before ‘,’ token
650 | [BTRFS_VERITY_MERKLE_ITEM_KEY = "VERITY_MERKLE_ITEM",
| ^
| ]
kernel-shared/print-tree.c:682:9: error: expected expression before ‘}’ token
682 | };
| ^
make: *** [Makefile:414: kernel-shared/print-tree.o] Error 1
prev parent reply other threads:[~2022-03-23 23:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 19:45 [PATCH] btrfs-progs: add print support for verity items Sweet Tea Dorminy
2022-03-23 20:11 ` Josef Bacik
2022-03-23 21:14 ` David Sterba
2022-03-23 23:38 ` David Sterba [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=20220323233822.GG2237@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=boris@bur.io \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sweettea-kernel@dorminy.me \
/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