From: Edmund Nadolski <enadolski@suse.de>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Cc: bo.li.liu@oracle.com
Subject: Re: [PATCH 1/3] btrfs: scrub: get rid of sector_t
Date: Fri, 6 Oct 2017 09:22:42 -0600 [thread overview]
Message-ID: <6c8e69c0-6abf-acc9-9ea5-687f33a50726@suse.de> (raw)
In-Reply-To: <9321364229bba40851c35fa63ba37c90ee1edf0a.1507292872.git.dsterba@suse.com>
On 10/06/2017 06:29 AM, David Sterba wrote:
> The use of sector_t is not necessry, it's just for a warning. Switch to
> u64 and rename the variable. The messages are adjusted as well.
>
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/scrub.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index e3f6c49e5c4d..34ea2e7048c2 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -231,7 +231,7 @@ struct scrub_warning {
> struct btrfs_path *path;
> u64 extent_item_size;
> const char *errstr;
> - sector_t sector;
> + u64 physical;
> u64 logical;
> struct btrfs_device *dev;
> };
Just a thought, 'physical' alone seems a bit ambiguous, so
a comment to add context would help clarify.
> @@ -797,10 +797,10 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 root,
> */
> for (i = 0; i < ipath->fspath->elem_cnt; ++i)
> btrfs_warn_in_rcu(fs_info,
> - "%s at logical %llu on dev %s, sector %llu, root %llu, inode %llu, offset %llu, length %llu, links %u (path: %s)",
> +"%s at logical %llu on dev %s, physical %llu, root %llu, inode %llu, offset %llu, length %llu, links %u (path: %s)",
> swarn->errstr, swarn->logical,
> rcu_str_deref(swarn->dev->name),
> - (unsigned long long)swarn->sector,
> + swarn->physical,
> root, inum, offset,
> min(isize - offset, (u64)PAGE_SIZE), nlink,
> (char *)(unsigned long)ipath->fspath->val[i]);
> @@ -813,7 +813,7 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 root,
> "%s at logical %llu on dev %s, sector %llu, root %llu, inode %llu, offset %llu: path resolving failed with ret=%d",
This still says 'sector' here but was changed for the other print strings.
> swarn->errstr, swarn->logical,
> rcu_str_deref(swarn->dev->name),
> - (unsigned long long)swarn->sector,
> + swarn->physical,
> root, inum, offset, ret);
>
> free_ipath(ipath);
> @@ -845,7 +845,7 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock)
> if (!path)
> return;
>
> - swarn.sector = (sblock->pagev[0]->physical) >> 9;
> + swarn.physical = sblock->pagev[0]->physical;
Dropping the '>> 9', so this is a semantic change in addition to the rename?
Thx,
Ed
next prev parent reply other threads:[~2017-10-06 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 12:29 [PATCH 0/3] Cleanup sector_t David Sterba
2017-10-06 12:29 ` [PATCH 1/3] btrfs: scrub: get rid of sector_t David Sterba
2017-10-06 15:22 ` Edmund Nadolski [this message]
2017-10-06 15:48 ` David Sterba
2017-10-07 0:15 ` Liu Bo
2017-10-06 12:29 ` [PATCH 2/3] btrfs: rename page offset parameter in submit_extent_page David Sterba
2017-10-07 0:11 ` Liu Bo
2017-10-06 12:30 ` [PATCH 3/3] btrfs: get rid of sector_t and use u64 offset " David Sterba
2017-10-07 0:21 ` Liu Bo
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=6c8e69c0-6abf-acc9-9ea5-687f33a50726@suse.de \
--to=enadolski@suse.de \
--cc=bo.li.liu@oracle.com \
--cc=dsterba@suse.com \
--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).