From: WenRuo Qu <wqu@suse.com>
To: "dsterba@suse.cz" <dsterba@suse.cz>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v1.1 1/3] btrfs: tree-checker: Add EXTENT_ITEM and METADATA_ITEM check
Date: Thu, 8 Aug 2019 23:55:37 +0000 [thread overview]
Message-ID: <23a97139-f304-5e01-6d42-5a05d9f5b62b@suse.com> (raw)
In-Reply-To: <20190808145407.GA8267@twin.jikos.cz>
On 2019/8/8 下午10:54, David Sterba wrote:
> On Wed, Aug 07, 2019 at 10:08:41PM +0800, Qu Wenruo wrote:
>> +
>> +static int check_extent_item(struct extent_buffer *leaf,
>> + struct btrfs_key *key, int slot)
>> +{
>> + struct btrfs_fs_info *fs_info = leaf->fs_info;
>> + struct btrfs_extent_item *ei;
>> + bool is_tree_block = false;
>> + u64 ptr; /* Current pointer inside inline refs */
>
> While u64 is wide enough, I suggest to use unsigned long as the
> intermediate type for pointer conversions.
In fact, we only need u32 for pointer.
(u16 is enough for 0~64k-1 but I'm not sure if we would use 64K as offset)
So regular unsigned int should be enough?
Thanks,
Qu
next prev parent reply other threads:[~2019-08-08 23:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 14:08 [PATCH v1.1 0/3] btrfs: tree-checker: Add extent items check Qu Wenruo
2019-08-07 14:08 ` [PATCH v1.1 1/3] btrfs: tree-checker: Add EXTENT_ITEM and METADATA_ITEM check Qu Wenruo
2019-08-08 14:54 ` David Sterba
2019-08-08 23:55 ` WenRuo Qu [this message]
2019-08-09 13:34 ` David Sterba
2019-08-07 14:08 ` [PATCH v1.1 2/3] btrfs: tree-checker: Add simple keyed refs check Qu Wenruo
2019-08-07 14:08 ` [PATCH v1.1 3/3] btrfs: tree-checker: Add EXTENT_DATA_REF check Qu Wenruo
2019-08-08 14:59 ` David Sterba
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=23a97139-f304-5e01-6d42-5a05d9f5b62b@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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).