diff --git a/kmod/src/btree.c b/kmod/src/btree.c index a62535f5..7edee5b6 100644 --- a/kmod/src/btree.c +++ b/kmod/src/btree.c @@ -78,13 +78,11 @@ /* btree walking has a bunch of behavioural bit flags */ enum { BTW_NEXT = (1 << 0), /* return >= key */ - BTW_AFTER = (1 << 1), /* return > key */ - BTW_PREV = (1 << 2), /* return <= key */ - BTW_BEFORE = (1 << 3), /* return < key */ - BTW_DIRTY = (1 << 4), /* cow stable blocks */ - BTW_ALLOC = (1 << 5), /* allocate a new block for 0 ref */ - BTW_INSERT = (1 << 6), /* walking to insert, try splitting */ - BTW_DELETE = (1 << 7), /* walking to delete, try joining */ + BTW_PREV = (1 << 1), /* return <= key */ + BTW_DIRTY = (1 << 2), /* cow stable blocks */ + BTW_ALLOC = (1 << 3), /* allocate a new block for 0 ref */ + BTW_INSERT = (1 << 4), /* walking to insert, try splitting */ + BTW_DELETE = (1 << 5), /* walking to delete, try joining */ }; /* total length of the value payload */ @@ -1500,13 +1498,6 @@ int scoutfs_btree_next(struct super_block *sb, struct scoutfs_btree_root *root, return btree_iter(sb, root, BTW_NEXT, key, iref); } -int scoutfs_btree_after(struct super_block *sb, struct scoutfs_btree_root *root, - struct scoutfs_key *key, - struct scoutfs_btree_item_ref *iref) -{ - return btree_iter(sb, root, BTW_NEXT | BTW_AFTER, key, iref); -} - int scoutfs_btree_prev(struct super_block *sb, struct scoutfs_btree_root *root, struct scoutfs_key *key, struct scoutfs_btree_item_ref *iref) @@ -1514,14 +1505,6 @@ int scoutfs_btree_prev(struct super_block *sb, struct scoutfs_btree_root *root, return btree_iter(sb, root, BTW_PREV, key, iref); } -int scoutfs_btree_before(struct super_block *sb, - struct scoutfs_btree_root *root, - struct scoutfs_key *key, - struct scoutfs_btree_item_ref *iref) -{ - return btree_iter(sb, root, BTW_PREV | BTW_BEFORE, key, iref); -} - /* * Ensure that the blocks that lead to the item with the given key are * dirty. caller can hold a transaction to pin the dirty blocks and diff --git a/kmod/src/btree.h b/kmod/src/btree.h index 133832ba..e86396ae 100644 --- a/kmod/src/btree.h +++ b/kmod/src/btree.h @@ -49,16 +49,9 @@ int scoutfs_btree_delete(struct super_block *sb, int scoutfs_btree_next(struct super_block *sb, struct scoutfs_btree_root *root, struct scoutfs_key *key, struct scoutfs_btree_item_ref *iref); -int scoutfs_btree_after(struct super_block *sb, struct scoutfs_btree_root *root, - struct scoutfs_key *key, - struct scoutfs_btree_item_ref *iref); int scoutfs_btree_prev(struct super_block *sb, struct scoutfs_btree_root *root, struct scoutfs_key *key, struct scoutfs_btree_item_ref *iref); -int scoutfs_btree_before(struct super_block *sb, - struct scoutfs_btree_root *root, - struct scoutfs_key *key, - struct scoutfs_btree_item_ref *iref); int scoutfs_btree_dirty(struct super_block *sb, struct scoutfs_radix_allocator *alloc, struct scoutfs_block_writer *wri,