diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-01-09 20:43:58 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:34 -0400 |
commit | d98a5e39452e08d4d51c2240b0711ea86a62de6d (patch) | |
tree | 10cf6c5ac7c06cbc8d14eb0666c343a0e3a8e196 /fs/bcachefs/btree_types.h | |
parent | ae54c4539b3cf8d2c7f96b3731b4d0c171416087 (diff) | |
download | linux-stable-d98a5e39452e08d4d51c2240b0711ea86a62de6d.tar.gz linux-stable-d98a5e39452e08d4d51c2240b0711ea86a62de6d.tar.bz2 linux-stable-d98a5e39452e08d4d51c2240b0711ea86a62de6d.zip |
bcachefs: Add some comments for btree iterator flags
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_types.h')
-rw-r--r-- | fs/bcachefs/btree_types.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h index 3951933db5d6..85d4a6d2f7e9 100644 --- a/fs/bcachefs/btree_types.h +++ b/fs/bcachefs/btree_types.h @@ -187,9 +187,25 @@ enum btree_iter_type { #define BTREE_ITER_TYPE ((1 << 2) - 1) +/* + * Iterate over all possible positions, synthesizing deleted keys for holes: + */ #define BTREE_ITER_SLOTS (1 << 2) +/* + * Indicates that intent locks should be taken on leaf nodes, because we expect + * to be doing updates: + */ #define BTREE_ITER_INTENT (1 << 3) +/* + * Causes the btree iterator code to prefetch additional btree nodes from disk: + */ #define BTREE_ITER_PREFETCH (1 << 4) +/* + * Indicates that this iterator should not be reused until transaction commit, + * either because a pending update references it or because the update depends + * on that particular key being locked (e.g. by the str_hash code, for hash + * table consistency) + */ #define BTREE_ITER_KEEP_UNTIL_COMMIT (1 << 5) /* * Used in bch2_btree_iter_traverse(), to indicate whether we're searching for |