diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-29 13:49:34 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:20 -0400 |
commit | d248ee5637d4cc7952e9e2ad5a6a9099b2d54c48 (patch) | |
tree | ea771f503657547c27ed1572ca9a532202204e6c /fs/bcachefs/tests.c | |
parent | 200472e91c6c6745e6ddf42d1b33265f84b26e68 (diff) | |
download | linux-d248ee5637d4cc7952e9e2ad5a6a9099b2d54c48.tar.gz linux-d248ee5637d4cc7952e9e2ad5a6a9099b2d54c48.tar.bz2 linux-d248ee5637d4cc7952e9e2ad5a6a9099b2d54c48.zip |
bcachefs: Add iter_flags arg to bch2_btree_delete_range()
Will be used by the new snapshot tests, to pass in
BTREE_ITER_ALL_SNAPSHOTS.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/tests.c')
-rw-r--r-- | fs/bcachefs/tests.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/bcachefs/tests.c b/fs/bcachefs/tests.c index 145b85320d22..0247309a25e6 100644 --- a/fs/bcachefs/tests.c +++ b/fs/bcachefs/tests.c @@ -14,14 +14,14 @@ static void delete_test_keys(struct bch_fs *c) int ret; ret = bch2_btree_delete_range(c, BTREE_ID_extents, - SPOS(0, 0, U32_MAX), - SPOS(0, U64_MAX, U32_MAX), + POS_MIN, SPOS_MAX, + BTREE_ITER_ALL_SNAPSHOTS, NULL); BUG_ON(ret); ret = bch2_btree_delete_range(c, BTREE_ID_xattrs, - SPOS(0, 0, U32_MAX), - SPOS(0, U64_MAX, U32_MAX), + POS_MIN, SPOS_MAX, + BTREE_ITER_ALL_SNAPSHOTS, NULL); BUG_ON(ret); } @@ -749,7 +749,9 @@ static int seq_delete(struct bch_fs *c, u64 nr) int ret; ret = bch2_btree_delete_range(c, BTREE_ID_xattrs, - SPOS(0, 0, U32_MAX), POS_MAX, NULL); + POS_MIN, SPOS_MAX, + BTREE_ITER_ALL_SNAPSHOTS, + NULL); if (ret) bch_err(c, "error in seq_delete: %i", ret); return ret; |