dm cache policy smq: be more aggressive about triggering a writeback
authorJoe Thornber <ejt@redhat.com>
Thu, 11 May 2017 09:09:38 +0000 (05:09 -0400)
committerMike Snitzer <snitzer@redhat.com>
Mon, 15 May 2017 01:54:32 +0000 (21:54 -0400)
If there are no clean entries to demote we really want to writeback
immediately.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-policy-smq.c

index a177559f2049fc24afb2fcf2a92e2ab10d7ebec4..5aa8f43856c515720d0d3cc5a6b9aa2157186aba 100644 (file)
@@ -1192,7 +1192,7 @@ static void queue_demotion(struct smq_policy *mq)
 
        e = q_peek(&mq->clean, mq->clean.nr_levels / 2, true);
        if (!e) {
-               if (!clean_target_met(mq, false))
+               if (!clean_target_met(mq, true))
                        queue_writeback(mq);
                return;
        }