summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.h
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-02-10 16:18:09 -0800
committerShaohua Li <shli@fb.com>2017-02-13 09:20:05 -0800
commite33fbb9cc73d6502e69eaf1c178e0c39059763ea (patch)
tree3a75c9e524eab2facb854a41e970dfb86fc538c1 /drivers/md/raid5.h
parente8fd52eec2cd25b917983b3f3aa738b722522376 (diff)
downloadop-kernel-dev-e33fbb9cc73d6502e69eaf1c178e0c39059763ea.zip
op-kernel-dev-e33fbb9cc73d6502e69eaf1c178e0c39059763ea.tar.gz
md/raid5-cache: exclude reclaiming stripes in reclaim check
stripes which are being reclaimed are still accounted into cached stripes. The reclaim takes time. r5c_do_reclaim isn't aware of the stripes and does unnecessary stripe reclaim. In practice, I saw one stripe is reclaimed one time. This will cause bad IO pattern. Fixing this by excluding the reclaing stripes in the check. Cc: Song Liu <songliubraving@fb.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r--drivers/md/raid5.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index c0687df..4bb27b9 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -663,6 +663,8 @@ struct r5conf {
struct list_head r5c_full_stripe_list;
atomic_t r5c_cached_partial_stripes;
struct list_head r5c_partial_stripe_list;
+ atomic_t r5c_flushing_full_stripes;
+ atomic_t r5c_flushing_partial_stripes;
atomic_t empty_inactive_list_nr;
struct llist_head released_stripes;
OpenPOWER on IntegriCloud