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>
This commit is contained in:
parent
ae3c1f1171
commit
dc076c838f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue