Commit 29f0ef87 authored by Mike Snitzer's avatar Mike Snitzer

dm vdo block-map: optimize enter_zone_read_only_mode

Rather than incrementally dequeue from the zone->flush_waiters
vdo_wait_queue, simply re-initialize it.
Reviewed-by: default avatarKen Raeburn <raeburn@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
parent e752e5c3
...@@ -641,12 +641,10 @@ static void enter_zone_read_only_mode(struct block_map_zone *zone, int result) ...@@ -641,12 +641,10 @@ static void enter_zone_read_only_mode(struct block_map_zone *zone, int result)
vdo_enter_read_only_mode(zone->block_map->vdo, result); vdo_enter_read_only_mode(zone->block_map->vdo, result);
/* /*
* We are in read-only mode, so we won't ever write any page out. Just take all waiters off * We are in read-only mode, so we won't ever write any page out.
* the queue so the zone can drain. * Just take all waiters off the waitq so the zone can drain.
*/ */
while (vdo_waitq_has_waiters(&zone->flush_waiters)) vdo_waitq_init(&zone->flush_waiters);
vdo_waitq_dequeue_next_waiter(&zone->flush_waiters);
check_for_drain_complete(zone); check_for_drain_complete(zone);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment