diff options
author | Hannes Reinecke <hare@suse.de> | 2020-05-19 10:14:23 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-05-20 17:09:52 -0400 |
commit | a16b7dee302d2040d9e1fedff2161d1aceda0e8c (patch) | |
tree | 1515146f96d66caa920ab522ac15dd71daabe89f /drivers/md/dm-zoned-metadata.c | |
parent | c5c7885952927384837a070793698d996cb0fbf3 (diff) | |
download | lwn-a16b7dee302d2040d9e1fedff2161d1aceda0e8c.tar.gz lwn-a16b7dee302d2040d9e1fedff2161d1aceda0e8c.zip |
dm zoned: terminate reclaim on congestion
When dmz_get_chunk_mapping() selects a zone which is under reclaim
we should terminate the reclaim copy process. Since we're changing
the zone itself, reclaim needs to run afterwards again anyway.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index b5fd67eff046..db0dc2b5d44d 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -1851,7 +1851,9 @@ static void dmz_wait_for_reclaim(struct dmz_metadata *zmd, struct dm_zone *zone) { dmz_unlock_map(zmd); dmz_unlock_metadata(zmd); + set_bit(DMZ_RECLAIM_TERMINATE, &zone->flags); wait_on_bit_timeout(&zone->flags, DMZ_RECLAIM, TASK_UNINTERRUPTIBLE, HZ); + clear_bit(DMZ_RECLAIM_TERMINATE, &zone->flags); dmz_lock_metadata(zmd); dmz_lock_map(zmd); } |