From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] btrfs: tree-checker: Add check for INODE_REF
Date: Mon, 23 Sep 2019 17:47:14 +0200 [thread overview]
Message-ID: <20190923154714.GI2751@twin.jikos.cz> (raw)
In-Reply-To: <20190826074039.28517-3-wqu@suse.com>
On Mon, Aug 26, 2019 at 03:40:39PM +0800, Qu Wenruo wrote:
> For INODE_REF we will check:
> - Objectid (ino) against previous key
> To detect missing INODE_ITEM.
>
> - No overflow/padding in the data payload
> Much like DIR_ITEM, but with less members to check.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> fs/btrfs/tree-checker.c | 53 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
> index 636ce1b4566e..3ce447eb591c 100644
> --- a/fs/btrfs/tree-checker.c
> +++ b/fs/btrfs/tree-checker.c
> @@ -842,6 +842,56 @@ static int check_inode_item(struct extent_buffer *leaf,
> return 0;
> }
>
> +#define inode_ref_err(fs_info, eb, slot, fmt, ...) \
> + inode_item_err(fs_info, eb, slot, fmt, __VA_ARGS__)
I've changed that to
#define inode_ref_err(fs_info, eb, slot, fmt, args...) \
inode_item_err(fs_info, eb, slot, fmt, ##args)
as this is the common style for the variable macro args used in btrfs.
prev parent reply other threads:[~2019-09-23 15:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 7:40 [PATCH 0/2] btrfs: tree-checker: Add checks to detect missing INODE_ITEM Qu Wenruo
2019-08-26 7:40 ` [PATCH 1/2] btrfs: tree-checker: Try " Qu Wenruo
2019-08-26 11:46 ` Nikolay Borisov
2019-08-26 7:40 ` [PATCH 2/2] btrfs: tree-checker: Add check for INODE_REF Qu Wenruo
2019-08-26 11:45 ` Nikolay Borisov
2019-08-26 11:50 ` Qu Wenruo
2019-09-23 15:45 ` David Sterba
2019-09-23 15:47 ` 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=20190923154714.GI2751@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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).