lkml.org 
[lkml]   [2019]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] bcache: use allocator reserves instead of watermarks
Date
Commit 78365411b344 ("bcache: Rework allocator reserves") introduced
allocator reserves and dropped watermarks, let's keep this consistent
to avoid confusing.

Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
---
drivers/md/bcache/alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index c22c260..609df38 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -622,13 +622,13 @@ bool bch_alloc_sectors(struct cache_set *c,
spin_lock(&c->data_bucket_lock);

while (!(b = pick_data_bucket(c, k, write_point, &alloc.key))) {
- unsigned int watermark = write_prio
+ unsigned int reserve = write_prio
? RESERVE_MOVINGGC
: RESERVE_NONE;

spin_unlock(&c->data_bucket_lock);

- if (bch_bucket_alloc_set(c, watermark, &alloc.key, 1, wait))
+ if (bch_bucket_alloc_set(c, reserve, &alloc.key, 1, wait))
return false;

spin_lock(&c->data_bucket_lock);
--
1.8.3.1


\
 
 \ /
  Last update: 2019-07-27 12:31    [W:0.043 / U:5.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site