summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bkey.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-02-02 23:09:10 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:09:12 +0200
commit7a7d17b2f7c23c0891b0cbd13fafd3bc805b1b29 (patch)
treedc4c22912655b6b21e721d05baa07646cbf52396 /fs/bcachefs/bkey.h
parentbcachefs: Convert io paths for snapshots (diff)
downloadlinux-7a7d17b2f7c23c0891b0cbd13fafd3bc805b1b29.tar.xz
linux-7a7d17b2f7c23c0891b0cbd13fafd3bc805b1b29.zip
bcachefs: Whiteouts for snapshots
This patch adds KEY_TYPE_whiteout, a new type of whiteout for snapshots, when we're deleting and the key being deleted is in an ancestor snapshot - and updates the transaction update/commit path to use it. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/bkey.h')
-rw-r--r--fs/bcachefs/bkey.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/bkey.h b/fs/bcachefs/bkey.h
index 904ceb67a029..6a637a408a9f 100644
--- a/fs/bcachefs/bkey.h
+++ b/fs/bcachefs/bkey.h
@@ -63,7 +63,7 @@ static inline void set_bkey_val_bytes(struct bkey *k, unsigned bytes)
#define bkey_deleted(_k) ((_k)->type == KEY_TYPE_deleted)
#define bkey_whiteout(_k) \
- ((_k)->type == KEY_TYPE_deleted || (_k)->type == KEY_TYPE_discard)
+ ((_k)->type == KEY_TYPE_deleted || (_k)->type == KEY_TYPE_whiteout)
enum bkey_lr_packed {
BKEY_PACKED_BOTH,