Lines Matching defs:buffer_head

3  * include/linux/buffer_head.h
46 struct buffer_head;
48 typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
51 * Historically, a buffer_head was used to map a single block
59 struct buffer_head {
61 struct buffer_head *b_this_page;/* circular list of page's buffers */
77 atomic_t b_count; /* users using this buffer_head */
90 static __always_inline void set_buffer_##name(struct buffer_head *bh) \
95 static __always_inline void clear_buffer_##name(struct buffer_head *bh) \
99 static __always_inline int buffer_##name(const struct buffer_head *bh) \
108 static __always_inline int test_set_buffer_##name(struct buffer_head *bh) \
112 static __always_inline int test_clear_buffer_##name(struct buffer_head *bh) \
139 static __always_inline void set_buffer_uptodate(struct buffer_head *bh)
160 static __always_inline void clear_buffer_uptodate(struct buffer_head *bh)
165 static __always_inline int buffer_uptodate(const struct buffer_head *bh)
174 static inline unsigned long bh_offset(const struct buffer_head *bh)
183 ((struct buffer_head *)page_private(page)); \
195 void mark_buffer_dirty(struct buffer_head *bh);
196 void mark_buffer_write_io_error(struct buffer_head *bh);
197 void touch_buffer(struct buffer_head *bh);
198 void folio_set_bh(struct buffer_head *bh, struct folio *folio,
200 struct buffer_head *folio_alloc_buffers(struct folio *folio, unsigned long size,
202 struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size,
204 struct buffer_head *create_empty_buffers(struct folio *folio,
206 void end_buffer_read_sync(struct buffer_head *bh, int uptodate);
207 void end_buffer_write_sync(struct buffer_head *bh, int uptodate);
210 void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode);
217 static inline void clean_bdev_bh_alias(struct buffer_head *bh)
222 void mark_buffer_async_write(struct buffer_head *bh);
223 void __wait_on_buffer(struct buffer_head *);
224 wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
225 struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
227 struct buffer_head *bdev_getblk(struct block_device *bdev, sector_t block,
229 void __brelse(struct buffer_head *);
230 void __bforget(struct buffer_head *);
232 struct buffer_head *__bread_gfp(struct block_device *,
234 struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
235 void free_buffer_head(struct buffer_head * bh);
236 void unlock_buffer(struct buffer_head *bh);
237 void __lock_buffer(struct buffer_head *bh);
238 int sync_dirty_buffer(struct buffer_head *bh);
239 int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags);
240 void write_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags);
241 void submit_bh(blk_opf_t, struct buffer_head *);
244 int bh_uptodate_or_lock(struct buffer_head *bh);
245 int __bh_read(struct buffer_head *bh, blk_opf_t op_flags, bool wait);
246 void __bh_read_batch(int nr, struct buffer_head *bhs[],
250 * Generic address_space_operations implementations for buffer_head-backed
295 static inline void get_bh(struct buffer_head *bh)
300 static inline void put_bh(struct buffer_head *bh)
306 static inline void brelse(struct buffer_head *bh)
312 static inline void bforget(struct buffer_head *bh)
318 static inline struct buffer_head *
324 static inline struct buffer_head *
336 static inline struct buffer_head *getblk_unmovable(struct block_device *bdev,
347 static inline struct buffer_head *__getblk(struct block_device *bdev,
358 static inline struct buffer_head *sb_getblk(struct super_block *sb,
364 static inline struct buffer_head *sb_getblk_gfp(struct super_block *sb,
370 static inline struct buffer_head *
377 map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block)
385 static inline void wait_on_buffer(struct buffer_head *bh)
392 static inline int trylock_buffer(struct buffer_head *bh)
397 static inline void lock_buffer(struct buffer_head *bh)
404 static inline void bh_readahead(struct buffer_head *bh, blk_opf_t op_flags)
414 static inline void bh_read_nowait(struct buffer_head *bh, blk_opf_t op_flags)
421 static inline int bh_read(struct buffer_head *bh, blk_opf_t op_flags)
428 static inline void bh_read_batch(int nr, struct buffer_head *bhs[])
433 static inline void bh_readahead_batch(int nr, struct buffer_head *bhs[],
449 static inline struct buffer_head *
469 struct buffer_head *get_nth_bh(struct buffer_head *bh, unsigned int count)