diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-15 20:51:09 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:35 -0400 |
commit | a1783320d46e878ddf5d2bb3380c181d515a5ff3 (patch) | |
tree | 679a1d7df61a5b8431f3288888f9e01e63eea61b /fs/bcachefs/btree_iter.c | |
parent | 0d06b4eca687b3a6a07b62fd4ca83d635103c77f (diff) | |
download | lwn-a1783320d46e878ddf5d2bb3380c181d515a5ff3.tar.gz lwn-a1783320d46e878ddf5d2bb3380c181d515a5ff3.zip |
bcachefs: for_each_btree_key2()
This introduces two new macros for iterating through the btree, with
transaction restart handling
- for_each_btree_key2()
- for_each_btree_key_commit()
Every iteration is now in an implicit transaction, and - as with
lockrestart_do() and commit_do() - returning -EINTR will cause the
transaction to be restarted, at the same key.
This patch converts a bunch of code that was open coding this to these
new macros, saving a substantial amount of code.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
0 files changed, 0 insertions, 0 deletions