summaryrefslogtreecommitdiff
path: root/libbcache/btree_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcache/btree_io.c')
-rw-r--r--libbcache/btree_io.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbcache/btree_io.c b/libbcache/btree_io.c
index ff976b5..4c295af 100644
--- a/libbcache/btree_io.c
+++ b/libbcache/btree_io.c
@@ -200,7 +200,7 @@ static unsigned sort_extent_whiteouts(struct bkey_packed *dst,
const struct bkey_format *f = &iter->b->format;
struct bkey_packed *in, *out = dst;
struct bkey_i l, r;
- bool prev = false, l_packed;
+ bool prev = false, l_packed = false;
u64 max_packed_size = bkey_field_max(f, BKEY_FIELD_SIZE);
u64 max_packed_offset = bkey_field_max(f, BKEY_FIELD_OFFSET);
u64 new_size;
@@ -1443,8 +1443,9 @@ void __bch_btree_node_write(struct cache_set *c, struct btree *b,
* Make sure to update b->written so bch_btree_init_next() doesn't
* break:
*/
- if (bch_journal_error(&c->journal)) {
- set_btree_node_write_error(b);
+ if (bch_journal_error(&c->journal) ||
+ c->opts.nochanges) {
+ set_btree_node_noevict(b);
b->written += sectors_to_write;
btree_bounce_free(c, order, used_mempool, data);