Commit 1c8f52a5 authored by Alexander Block's avatar Alexander Block Committed by Chris Mason

Btrfs: introduce btrfs_next_old_item

We introduce btrfs_next_old_item that uses btrfs_next_old_leaf instead
of btrfs_next_leaf.

btrfs_next_item is also changed to simply call btrfs_next_old_item with
time_seq being 0.
Signed-off-by: default avatarAlexander Block <ablock84@googlemail.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent a8c4a33b
...@@ -2755,13 +2755,18 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, ...@@ -2755,13 +2755,18 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans,
int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path,
u64 time_seq); u64 time_seq);
static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p) static inline int btrfs_next_old_item(struct btrfs_root *root,
struct btrfs_path *p, u64 time_seq)
{ {
++p->slots[0]; ++p->slots[0];
if (p->slots[0] >= btrfs_header_nritems(p->nodes[0])) if (p->slots[0] >= btrfs_header_nritems(p->nodes[0]))
return btrfs_next_leaf(root, p); return btrfs_next_old_leaf(root, p, time_seq);
return 0; return 0;
} }
static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p)
{
return btrfs_next_old_item(root, p, 0);
}
int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf);
int __must_check btrfs_drop_snapshot(struct btrfs_root *root, int __must_check btrfs_drop_snapshot(struct btrfs_root *root,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment