diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-17 00:39:12 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:53 -0400 |
commit | 19d6521964ed0439a7a03776d8cf0451afb63c1d (patch) | |
tree | 45fa4b95c444911f1df7580d147fe864c8ac432f /fs/bcachefs/subvolume.c | |
parent | 2ffe3ad62dafac036c523204c6e2e2f39b23cb6f (diff) | |
download | linux-19d6521964ed0439a7a03776d8cf0451afb63c1d.tar.gz linux-19d6521964ed0439a7a03776d8cf0451afb63c1d.tar.bz2 linux-19d6521964ed0439a7a03776d8cf0451afb63c1d.zip |
bcachefs: bch2_mark_snapshot() now called like other triggers
This fixes a bug where bch2_mark_snapshot() wasn't called for existing
snapshot nodes being updated when child nodes were added.
This led to the data update path thinking the key being updated was for
a snapshot that didn't have children, causing it to fail to insert
whiteouts when splitting existing extents.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/subvolume.c')
-rw-r--r-- | fs/bcachefs/subvolume.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c index 1805c8542d65..ba281104eb30 100644 --- a/fs/bcachefs/subvolume.c +++ b/fs/bcachefs/subvolume.c @@ -512,8 +512,7 @@ int bch2_snapshot_node_create(struct btree_trans *trans, u32 parent, n->v.pad = 0; SET_BCH_SNAPSHOT_SUBVOL(&n->v, true); - ret = bch2_trans_update(trans, &iter, &n->k_i, 0) ?: - bch2_mark_snapshot(trans, bkey_s_c_null, bkey_i_to_s_c(&n->k_i), 0); + ret = bch2_trans_update(trans, &iter, &n->k_i, 0); if (ret) goto err; |