All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: linux-btrfs@vger.kernel.org, dsterba@suse.com,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] btrfs: zoned: use sector_t to get zone sectors
Date: Thu, 4 Mar 2021 15:30:35 +0100	[thread overview]
Message-ID: <20210304143034.GQ7604@twin.jikos.cz> (raw)
In-Reply-To: <8068e2e54817aff858207101677e442a21eb10e3.1614760899.git.naohiro.aota@wdc.com>

On Wed, Mar 03, 2021 at 05:55:46PM +0900, Naohiro Aota wrote:
> We need to use sector_t for zone_sectors, or it set the zone size = 0 when
> the size >= 4GB (=  2^24 sectors) by shifting the zone_sectors value by
> SECTOR_SHIFT.

This does not fix the same bug in btrfs_sb_log_location_bdev.

> Fixes: 5b316468983d ("btrfs: get zone information of zoned block devices")
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
> ---
>  fs/btrfs/zoned.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index 9a5cf153da89..1324bb6c3946 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -269,7 +269,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)
>  	sector_t sector = 0;
>  	struct blk_zone *zones = NULL;
>  	unsigned int i, nreported = 0, nr_zones;
> -	unsigned int zone_sectors;
> +	sector_t zone_sectors;
>  	char *model, *emulated;
>  	int ret;
>  
> -- 
> 2.30.1

  reply	other threads:[~2021-03-04 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03  8:55 [PATCH v2 0/3] Fixes for zoned mode Naohiro Aota
2021-03-03  8:55 ` [PATCH v2 1/3] btrfs: zoned: use sector_t to get zone sectors Naohiro Aota
2021-03-04 14:30   ` David Sterba [this message]
2021-03-03  8:55 ` [PATCH v2 2/3] btrfs: zoned: move superblock logging zone location Naohiro Aota
2021-03-04 15:14   ` David Sterba
2021-03-04 23:00     ` Damien Le Moal
2021-03-03  8:55 ` [PATCH v2 3/3] btrfs: zoned: do not account freed region of read-only block group as zone_unusable Naohiro Aota
2021-03-04 13:54 ` [PATCH v2 0/3] Fixes for zoned mode Johannes Thumshirn

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=20210304143034.GQ7604@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=naohiro.aota@wdc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.