1
0
Fork 0

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>
alistair/sunxi64-5.8
Hannes Reinecke 2020-05-11 10:24:29 +02:00 committed by Mike Snitzer
parent ae3c1f1171
commit dc076c838f
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}