From 79f88eba01b1aafdec1fbf453954f5cd00dd56c1 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 20 Feb 2021 19:09:53 -0500 Subject: bcachefs: Rename KEY_TYPE_whiteout -> KEY_TYPE_hash_whiteout Snapshots are going to need a different whiteout key type. Also, switch to using BCH_BKEY_TYPES() to define the bkey value accessors. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/str_hash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/bcachefs/str_hash.h') diff --git a/fs/bcachefs/str_hash.h b/fs/bcachefs/str_hash.h index f6b694b9346b..952b146af750 100644 --- a/fs/bcachefs/str_hash.h +++ b/fs/bcachefs/str_hash.h @@ -156,7 +156,7 @@ bch2_hash_lookup(struct btree_trans *trans, if (k.k->type == desc.key_type) { if (!desc.cmp_key(k, key)) return iter; - } else if (k.k->type == KEY_TYPE_whiteout) { + } else if (k.k->type == KEY_TYPE_hash_whiteout) { ; } else { /* hole, not found */ @@ -210,7 +210,7 @@ int bch2_hash_needs_whiteout(struct btree_trans *trans, for_each_btree_key_continue(iter, BTREE_ITER_SLOTS, k, ret) { if (k.k->type != desc.key_type && - k.k->type != KEY_TYPE_whiteout) + k.k->type != KEY_TYPE_hash_whiteout) break; if (k.k->type == desc.key_type && @@ -254,7 +254,7 @@ int bch2_hash_set(struct btree_trans *trans, !(flags & BCH_HASH_SET_MUST_REPLACE)) slot = bch2_trans_copy_iter(trans, iter); - if (k.k->type != KEY_TYPE_whiteout) + if (k.k->type != KEY_TYPE_hash_whiteout) goto not_found; } @@ -303,7 +303,7 @@ int bch2_hash_delete_at(struct btree_trans *trans, bkey_init(&delete->k); delete->k.p = iter->pos; - delete->k.type = ret ? KEY_TYPE_whiteout : KEY_TYPE_deleted; + delete->k.type = ret ? KEY_TYPE_hash_whiteout : KEY_TYPE_deleted; bch2_trans_update(trans, iter, delete, 0); return 0; -- cgit v1.2.3