Loading fs/btrfs/btrfs_inode.h +4 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,10 @@ struct btrfs_inode { /* File creation time. */ struct timespec i_otime; /* Hook into fs_info->delayed_iputs */ struct list_head delayed_iput; long delayed_iput_count; struct inode vfs_inode; }; Loading fs/btrfs/ctree.c +4 −5 Original line number Diff line number Diff line Loading @@ -2248,7 +2248,6 @@ static void reada_for_search(struct btrfs_root *root, u64 target; u64 nread = 0; u64 gen; int direction = path->reada; struct extent_buffer *eb; u32 nr; u32 blocksize; Loading Loading @@ -2276,16 +2275,16 @@ static void reada_for_search(struct btrfs_root *root, nr = slot; while (1) { if (direction < 0) { if (path->reada == READA_BACK) { if (nr == 0) break; nr--; } else if (direction > 0) { } else if (path->reada == READA_FORWARD) { nr++; if (nr >= nritems) break; } if (path->reada < 0 && objectid) { if (path->reada == READA_BACK && objectid) { btrfs_node_key(node, &disk_key, nr); if (btrfs_disk_key_objectid(&disk_key) != objectid) break; Loading Loading @@ -2493,7 +2492,7 @@ read_block_for_search(struct btrfs_trans_handle *trans, btrfs_set_path_blocking(p); free_extent_buffer(tmp); if (p->reada) if (p->reada != READA_NONE) reada_for_search(root, p, level, slot, key->objectid); btrfs_release_path(p); Loading fs/btrfs/ctree.h +5 −4 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ struct btrfs_ordered_sum; /* csum types */ #define BTRFS_CSUM_TYPE_CRC32 0 static int btrfs_csum_sizes[] = { 4 }; static const int btrfs_csum_sizes[] = { 4 }; /* four bytes for CRC32 */ #define BTRFS_EMPTY_DIR_SIZE 0 Loading Loading @@ -598,14 +598,15 @@ struct btrfs_node { * The slots array records the index of the item or block pointer * used while walking the tree. */ enum { READA_NONE = 0, READA_BACK, READA_FORWARD }; struct btrfs_path { struct extent_buffer *nodes[BTRFS_MAX_LEVEL]; int slots[BTRFS_MAX_LEVEL]; /* if there is real range locking, this locks field will change */ int locks[BTRFS_MAX_LEVEL]; int reada; u8 locks[BTRFS_MAX_LEVEL]; u8 reada; /* keep some upper locks as we walk down */ int lowest_level; u8 lowest_level; /* * set by btrfs_split_item, tells search_slot to keep all locks Loading fs/btrfs/delayed-ref.c +2 −2 Original line number Diff line number Diff line Loading @@ -493,12 +493,12 @@ update_existing_head_ref(struct btrfs_delayed_ref_root *delayed_refs, memcpy(&existing_ref->extent_op->key, &ref->extent_op->key, sizeof(ref->extent_op->key)); existing_ref->extent_op->update_key = 1; existing_ref->extent_op->update_key = true; } if (ref->extent_op->update_flags) { existing_ref->extent_op->flags_to_set |= ref->extent_op->flags_to_set; existing_ref->extent_op->update_flags = 1; existing_ref->extent_op->update_flags = true; } btrfs_free_delayed_extent_op(ref->extent_op); } Loading fs/btrfs/delayed-ref.h +4 −4 Original line number Diff line number Diff line Loading @@ -75,11 +75,11 @@ struct btrfs_delayed_ref_node { struct btrfs_delayed_extent_op { struct btrfs_disk_key key; u8 level; bool update_key; bool update_flags; bool is_data; u64 flags_to_set; int level; unsigned int update_key:1; unsigned int update_flags:1; unsigned int is_data:1; }; /* Loading Loading
fs/btrfs/btrfs_inode.h +4 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,10 @@ struct btrfs_inode { /* File creation time. */ struct timespec i_otime; /* Hook into fs_info->delayed_iputs */ struct list_head delayed_iput; long delayed_iput_count; struct inode vfs_inode; }; Loading
fs/btrfs/ctree.c +4 −5 Original line number Diff line number Diff line Loading @@ -2248,7 +2248,6 @@ static void reada_for_search(struct btrfs_root *root, u64 target; u64 nread = 0; u64 gen; int direction = path->reada; struct extent_buffer *eb; u32 nr; u32 blocksize; Loading Loading @@ -2276,16 +2275,16 @@ static void reada_for_search(struct btrfs_root *root, nr = slot; while (1) { if (direction < 0) { if (path->reada == READA_BACK) { if (nr == 0) break; nr--; } else if (direction > 0) { } else if (path->reada == READA_FORWARD) { nr++; if (nr >= nritems) break; } if (path->reada < 0 && objectid) { if (path->reada == READA_BACK && objectid) { btrfs_node_key(node, &disk_key, nr); if (btrfs_disk_key_objectid(&disk_key) != objectid) break; Loading Loading @@ -2493,7 +2492,7 @@ read_block_for_search(struct btrfs_trans_handle *trans, btrfs_set_path_blocking(p); free_extent_buffer(tmp); if (p->reada) if (p->reada != READA_NONE) reada_for_search(root, p, level, slot, key->objectid); btrfs_release_path(p); Loading
fs/btrfs/ctree.h +5 −4 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ struct btrfs_ordered_sum; /* csum types */ #define BTRFS_CSUM_TYPE_CRC32 0 static int btrfs_csum_sizes[] = { 4 }; static const int btrfs_csum_sizes[] = { 4 }; /* four bytes for CRC32 */ #define BTRFS_EMPTY_DIR_SIZE 0 Loading Loading @@ -598,14 +598,15 @@ struct btrfs_node { * The slots array records the index of the item or block pointer * used while walking the tree. */ enum { READA_NONE = 0, READA_BACK, READA_FORWARD }; struct btrfs_path { struct extent_buffer *nodes[BTRFS_MAX_LEVEL]; int slots[BTRFS_MAX_LEVEL]; /* if there is real range locking, this locks field will change */ int locks[BTRFS_MAX_LEVEL]; int reada; u8 locks[BTRFS_MAX_LEVEL]; u8 reada; /* keep some upper locks as we walk down */ int lowest_level; u8 lowest_level; /* * set by btrfs_split_item, tells search_slot to keep all locks Loading
fs/btrfs/delayed-ref.c +2 −2 Original line number Diff line number Diff line Loading @@ -493,12 +493,12 @@ update_existing_head_ref(struct btrfs_delayed_ref_root *delayed_refs, memcpy(&existing_ref->extent_op->key, &ref->extent_op->key, sizeof(ref->extent_op->key)); existing_ref->extent_op->update_key = 1; existing_ref->extent_op->update_key = true; } if (ref->extent_op->update_flags) { existing_ref->extent_op->flags_to_set |= ref->extent_op->flags_to_set; existing_ref->extent_op->update_flags = 1; existing_ref->extent_op->update_flags = true; } btrfs_free_delayed_extent_op(ref->extent_op); } Loading
fs/btrfs/delayed-ref.h +4 −4 Original line number Diff line number Diff line Loading @@ -75,11 +75,11 @@ struct btrfs_delayed_ref_node { struct btrfs_delayed_extent_op { struct btrfs_disk_key key; u8 level; bool update_key; bool update_flags; bool is_data; u64 flags_to_set; int level; unsigned int update_key:1; unsigned int update_flags:1; unsigned int is_data:1; }; /* Loading