summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/reflink.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-28 08:17:18 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-06 05:24:46 +0100
commitf5d4481c3edddf759e21e18751c168de879e3471 (patch)
tree4cf2e703d6e8ae368814473d6d4a24b06e5e5c3a /fs/bcachefs/reflink.c
parentbcachefs: fix simulateously upgrading & downgrading (diff)
downloadlinux-f5d4481c3edddf759e21e18751c168de879e3471.tar.xz
linux-f5d4481c3edddf759e21e18751c168de879e3471.zip
bcachefs: move "ptrs not changing" optimization to bch2_trigger_extent()
This is useful for btree ptrs as well, when we're just updating sectors_written. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/reflink.c')
-rw-r--r--fs/bcachefs/reflink.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c
index b24b71bc4e60..faa5d3670058 100644
--- a/fs/bcachefs/reflink.c
+++ b/fs/bcachefs/reflink.c
@@ -301,14 +301,6 @@ int bch2_trans_mark_reflink_v(struct btree_trans *trans,
(flags & BTREE_TRIGGER_INSERT))
check_indirect_extent_deleting(new, &flags);
- if (old.k->type == KEY_TYPE_reflink_v &&
- new.k->type == KEY_TYPE_reflink_v &&
- old.k->u64s == new.k->u64s &&
- !memcmp(bkey_s_c_to_reflink_v(old).v->start,
- bkey_s_to_reflink_v(new).v->start,
- bkey_val_bytes(new.k) - 8))
- return 0;
-
return bch2_trigger_extent(trans, btree_id, level, old, new, flags);
}