diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-28 19:26:23 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-28 22:58:22 -0500 |
commit | 2111f39459b0b2ec54859b756c625edb0befce0e (patch) | |
tree | adc7b59971ed23c41e414ab66f114c45e9652897 /fs/bcachefs/btree_gc.c | |
parent | ef0beeb8dd343a57cf8ad4967b508b8e7452f347 (diff) |
bcachefs: Fix race between btree writes and metadata drop
btree writes update the btree node key after every write, in order to
update sectors_written, and they also might need to drop pointers if one
of the writes failed in a replicated btree node.
But the btree node might also have had a pointer dropped while the write
was in flight, by bch2_dev_metadata_drop(), and thus there was a bug
where the btree node write would ovewrite the btree node's key with what
it had at the start of the write.
Fix this by dropping pointers not currently in the btree node key.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_gc.c')
0 files changed, 0 insertions, 0 deletions