From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "dm-devel@redhat.com" <dm-devel@redhat.com>,
Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH 04/12] dm-zoned: secondary superblock must reside on the same devices than primary superblock
Date: Mon, 25 May 2020 02:10:31 +0000 [thread overview]
Message-ID: <CY4PR04MB3751DACF536FC287B467D3FCE7B30@CY4PR04MB3751.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20200522153901.133375-5-hare@suse.de
On 2020/05/23 0:39, Hannes Reinecke wrote:
> The secondary superblock must reside on the same device than the
> primary superblock, so there's no need to re-calculate the device.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/md/dm-zoned-metadata.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
> index b70a988fa771..fdae4e0228e7 100644
> --- a/drivers/md/dm-zoned-metadata.c
> +++ b/drivers/md/dm-zoned-metadata.c
> @@ -1141,7 +1141,7 @@ static int dmz_lookup_secondary_sb(struct dmz_metadata *zmd)
> /* Bad first super block: search for the second one */
> zmd->sb[1].block = zmd->sb[0].block + zone_nr_blocks;
> zmd->sb[1].zone = xa_load(&zmd->zones, zone_id + 1);
> - zmd->sb[1].dev = dmz_zone_to_dev(zmd, zmd->sb[1].zone);
> + zmd->sb[1].dev = zmd->sb[0].dev;
> for (i = 1; i < zmd->nr_rnd_zones; i++) {
> if (dmz_read_sb(zmd, &zmd->sb[1], 1) != 0)
> break;
> @@ -1149,7 +1149,6 @@ static int dmz_lookup_secondary_sb(struct dmz_metadata *zmd)
> return 0;
> zmd->sb[1].block += zone_nr_blocks;
> zmd->sb[1].zone = dmz_get(zmd, zone_id + i);
> - zmd->sb[1].dev = dmz_zone_to_dev(zmd, zmd->sb[1].zone);
> }
>
> dmz_free_mblock(zmd, mblk);
> @@ -1272,7 +1271,7 @@ static int dmz_load_sb(struct dmz_metadata *zmd)
> zmd->sb[1].zone = dmz_get(zmd, zone_id);
> }
> zmd->sb[1].block = dmz_start_block(zmd, zmd->sb[1].zone);
> - zmd->sb[1].dev = dmz_zone_to_dev(zmd, zmd->sb[1].zone);
> + zmd->sb[1].dev = zmd->sb[0].dev;
> ret = dmz_get_sb(zmd, &zmd->sb[1], 1);
> } else
> ret = dmz_lookup_secondary_sb(zmd);
>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2020-05-25 2:10 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 15:38 [PATCH RFC 00/12] dm-zoned: multi-device support Hannes Reinecke
2020-05-22 15:38 ` [PATCH 01/12] dm-zoned: add debugging message for reading superblocks Hannes Reinecke
2020-05-25 1:54 ` Damien Le Moal
2020-05-22 15:38 ` [PATCH 02/12] dm-zoned: convert to xarray Hannes Reinecke
2020-05-25 2:01 ` Damien Le Moal
2020-05-25 7:40 ` Hannes Reinecke
2020-05-22 15:38 ` [PATCH 03/12] dm-zoned: use on-stack superblock for tertiary devices Hannes Reinecke
2020-05-25 2:09 ` Damien Le Moal
2020-05-25 7:41 ` Hannes Reinecke
2020-05-26 8:25 ` Hannes Reinecke
2020-05-26 8:48 ` Damien Le Moal
2020-05-22 15:38 ` [PATCH 04/12] dm-zoned: secondary superblock must reside on the same devices than primary superblock Hannes Reinecke
2020-05-25 2:10 ` Damien Le Moal [this message]
2020-05-22 15:38 ` [PATCH 05/12] dm-zoned: add device pointer to struct dm_zone Hannes Reinecke
2020-05-25 2:15 ` Damien Le Moal
2020-05-25 7:42 ` Hannes Reinecke
2020-05-22 15:38 ` [PATCH 06/12] dm-zoned: add metadata pointer to struct dmz_dev Hannes Reinecke
2020-05-25 2:17 ` Damien Le Moal
2020-05-22 15:38 ` [PATCH 07/12] dm-zoned: add a 'reserved' zone flag Hannes Reinecke
2020-05-25 2:18 ` Damien Le Moal
2020-05-22 15:38 ` [PATCH 08/12] dm-zoned: move random and sequential zones into struct dmz_dev Hannes Reinecke
2020-05-25 2:27 ` Damien Le Moal
2020-05-25 7:47 ` Hannes Reinecke
2020-05-22 15:38 ` [PATCH 09/12] dm-zoned: improve logging messages for reclaim Hannes Reinecke
2020-05-25 2:28 ` Damien Le Moal
2020-05-22 15:38 ` [PATCH 10/12] dm-zoned: support arbitrary number of devices Hannes Reinecke
2020-05-25 2:36 ` Damien Le Moal
2020-05-25 7:52 ` Hannes Reinecke
2020-05-25 8:22 ` Damien Le Moal
2020-05-22 15:39 ` [PATCH 11/12] dm-zoned: round-robin load balancer for reclaiming zones Hannes Reinecke
2020-05-25 2:42 ` Damien Le Moal
2020-05-25 7:53 ` Hannes Reinecke
2020-05-22 15:39 ` [PATCH 12/12] dm-zoned: per-device reclaim Hannes Reinecke
2020-05-25 2:46 ` Damien Le Moal
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=CY4PR04MB3751DACF536FC287B467D3FCE7B30@CY4PR04MB3751.namprd04.prod.outlook.com \
--to=damien.lemoal@wdc.com \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
--cc=snitzer@redhat.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.