Lines Matching refs:eb
1296 const struct extent_buffer *eb; member
1305 struct extent_buffer *eb) in btrfs_init_map_token() argument
1307 token->eb = eb; in btrfs_init_map_token()
1319 #define read_eb_member(eb, ptr, type, member, result) (\ argument
1320 read_extent_buffer(eb, (char *)(result), \
1325 #define write_eb_member(eb, ptr, type, member, result) (\ argument
1326 write_extent_buffer(eb, (char *)(result), \
1332 u##bits btrfs_get_token_##bits(const struct extent_buffer *eb, \
1335 void btrfs_set_token_##bits(struct extent_buffer *eb, const void *ptr, \
1338 u##bits btrfs_get_##bits(const struct extent_buffer *eb, \
1340 void btrfs_set_##bits(struct extent_buffer *eb, void *ptr, \
1349 static inline u##bits btrfs_##name(const struct extent_buffer *eb, \
1353 return btrfs_get_##bits(eb, s, offsetof(type, member)); \
1355 static inline void btrfs_set_##name(struct extent_buffer *eb, type *s, \
1359 btrfs_set_##bits(eb, s, offsetof(type, member), val); \
1361 static inline u##bits btrfs_token_##name(const struct extent_buffer *eb,\
1366 return btrfs_get_token_##bits(eb, s, offsetof(type, member), token); \
1368 static inline void btrfs_set_token_##name(struct extent_buffer *eb, \
1373 btrfs_set_token_##bits(eb, s, offsetof(type, member), val, token); \
1377 static inline u##bits btrfs_##name(const struct extent_buffer *eb) \
1379 const type *p = page_address(eb->pages[0]); \
1383 static inline void btrfs_set_##name(struct extent_buffer *eb, \
1386 type *p = page_address(eb->pages[0]); \
1401 static inline u64 btrfs_device_total_bytes(struct extent_buffer *eb, in btrfs_device_total_bytes() argument
1406 return btrfs_get_64(eb, s, offsetof(struct btrfs_dev_item, in btrfs_device_total_bytes()
1409 static inline void btrfs_set_device_total_bytes(struct extent_buffer *eb, in btrfs_set_device_total_bytes() argument
1415 WARN_ON(!IS_ALIGNED(val, eb->fs_info->sectorsize)); in btrfs_set_device_total_bytes()
1416 btrfs_set_64(eb, s, offsetof(struct btrfs_dev_item, total_bytes), val); in btrfs_set_device_total_bytes()
1513 static inline u64 btrfs_stripe_offset_nr(struct extent_buffer *eb, in btrfs_stripe_offset_nr() argument
1516 return btrfs_stripe_offset(eb, btrfs_stripe_nr(c, nr)); in btrfs_stripe_offset_nr()
1519 static inline u64 btrfs_stripe_devid_nr(struct extent_buffer *eb, in btrfs_stripe_devid_nr() argument
1522 return btrfs_stripe_devid(eb, btrfs_stripe_nr(c, nr)); in btrfs_stripe_devid_nr()
1616 static inline void btrfs_tree_block_key(struct extent_buffer *eb, in btrfs_tree_block_key() argument
1620 read_eb_member(eb, item, struct btrfs_tree_block_info, key, key); in btrfs_tree_block_key()
1623 static inline void btrfs_set_tree_block_key(struct extent_buffer *eb, in btrfs_set_tree_block_key() argument
1627 write_eb_member(eb, item, struct btrfs_tree_block_info, key, key); in btrfs_set_tree_block_key()
1675 static inline u64 btrfs_node_blockptr(struct extent_buffer *eb, int nr) in btrfs_node_blockptr() argument
1680 return btrfs_key_blockptr(eb, (struct btrfs_key_ptr *)ptr); in btrfs_node_blockptr()
1683 static inline void btrfs_set_node_blockptr(struct extent_buffer *eb, in btrfs_set_node_blockptr() argument
1689 btrfs_set_key_blockptr(eb, (struct btrfs_key_ptr *)ptr, val); in btrfs_set_node_blockptr()
1692 static inline u64 btrfs_node_ptr_generation(struct extent_buffer *eb, int nr) in btrfs_node_ptr_generation() argument
1697 return btrfs_key_generation(eb, (struct btrfs_key_ptr *)ptr); in btrfs_node_ptr_generation()
1700 static inline void btrfs_set_node_ptr_generation(struct extent_buffer *eb, in btrfs_set_node_ptr_generation() argument
1706 btrfs_set_key_generation(eb, (struct btrfs_key_ptr *)ptr, val); in btrfs_set_node_ptr_generation()
1715 void btrfs_node_key(const struct extent_buffer *eb,
1718 static inline void btrfs_set_node_key(struct extent_buffer *eb, in btrfs_set_node_key() argument
1723 write_eb_member(eb, (struct btrfs_key_ptr *)ptr, in btrfs_set_node_key()
1744 static inline u32 btrfs_item_end(const struct extent_buffer *eb, in btrfs_item_end() argument
1747 return btrfs_item_offset(eb, item) + btrfs_item_size(eb, item); in btrfs_item_end()
1750 static inline u32 btrfs_item_end_nr(const struct extent_buffer *eb, int nr) in btrfs_item_end_nr() argument
1752 return btrfs_item_end(eb, btrfs_item_nr(nr)); in btrfs_item_end_nr()
1755 static inline u32 btrfs_item_offset_nr(const struct extent_buffer *eb, int nr) in btrfs_item_offset_nr() argument
1757 return btrfs_item_offset(eb, btrfs_item_nr(nr)); in btrfs_item_offset_nr()
1760 static inline u32 btrfs_item_size_nr(const struct extent_buffer *eb, int nr) in btrfs_item_size_nr() argument
1762 return btrfs_item_size(eb, btrfs_item_nr(nr)); in btrfs_item_size_nr()
1765 static inline void btrfs_item_key(const struct extent_buffer *eb, in btrfs_item_key() argument
1769 read_eb_member(eb, item, struct btrfs_item, key, disk_key); in btrfs_item_key()
1772 static inline void btrfs_set_item_key(struct extent_buffer *eb, in btrfs_set_item_key() argument
1776 write_eb_member(eb, item, struct btrfs_item, key, disk_key); in btrfs_set_item_key()
1801 static inline void btrfs_dir_item_key(const struct extent_buffer *eb, in btrfs_dir_item_key() argument
1805 read_eb_member(eb, item, struct btrfs_dir_item, location, key); in btrfs_dir_item_key()
1808 static inline void btrfs_set_dir_item_key(struct extent_buffer *eb, in btrfs_set_dir_item_key() argument
1812 write_eb_member(eb, item, struct btrfs_dir_item, location, key); in btrfs_set_dir_item_key()
1822 static inline void btrfs_free_space_key(const struct extent_buffer *eb, in btrfs_free_space_key() argument
1826 read_eb_member(eb, h, struct btrfs_free_space_header, location, key); in btrfs_free_space_key()
1829 static inline void btrfs_set_free_space_key(struct extent_buffer *eb, in btrfs_set_free_space_key() argument
1833 write_eb_member(eb, h, struct btrfs_free_space_header, location, key); in btrfs_set_free_space_key()
1858 static inline void btrfs_node_key_to_cpu(const struct extent_buffer *eb, in btrfs_node_key_to_cpu() argument
1862 btrfs_node_key(eb, &disk_key, nr); in btrfs_node_key_to_cpu()
1866 static inline void btrfs_item_key_to_cpu(const struct extent_buffer *eb, in btrfs_item_key_to_cpu() argument
1870 btrfs_item_key(eb, &disk_key, nr); in btrfs_item_key_to_cpu()
1874 static inline void btrfs_dir_item_key_to_cpu(const struct extent_buffer *eb, in btrfs_dir_item_key_to_cpu() argument
1879 btrfs_dir_item_key(eb, item, &disk_key); in btrfs_dir_item_key_to_cpu()
1898 static inline int btrfs_header_flag(const struct extent_buffer *eb, u64 flag) in btrfs_header_flag() argument
1900 return (btrfs_header_flags(eb) & flag) == flag; in btrfs_header_flag()
1903 static inline void btrfs_set_header_flag(struct extent_buffer *eb, u64 flag) in btrfs_set_header_flag() argument
1905 u64 flags = btrfs_header_flags(eb); in btrfs_set_header_flag()
1906 btrfs_set_header_flags(eb, flags | flag); in btrfs_set_header_flag()
1909 static inline void btrfs_clear_header_flag(struct extent_buffer *eb, u64 flag) in btrfs_clear_header_flag() argument
1911 u64 flags = btrfs_header_flags(eb); in btrfs_clear_header_flag()
1912 btrfs_set_header_flags(eb, flags & ~flag); in btrfs_clear_header_flag()
1915 static inline int btrfs_header_backref_rev(const struct extent_buffer *eb) in btrfs_header_backref_rev() argument
1917 u64 flags = btrfs_header_flags(eb); in btrfs_header_backref_rev()
1921 static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb, in btrfs_set_header_backref_rev() argument
1924 u64 flags = btrfs_header_flags(eb); in btrfs_set_header_backref_rev()
1927 btrfs_set_header_flags(eb, flags); in btrfs_set_header_backref_rev()
1935 static inline unsigned long btrfs_header_chunk_tree_uuid(const struct extent_buffer *eb) in btrfs_header_chunk_tree_uuid() argument
1940 static inline int btrfs_is_leaf(const struct extent_buffer *eb) in btrfs_is_leaf() argument
1942 return btrfs_header_level(eb) == 0; in btrfs_is_leaf()
2036 static inline void btrfs_balance_data(const struct extent_buffer *eb, in btrfs_balance_data() argument
2040 read_eb_member(eb, bi, struct btrfs_balance_item, data, ba); in btrfs_balance_data()
2043 static inline void btrfs_set_balance_data(struct extent_buffer *eb, in btrfs_set_balance_data() argument
2047 write_eb_member(eb, bi, struct btrfs_balance_item, data, ba); in btrfs_set_balance_data()
2050 static inline void btrfs_balance_meta(const struct extent_buffer *eb, in btrfs_balance_meta() argument
2054 read_eb_member(eb, bi, struct btrfs_balance_item, meta, ba); in btrfs_balance_meta()
2057 static inline void btrfs_set_balance_meta(struct extent_buffer *eb, in btrfs_set_balance_meta() argument
2061 write_eb_member(eb, bi, struct btrfs_balance_item, meta, ba); in btrfs_set_balance_meta()
2064 static inline void btrfs_balance_sys(const struct extent_buffer *eb, in btrfs_balance_sys() argument
2068 read_eb_member(eb, bi, struct btrfs_balance_item, sys, ba); in btrfs_balance_sys()
2071 static inline void btrfs_set_balance_sys(struct extent_buffer *eb, in btrfs_set_balance_sys() argument
2075 write_eb_member(eb, bi, struct btrfs_balance_item, sys, ba); in btrfs_set_balance_sys()
2236 const struct extent_buffer *eb, in btrfs_file_extent_inline_item_len() argument
2239 return btrfs_item_size(eb, e) - BTRFS_FILE_EXTENT_INLINE_DATA_START; in btrfs_file_extent_inline_item_len()
2375 int btrfs_get_extent_inline_ref_type(const struct extent_buffer *eb,
2418 int btrfs_exclude_logged_extents(struct extent_buffer *eb);
2513 int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
3408 int btree_readahead_hook(struct extent_buffer *eb, int err);