diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-01-06 13:49:52 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-01-06 13:49:52 -0500 |
commit | ab2f1ec24f5307b0cf1e3c4ad19bf350d9f54d9f (patch) | |
tree | f330335854e739590c3df1b322304c47ba0611f7 | |
parent | 304691592738dc272f4150107b54a53ab43fc8be (diff) |
Update bcachefs sources to d763e8ab17 bcachefs: Don't lose needs_whiteout in overwrite path
-rw-r--r-- | .bcachefs_revision | 2 | ||||
-rw-r--r-- | libbcachefs/btree_update_leaf.c | 5 | ||||
-rw-r--r-- | libbcachefs/extents.c | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/.bcachefs_revision b/.bcachefs_revision index dd64f873..fba12e90 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -c9eb15545dce4f5490371afb92033082600473fe +d763e8ab17ff1f5bdd9c5474ac15eb8791d31582 diff --git a/libbcachefs/btree_update_leaf.c b/libbcachefs/btree_update_leaf.c index d05ed96c..dfbe5dcd 100644 --- a/libbcachefs/btree_update_leaf.c +++ b/libbcachefs/btree_update_leaf.c @@ -99,13 +99,14 @@ bool bch2_btree_bset_insert_key(struct btree_iter *iter, } + insert->k.needs_whiteout = k->needs_whiteout; + k->needs_whiteout = false; + if (k >= btree_bset_last(b)->start) { clobber_u64s = k->u64s; goto overwrite; } - insert->k.needs_whiteout = k->needs_whiteout; - k->needs_whiteout = false; k->type = KEY_TYPE_deleted; /* * XXX: we should be able to do this without two calls to diff --git a/libbcachefs/extents.c b/libbcachefs/extents.c index ca208b06..c4b0b9e1 100644 --- a/libbcachefs/extents.c +++ b/libbcachefs/extents.c @@ -228,7 +228,8 @@ void bch2_extent_debugcheck(struct bch_fs *c, struct bkey_s_c k) struct extent_ptr_decoded p; char buf[160]; - if (!test_bit(BCH_FS_INITIAL_GC_DONE, &c->flags)) + if (!test_bit(JOURNAL_REPLAY_DONE, &c->journal.flags) || + !test_bit(BCH_FS_INITIAL_GC_DONE, &c->flags)) return; if (!percpu_down_read_trylock(&c->mark_lock)) |