diff options
author | Hannes Reinecke <hare@suse.de> | 2020-05-11 10:24:29 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-05-20 21:47:31 +0200 |
commit | dc076c838f65723325001c977b39e55fc6ba0fa7 (patch) | |
tree | d774b34d38304e3602202ff7a1e746f121929e01 /drivers/md/dm-zoned-metadata.c | |
parent | dm zoned: Reduce logging output on startup (diff) | |
download | linux-dc076c838f65723325001c977b39e55fc6ba0fa7.tar.xz linux-dc076c838f65723325001c977b39e55fc6ba0fa7.zip |
dm zoned: ignore metadata zone in dmz_alloc_zone()
When looking up zones in dmz_alloc_zone() we need to ignore
metadata zones so as not to accidentally overwrite metadata.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-zoned-metadata.c')
-rw-r--r-- | drivers/md/dm-zoned-metadata.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 1290728c197e..939deed1606a 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -1907,7 +1907,13 @@ again: zone = NULL; goto again; } + if (dmz_is_meta(zone)) { + struct dmz_dev *dev = dmz_zone_to_dev(zmd, zone); + dmz_dev_warn(dev, "Zone %u has metadata", zone->id); + zone = NULL; + goto again; + } return zone; } |