/fs/btrfs/ |
D | locking.c | 28 static inline void spin_nested(struct extent_buffer *eb) in spin_nested() argument 30 spin_lock(&eb->lock); in spin_nested() 38 void btrfs_set_lock_blocking(struct extent_buffer *eb) in btrfs_set_lock_blocking() argument 40 if (!test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags)) { in btrfs_set_lock_blocking() 41 set_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags); in btrfs_set_lock_blocking() 42 spin_unlock(&eb->lock); in btrfs_set_lock_blocking() 51 void btrfs_clear_lock_blocking(struct extent_buffer *eb) in btrfs_clear_lock_blocking() argument 53 if (test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags)) { in btrfs_clear_lock_blocking() 54 spin_nested(eb); in btrfs_clear_lock_blocking() 55 clear_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags); in btrfs_clear_lock_blocking() [all …]
|
D | struct-funcs.c | 45 u##bits btrfs_##name(struct extent_buffer *eb, type *s); \ 46 void btrfs_set_##name(struct extent_buffer *eb, type *s, u##bits val); \ 47 u##bits btrfs_##name(struct extent_buffer *eb, \ 54 if (eb->map_token && offset >= eb->map_start && \ 55 offset + sizeof(((type *)0)->member) <= eb->map_start + \ 56 eb->map_len) { \ 57 p = (type *)(eb->kaddr + part_offset - eb->map_start); \ 64 int unmap_on_exit = (eb->map_token == NULL); \ 68 err = map_extent_buffer(eb, offset, \ 74 read_eb_member(eb, s, type, member, &leres); \ [all …]
|
D | extent_io.c | 79 struct extent_buffer *eb; in extent_io_exit() local 94 eb = list_entry(buffers.next, struct extent_buffer, leak_list); in extent_io_exit() 96 "refs %d\n", (unsigned long long)eb->start, in extent_io_exit() 97 eb->len, atomic_read(&eb->refs)); in extent_io_exit() 98 list_del(&eb->leak_list); in extent_io_exit() 99 kmem_cache_free(extent_buffer_cache, eb); in extent_io_exit() 248 struct extent_buffer *eb; in buffer_tree_insert() local 252 eb = rb_entry(parent, struct extent_buffer, rb_node); in buffer_tree_insert() 254 if (offset < eb->start) in buffer_tree_insert() 256 else if (offset > eb->start) in buffer_tree_insert() [all …]
|
D | locking.h | 22 int btrfs_tree_lock(struct extent_buffer *eb); 23 int btrfs_tree_unlock(struct extent_buffer *eb); 25 int btrfs_try_tree_lock(struct extent_buffer *eb); 26 int btrfs_try_spin_lock(struct extent_buffer *eb); 28 void btrfs_set_lock_blocking(struct extent_buffer *eb); 29 void btrfs_clear_lock_blocking(struct extent_buffer *eb); 30 void btrfs_assert_tree_locked(struct extent_buffer *eb);
|
D | ctree.h | 996 #define read_eb_member(eb, ptr, type, member, result) ( \ argument 997 read_extent_buffer(eb, (char *)(result), \ 1002 #define write_eb_member(eb, ptr, type, member, result) ( \ argument 1003 write_extent_buffer(eb, (char *)(result), \ 1010 u##bits btrfs_##name(struct extent_buffer *eb, type *s); \ 1011 void btrfs_set_##name(struct extent_buffer *eb, type *s, u##bits val); 1015 static inline u##bits btrfs_##name(struct extent_buffer *eb) \ 1017 type *p = kmap_atomic(eb->first_page, KM_USER0); \ 1022 static inline void btrfs_set_##name(struct extent_buffer *eb, \ 1025 type *p = kmap_atomic(eb->first_page, KM_USER0); \ [all …]
|
D | extent_io.h | 222 void free_extent_buffer(struct extent_buffer *eb); 224 struct extent_buffer *eb, u64 start, int wait, 227 static inline void extent_buffer_get(struct extent_buffer *eb) in extent_buffer_get() argument 229 atomic_inc(&eb->refs); in extent_buffer_get() 232 int memcmp_extent_buffer(struct extent_buffer *eb, const void *ptrv, 235 void read_extent_buffer(struct extent_buffer *eb, void *dst, 238 void write_extent_buffer(struct extent_buffer *eb, const void *src, 247 void memset_extent_buffer(struct extent_buffer *eb, char c, 250 struct extent_buffer *eb); 254 struct extent_buffer *eb); [all …]
|
D | print-tree.c | 23 static void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk) in print_chunk() argument 25 int num_stripes = btrfs_chunk_num_stripes(eb, chunk); in print_chunk() 29 (unsigned long long)btrfs_chunk_length(eb, chunk), in print_chunk() 30 (unsigned long long)btrfs_chunk_owner(eb, chunk), in print_chunk() 31 (unsigned long long)btrfs_chunk_type(eb, chunk), in print_chunk() 35 (unsigned long long)btrfs_stripe_devid_nr(eb, chunk, i), in print_chunk() 36 (unsigned long long)btrfs_stripe_offset_nr(eb, chunk, i)); in print_chunk() 39 static void print_dev_item(struct extent_buffer *eb, in print_dev_item() argument 44 (unsigned long long)btrfs_device_id(eb, dev_item), in print_dev_item() 45 (unsigned long long)btrfs_device_total_bytes(eb, dev_item), in print_dev_item() [all …]
|
D | disk-io.c | 257 struct extent_buffer *eb, u64 parent_transid) in verify_parent_transid() argument 261 if (!parent_transid || btrfs_header_generation(eb) == parent_transid) in verify_parent_transid() 264 lock_extent(io_tree, eb->start, eb->start + eb->len - 1, GFP_NOFS); in verify_parent_transid() 265 if (extent_buffer_uptodate(io_tree, eb) && in verify_parent_transid() 266 btrfs_header_generation(eb) == parent_transid) { in verify_parent_transid() 271 (unsigned long long)eb->start, in verify_parent_transid() 273 (unsigned long long)btrfs_header_generation(eb)); in verify_parent_transid() 275 clear_extent_buffer_uptodate(io_tree, eb); in verify_parent_transid() 277 unlock_extent(io_tree, eb->start, eb->start + eb->len - 1, in verify_parent_transid() 287 struct extent_buffer *eb, in btree_read_extent_buffer_pages() argument [all …]
|
D | tree-log.c | 191 int (*process_func)(struct btrfs_root *log, struct extent_buffer *eb, 199 struct extent_buffer *eb, in process_one_buffer() argument 205 eb->start, eb->len, 1); in process_one_buffer() 209 if (btrfs_buffer_uptodate(eb, gen)) { in process_one_buffer() 211 btrfs_write_tree_block(eb); in process_one_buffer() 213 btrfs_wait_tree_block_writeback(eb); in process_one_buffer() 235 struct extent_buffer *eb, int slot, in overwrite_item() argument 249 item_size = btrfs_item_size_nr(eb, slot); in overwrite_item() 250 src_ptr = btrfs_item_ptr_offset(eb, slot); in overwrite_item() 269 read_extent_buffer(eb, src_copy, src_ptr, item_size); in overwrite_item() [all …]
|
D | ctree.c | 141 struct extent_buffer *eb; in btrfs_root_node() local 143 eb = root->node; in btrfs_root_node() 144 extent_buffer_get(eb); in btrfs_root_node() 146 return eb; in btrfs_root_node() 155 struct extent_buffer *eb; in btrfs_lock_root_node() local 158 eb = btrfs_root_node(root); in btrfs_lock_root_node() 159 btrfs_tree_lock(eb); in btrfs_lock_root_node() 162 if (eb == root->node) { in btrfs_lock_root_node() 168 btrfs_tree_unlock(eb); in btrfs_lock_root_node() 169 free_extent_buffer(eb); in btrfs_lock_root_node() [all …]
|
D | disk-io.h | 107 void btrfs_set_buffer_lockdep_class(struct extent_buffer *eb, int level); 109 static inline void btrfs_set_buffer_lockdep_class(struct extent_buffer *eb, in btrfs_set_buffer_lockdep_class() argument
|
D | extent-tree.c | 3863 struct extent_buffer *eb = NULL; in drop_snap_lookup_refcount() 3864 eb = btrfs_find_create_tree_block(root, start, len); in drop_snap_lookup_refcount() 3865 if (eb) in drop_snap_lookup_refcount() 3866 btrfs_tree_lock(eb); in drop_snap_lookup_refcount() 3873 if (eb) { in drop_snap_lookup_refcount() 3874 btrfs_tree_unlock(eb); in drop_snap_lookup_refcount() 3875 free_extent_buffer(eb); in drop_snap_lookup_refcount() 3910 struct extent_buffer *eb = path->nodes[1]; in drop_level_one_refs() local 3914 int nritems = btrfs_header_nritems(eb); in drop_level_one_refs() 3925 root_owner = btrfs_header_owner(eb); in drop_level_one_refs() [all …]
|
D | transaction.c | 461 struct extent_buffer *eb; in btrfs_commit_tree_roots() local 465 eb = btrfs_lock_root_node(fs_info->tree_root); in btrfs_commit_tree_roots() 466 btrfs_cow_block(trans, fs_info->tree_root, eb, NULL, 0, &eb, 0); in btrfs_commit_tree_roots() 467 btrfs_tree_unlock(eb); in btrfs_commit_tree_roots() 468 free_extent_buffer(eb); in btrfs_commit_tree_roots()
|
/fs/ocfs2/ |
D | alloc.c | 392 struct ocfs2_extent_block *eb); 519 struct ocfs2_extent_block *eb = (struct ocfs2_extent_block *)eb_bh->b_data; in ocfs2_path_insert_eb() local 530 path->p_node[index].el = &eb->h_list; in ocfs2_path_insert_eb() 740 struct ocfs2_extent_block *eb = in ocfs2_validate_extent_block() local 753 rc = ocfs2_validate_meta_ecc(sb, bh->b_data, &eb->h_check); in ocfs2_validate_extent_block() 764 if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) { in ocfs2_validate_extent_block() 768 eb->h_signature); in ocfs2_validate_extent_block() 772 if (le64_to_cpu(eb->h_blkno) != bh->b_blocknr) { in ocfs2_validate_extent_block() 777 (unsigned long long)le64_to_cpu(eb->h_blkno)); in ocfs2_validate_extent_block() 781 if (le32_to_cpu(eb->h_fs_generation) != OCFS2_SB(sb)->fs_generation) { in ocfs2_validate_extent_block() [all …]
|
D | extent_map.c | 293 struct ocfs2_extent_block *eb; in ocfs2_last_eb_is_empty() local 302 eb = (struct ocfs2_extent_block *) eb_bh->b_data; in ocfs2_last_eb_is_empty() 303 el = &eb->h_list; in ocfs2_last_eb_is_empty() 364 struct ocfs2_extent_block *eb, *next_eb; in ocfs2_figure_hole_clusters() local 369 eb = (struct ocfs2_extent_block *)eb_bh->b_data; in ocfs2_figure_hole_clusters() 375 if (le64_to_cpu(eb->h_next_leaf_blk) == 0ULL) in ocfs2_figure_hole_clusters() 379 le64_to_cpu(eb->h_next_leaf_blk), in ocfs2_figure_hole_clusters() 417 struct ocfs2_extent_block *uninitialized_var(eb); in ocfs2_get_clusters_nocache() 437 eb = (struct ocfs2_extent_block *) eb_bh->b_data; in ocfs2_get_clusters_nocache() 438 el = &eb->h_list; in ocfs2_get_clusters_nocache() [all …]
|
D | xattr.c | 2850 struct ocfs2_extent_block *eb; in ocfs2_xattr_get_rec() local 2861 eb = (struct ocfs2_extent_block *) eb_bh->b_data; in ocfs2_xattr_get_rec() 2862 el = &eb->h_list; in ocfs2_xattr_get_rec()
|