Lines Matching +full:1 +full:eb

72 #define EXTENT_FOLIO_PRIVATE			1
77 * 1. The bitmaps must be little-endian on disk.
82 #define BYTE_MASK ((1 << BITS_PER_BYTE) - 1)
84 ((BYTE_MASK << ((start) & (BITS_PER_BYTE - 1))) & BYTE_MASK)
86 (BYTE_MASK >> (-(nbits) & (BITS_PER_BYTE - 1)))
101 * The address where the eb can be accessed without any cross-page handling.
109 /* >= 0 if eb belongs to a log tree, -1 otherwise */
130 struct extent_buffer *eb; member
131 /* Block group @eb resides in. Only used for zoned mode. */
135 static inline unsigned long offset_in_eb_folio(const struct extent_buffer *eb, in offset_in_eb_folio() argument
138 ASSERT(eb->folio_size); in offset_in_eb_folio()
139 return start & (eb->folio_size - 1); in offset_in_eb_folio()
145 * @eb: target extent buffer
150 static inline size_t get_eb_offset_in_folio(const struct extent_buffer *eb, in get_eb_offset_in_folio() argument
154 * 1) sectorsize == PAGE_SIZE and nodesize >= PAGE_SIZE case in get_eb_offset_in_folio()
155 * 1.1) One large folio covering the whole eb in get_eb_offset_in_folio()
156 * The eb->start is aligned to folio size, thus adding it in get_eb_offset_in_folio()
159 * The eb->start is aligned to folio (page) size, thus in get_eb_offset_in_folio()
165 * We need to add eb->start to properly access the offset inside in get_eb_offset_in_folio()
166 * that eb. in get_eb_offset_in_folio()
168 return offset_in_folio(eb->folios[0], offset + eb->start); in get_eb_offset_in_folio()
171 static inline unsigned long get_eb_folio_index(const struct extent_buffer *eb, in get_eb_folio_index() argument
175 * 1) sectorsize == PAGE_SIZE and nodesize >= PAGE_SIZE case in get_eb_folio_index()
176 * 1.1) One large folio covering the whole eb. in get_eb_folio_index()
186 return offset >> eb->folio_shift; in get_eb_folio_index()
263 void free_extent_buffer(struct extent_buffer *eb);
264 void free_extent_buffer_stale(struct extent_buffer *eb);
266 #define WAIT_COMPLETE 1
268 int read_extent_buffer_pages(struct extent_buffer *eb, int wait, int mirror_num,
270 void wait_on_extent_buffer_writeback(struct extent_buffer *eb);
275 static inline int num_extent_pages(const struct extent_buffer *eb) in num_extent_pages() argument
279 * sectorsize, it's just eb->len >> PAGE_SHIFT. in num_extent_pages()
284 return (eb->len >> PAGE_SHIFT) ?: 1; in num_extent_pages()
288 * This can only be determined at runtime by checking eb::folios[0].
290 * As we can have either one large folio covering the whole eb
294 static inline int num_extent_folios(const struct extent_buffer *eb) in num_extent_folios() argument
296 if (folio_order(eb->folios[0])) in num_extent_folios()
297 return 1; in num_extent_folios()
298 return num_extent_pages(eb); in num_extent_folios()
301 static inline int extent_buffer_uptodate(const struct extent_buffer *eb) in extent_buffer_uptodate() argument
303 return test_bit(EXTENT_BUFFER_UPTODATE, &eb->bflags); in extent_buffer_uptodate()
306 int memcmp_extent_buffer(const struct extent_buffer *eb, const void *ptrv,
308 void read_extent_buffer(const struct extent_buffer *eb, void *dst,
311 int read_extent_buffer_to_user_nofault(const struct extent_buffer *eb,
314 void write_extent_buffer(const struct extent_buffer *eb, const void *src,
318 const struct extent_buffer *eb, const void *chunk_tree_uuid) in write_extent_buffer_chunk_tree_uuid() argument
320 write_extent_buffer(eb, chunk_tree_uuid, in write_extent_buffer_chunk_tree_uuid()
325 static inline void write_extent_buffer_fsid(const struct extent_buffer *eb, in write_extent_buffer_fsid() argument
328 write_extent_buffer(eb, fsid, offsetof(struct btrfs_header, fsid), in write_extent_buffer_fsid()
344 void memzero_extent_buffer(const struct extent_buffer *eb, unsigned long start,
346 int extent_buffer_test_bit(const struct extent_buffer *eb, unsigned long start,
348 void extent_buffer_bitmap_set(const struct extent_buffer *eb, unsigned long start,
350 void extent_buffer_bitmap_clear(const struct extent_buffer *eb,
353 void set_extent_buffer_dirty(struct extent_buffer *eb);
354 void set_extent_buffer_uptodate(struct extent_buffer *eb);
355 void clear_extent_buffer_uptodate(struct extent_buffer *eb);