summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bkey.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-26 04:36:56 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-05-12 19:42:19 -0400
commit52268aa18cb1560b4b7f91ba09369b11ce3b578c (patch)
tree2fe3484229f12d6bc43672724866a2b15e098da3 /fs/bcachefs/bkey.c
parente43c27cd5c4f2be64a19efc1761e2f25e466b24e (diff)
bcachefs: extents no longer require special handling for packing
Extent overwrite used to be handled differently, underneath the journaling layer and within the core btree code. This imposed restrictions on bkey packing/packed formats, which no longer apply. This patch deletes those restrictions. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey.c')
-rw-r--r--fs/bcachefs/bkey.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/bcachefs/bkey.c b/fs/bcachefs/bkey.c
index 0ee38d25c1d0..8e6ce2b09e4b 100644
--- a/fs/bcachefs/bkey.c
+++ b/fs/bcachefs/bkey.c
@@ -323,15 +323,6 @@ bool bch2_bkey_pack_key(struct bkey_packed *out, const struct bkey *in,
#define x(id, field) if (!set_inc_field(&state, id, in->field)) return false;
bkey_fields()
#undef x
-
- /*
- * Extents - we have to guarantee that if an extent is packed, a trimmed
- * version will also pack:
- */
- if (bkey_start_offset(in) <
- le64_to_cpu(format->field_offset[BKEY_FIELD_OFFSET]))
- return false;
-
pack_state_finish(&state, out);
out->u64s = format->key_u64s + in->u64s - BKEY_U64s;
out->format = KEY_FORMAT_LOCAL_BTREE;