summaryrefslogtreecommitdiff
path: root/libbcachefs/io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-10-12 14:55:27 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2018-10-12 15:10:26 -0400
commit55fbb25501330038e1714905b9ddeb25d875c11c (patch)
treececfd15e26bfd60d95eea8a373e42337239e7c8c /libbcachefs/io.c
parent0268bec14bcf64b25b5dd75a470be8e85cbe676d (diff)
Update bcachefs sources to d7f6da1d60 bcachefs: fix missing include
Diffstat (limited to 'libbcachefs/io.c')
-rw-r--r--libbcachefs/io.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/libbcachefs/io.c b/libbcachefs/io.c
index 5ca2a2d..021a80d 100644
--- a/libbcachefs/io.c
+++ b/libbcachefs/io.c
@@ -6,7 +6,7 @@
*/
#include "bcachefs.h"
-#include "alloc.h"
+#include "alloc_foreground.h"
#include "bset.h"
#include "btree_update.h"
#include "buckets.h"
@@ -352,7 +352,7 @@ static void __bch2_write_index(struct bch_write_op *op)
}
}
out:
- bch2_open_bucket_put_refs(c, &op->open_buckets_nr, op->open_buckets);
+ bch2_open_buckets_put(c, &op->open_buckets);
return;
err:
keys->top = keys->keys;
@@ -798,8 +798,8 @@ static void __bch2_write(struct closure *cl)
again:
do {
/* +1 for possible cache device: */
- if (op->open_buckets_nr + op->nr_replicas + 1 >
- ARRAY_SIZE(op->open_buckets))
+ if (op->open_buckets.nr + op->nr_replicas + 1 >
+ ARRAY_SIZE(op->open_buckets.v))
goto flush_io;
if (bch2_keylist_realloc(&op->insert_keys,
@@ -830,11 +830,7 @@ again:
ret = bch2_write_extent(op, wp);
- BUG_ON(op->open_buckets_nr + wp->nr_ptrs - wp->first_ptr >
- ARRAY_SIZE(op->open_buckets));
- bch2_open_bucket_get(c, wp,
- &op->open_buckets_nr,
- op->open_buckets);
+ bch2_open_bucket_get(c, wp, &op->open_buckets);
bch2_alloc_sectors_done(c, wp);
if (ret < 0)