diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-01-07 19:49:15 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-01-08 21:33:27 -0500 |
commit | f39f0bde7875aceb3e82a330f3a86223c6dd8af4 (patch) | |
tree | 06f46528e9c5ac2f472699c8b857fee11b37b0f1 /libbcachefs/movinggc.c | |
parent | 41dc1733f12fab96df2089d7c62036a880891010 (diff) |
Update bcachefs sources to fcf8a0889c bcachefs: bch2_alloc_write() should be writing for all devices
Diffstat (limited to 'libbcachefs/movinggc.c')
-rw-r--r-- | libbcachefs/movinggc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libbcachefs/movinggc.c b/libbcachefs/movinggc.c index 2c5daed5..efa7f38e 100644 --- a/libbcachefs/movinggc.c +++ b/libbcachefs/movinggc.c @@ -200,6 +200,11 @@ static int bch2_copygc(struct bch_fs *c) return -1; } + /* + * Our btree node allocations also come out of RESERVE_MOVINGGC: + */ + sectors_to_move = (sectors_to_move * 3) / 4; + for (i = h->data; i < h->data + h->used; i++) sectors_to_move += i->sectors * i->replicas; |