/linux-master/fs/ocfs2/ |
H A D | buffer_head_io.c | 27 * Bits on bh->b_state used by ocfs2. 38 int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, argument 43 trace_ocfs2_write_block((unsigned long long)bh->b_blocknr, ci); 45 BUG_ON(bh->b_blocknr < OCFS2_SUPER_BLOCK_BLKNO); 46 BUG_ON(buffer_jbd(bh)); 59 lock_buffer(bh); 60 set_buffer_uptodate(bh); 63 clear_buffer_dirty(bh); 65 get_bh(bh); /* for end_buffer_write_sync() */ 66 bh 94 struct buffer_head *bh; local 193 ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, struct buffer_head *bhs[], int flags, int (*validate)(struct super_block *sb, struct buffer_head *bh)) argument 200 struct buffer_head *bh; local 428 ocfs2_write_super_or_backup(struct ocfs2_super *osb, struct buffer_head *bh) argument [all...] |
H A D | buffer_head_io.h | 16 struct buffer_head *bh, 31 struct buffer_head *bh)); 34 struct buffer_head *bh); 40 struct buffer_head **bh, 42 struct buffer_head *bh)) 46 if (bh == NULL) { 47 printk("ocfs2: bh == NULL\n"); 52 status = ocfs2_read_blocks(ci, off, 1, bh, 0, validate); 39 ocfs2_read_block(struct ocfs2_caching_info *ci, u64 off, struct buffer_head **bh, int (*validate)(struct super_block *sb, struct buffer_head *bh)) argument
|
H A D | uptodate.h | 55 struct buffer_head *bh); 57 struct buffer_head *bh); 59 struct buffer_head *bh); 61 struct buffer_head *bh); 66 struct buffer_head *bh);
|
/linux-master/fs/nilfs2/ |
H A D | gcinode.c | 62 struct buffer_head *bh; local 65 bh = nilfs_grab_buffer(inode, inode->i_mapping, blkoff, 0); 66 if (unlikely(!bh)) 69 if (buffer_uptodate(bh)) 80 lock_buffer(bh); 81 if (buffer_uptodate(bh)) { 82 unlock_buffer(bh); 86 if (!buffer_mapped(bh)) { 87 bh->b_bdev = inode->i_sb->s_bdev; 88 set_buffer_mapped(bh); 139 nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh) argument [all...] |
H A D | btnode.c | 50 struct buffer_head *bh; local 52 bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node)); 53 if (unlikely(!bh)) 56 if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) || 57 buffer_dirty(bh))) { 58 brelse(bh); 61 memset(bh->b_data, 0, i_blocksize(inode)); 62 bh->b_bdev = inode->i_sb->s_bdev; 63 bh 76 struct buffer_head *bh; local 145 nilfs_btnode_delete(struct buffer_head *bh) argument [all...] |
H A D | page.c | 34 struct buffer_head *bh = folio_buffers(folio); local 36 if (!bh) 37 bh = create_empty_buffers(folio, 1 << blkbits, b_state); 40 bh = get_nth_bh(bh, block - first_block); 42 touch_buffer(bh); 43 wait_on_buffer(bh); 44 return bh; 55 struct buffer_head *bh; local 61 bh 74 nilfs_forget_buffer(struct buffer_head *bh) argument 104 struct buffer_head *bh; local 142 struct buffer_head *bh, *head; local 155 struct buffer_head *bh, *head; local 401 struct buffer_head *bh, *head; local 439 struct buffer_head *bh, *head; local 522 struct buffer_head *bh, *head; local [all...] |
/linux-master/fs/gfs2/ |
H A D | meta_io.c | 35 struct buffer_head *bh, *head; local 43 bh = head; 46 if (!buffer_mapped(bh)) 56 lock_buffer(bh); 57 } else if (!trylock_buffer(bh)) { 61 if (test_clear_buffer_dirty(bh)) { 62 mark_buffer_async_write(bh); 64 unlock_buffer(bh); 66 } while ((bh = bh 119 struct buffer_head *bh; local 161 meta_prep_new(struct buffer_head *bh) argument 183 struct buffer_head *bh; local 196 struct buffer_head *bh = page_buffers(page); local 218 struct buffer_head *bh = *bhs; local 252 struct buffer_head *bh, *bhs[2]; local 312 gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh) argument 333 gfs2_remove_from_journal(struct buffer_head *bh, int meta) argument 383 struct buffer_head *bh; local 407 struct buffer_head *bh; local 434 struct buffer_head *bh; local 482 struct buffer_head *bh; local 511 struct buffer_head *first_bh, *bh; local [all...] |
/linux-master/fs/hpfs/ |
H A D | buffer.c | 40 struct buffer_head *bh; local 49 bh = sb_find_get_block(s, secno); 50 if (bh) { 51 if (buffer_uptodate(bh)) { 52 brelse(bh); 55 brelse(bh); 74 struct buffer_head *bh; local 82 *bhp = bh = sb_bread(s, hpfs_search_hotfix_map(s, secno)); 83 if (bh != NULL) 84 return bh 95 struct buffer_head *bh; local [all...] |
/linux-master/fs/ |
H A D | buffer.c | 57 static void submit_bh_wbc(blk_opf_t opf, struct buffer_head *bh, 62 inline void touch_buffer(struct buffer_head *bh) argument 64 trace_block_touch_buffer(bh); 65 folio_mark_accessed(bh->b_folio); 69 void __lock_buffer(struct buffer_head *bh) argument 71 wait_on_bit_lock_io(&bh->b_state, BH_Lock, TASK_UNINTERRUPTIBLE); 75 void unlock_buffer(struct buffer_head *bh) argument 77 clear_bit_unlock(BH_Lock, &bh->b_state); 79 wake_up_bit(&bh->b_state, BH_Lock); 91 struct buffer_head *head, *bh; local 121 __wait_on_buffer(struct buffer_head * bh) argument 127 buffer_io_error(struct buffer_head *bh, char *msg) argument 143 __end_buffer_read_notouch(struct buffer_head *bh, int uptodate) argument 158 end_buffer_read_sync(struct buffer_head *bh, int uptodate) argument 165 end_buffer_write_sync(struct buffer_head *bh, int uptodate) argument 196 struct buffer_head *bh; local 245 end_buffer_async_read(struct buffer_head *bh, int uptodate) argument 295 struct buffer_head *bh; member in struct:postprocess_bh_ctx 302 struct buffer_head *bh = ctx->bh; local 310 need_fsverity(struct buffer_head *bh) argument 324 struct buffer_head *bh = ctx->bh; local 347 end_buffer_async_read_io(struct buffer_head *bh, int uptodate) argument 378 end_buffer_async_write(struct buffer_head *bh, int uptodate) argument 440 mark_buffer_async_read(struct buffer_head *bh) argument 446 mark_buffer_async_write_endio(struct buffer_head *bh, bh_end_io_t *handler) argument 453 mark_buffer_async_write(struct buffer_head *bh) argument 512 __remove_assoc_queue(struct buffer_head *bh) argument 536 struct buffer_head *bh; local 661 struct buffer_head *bh = __find_get_block(bdev, bblock + 1, blocksize); local 669 mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) argument 723 struct buffer_head *bh = head; local 771 struct buffer_head *bh; local 889 struct buffer_head *bh = BH_ENTRY(list->next); local 913 struct buffer_head *bh, *head; local 970 struct buffer_head *bh, *tail; local 1000 struct buffer_head *bh = head; local 1039 struct buffer_head *bh; local 1128 struct buffer_head *bh; local 1174 mark_buffer_dirty(struct buffer_head *bh) argument 1209 mark_buffer_write_io_error(struct buffer_head *bh) argument 1243 __bforget(struct buffer_head *bh) argument 1258 __bread_slow(struct buffer_head *bh) argument 1318 bh_lru_install(struct buffer_head *bh) argument 1368 struct buffer_head *bh = __this_cpu_read(bh_lrus.bhs[i]); local 1397 struct buffer_head *bh = lookup_bh_lru(bdev, block, size); local 1423 struct buffer_head *bh = __find_get_block(bdev, block, size); local 1438 struct buffer_head *bh = bdev_getblk(bdev, block, size, local 1464 struct buffer_head *bh; local 1537 folio_set_bh(struct buffer_head *bh, struct folio *folio, unsigned long offset) argument 1561 discard_buffer(struct buffer_head * bh) argument 1592 struct buffer_head *head, *bh, *next; local 1647 struct buffer_head *bh, *head, *tail; local 1705 struct buffer_head *bh; local 1755 struct buffer_head *bh; local 1801 struct buffer_head *bh, *head; local 1967 struct buffer_head *head, *bh; local 2003 iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh, const struct iomap *iomap) argument 2080 struct buffer_head *bh, *head, *wait[2], **wait_bh=wait; local 2164 struct buffer_head *bh, *head; local 2309 struct buffer_head *bh, *head; local 2352 struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE]; local 2643 struct buffer_head *bh; local 2751 struct buffer_head *bh = bio->bi_private; local 2760 submit_bh_wbc(blk_opf_t opf, struct buffer_head *bh, enum rw_hint write_hint, struct writeback_control *wbc) argument 2807 submit_bh(blk_opf_t opf, struct buffer_head *bh) argument 2813 write_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags) argument 2831 __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags) argument 2858 sync_dirty_buffer(struct buffer_head *bh) argument 2884 buffer_busy(struct buffer_head *bh) argument 2894 struct buffer_head *bh; local 2954 struct buffer_head *bh = buffers_to_free; local 3014 free_buffer_head(struct buffer_head *bh) argument 3046 bh_uptodate_or_lock(struct buffer_head *bh) argument 3066 __bh_read(struct buffer_head *bh, blk_opf_t op_flags, bool wait) argument 3100 struct buffer_head *bh = bhs[i]; local [all...] |
/linux-master/fs/ext4/ |
H A D | symlink.c | 30 struct buffer_head *bh = NULL; local 42 bh = ext4_bread(NULL, inode, 0, 0); 43 if (IS_ERR(bh)) 44 return ERR_CAST(bh); 45 if (!bh) { 49 caddr = bh->b_data; 54 brelse(bh); 68 static void ext4_free_link(void *bh) argument 70 brelse(bh); 76 struct buffer_head *bh; local [all...] |
H A D | mmp.c | 43 struct buffer_head *bh) 45 struct mmp_struct *mmp = (struct mmp_struct *)(bh->b_data); 48 lock_buffer(bh); 49 bh->b_end_io = end_buffer_write_sync; 50 get_bh(bh); 51 submit_bh(REQ_OP_WRITE | REQ_SYNC | REQ_META | REQ_PRIO, bh); 52 wait_on_buffer(bh); 53 if (unlikely(!buffer_uptodate(bh))) 58 static int write_mmp_block(struct super_block *sb, struct buffer_head *bh) argument 67 err = write_mmp_block_thawed(sb, bh); 42 write_mmp_block_thawed(struct super_block *sb, struct buffer_head *bh) argument 76 read_mmp_block(struct super_block *sb, struct buffer_head **bh, ext4_fsblk_t mmp_block) argument 140 struct buffer_head *bh = EXT4_SB(sb)->s_mmp_bh; local 283 struct buffer_head *bh = NULL; local [all...] |
H A D | ext4_jbd2.c | 184 struct buffer_head *bh, 192 if (bh) 193 BUFFER_TRACE(bh, "abort"); 231 struct buffer_head *bh, 239 err = jbd2_journal_get_write_access(handle, bh); 241 ext4_journal_abort_handle(where, line, __func__, bh, 250 jbd2_journal_set_triggers(bh, 260 * "bh" may be NULL: a metadata block may have been freed from memory 266 struct buffer_head *bh, ext4_fsblk_t blocknr) 273 BUFFER_TRACE(bh, "ente 182 ext4_journal_abort_handle(const char *caller, unsigned int line, const char *err_fn, struct buffer_head *bh, handle_t *handle, int err) argument 229 __ext4_journal_get_write_access(const char *where, unsigned int line, handle_t *handle, struct super_block *sb, struct buffer_head *bh, enum ext4_journal_trigger_type trigger_type) argument 264 __ext4_forget(const char *where, unsigned int line, handle_t *handle, int is_metadata, struct inode *inode, struct buffer_head *bh, ext4_fsblk_t blocknr) argument 318 __ext4_journal_get_create_access(const char *where, unsigned int line, handle_t *handle, struct super_block *sb, struct buffer_head *bh, enum ext4_journal_trigger_type trigger_type) argument 342 __ext4_handle_dirty_metadata(const char *where, unsigned int line, handle_t *handle, struct inode *inode, struct buffer_head *bh) argument [all...] |
/linux-master/include/linux/ |
H A D | buffer_head.h | 48 typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate); 63 struct page *b_page; /* the page this bh is mapped to */ 64 struct folio *b_folio; /* the folio this bh is mapped to */ 78 spinlock_t b_uptodate_lock; /* Used by the first bh in a page, to 90 static __always_inline void set_buffer_##name(struct buffer_head *bh) \ 92 if (!test_bit(BH_##bit, &(bh)->b_state)) \ 93 set_bit(BH_##bit, &(bh)->b_state); \ 95 static __always_inline void clear_buffer_##name(struct buffer_head *bh) \ 97 clear_bit(BH_##bit, &(bh)->b_state); \ 99 static __always_inline int buffer_##name(const struct buffer_head *bh) \ 139 set_buffer_uptodate(struct buffer_head *bh) argument 160 clear_buffer_uptodate(struct buffer_head *bh) argument 165 buffer_uptodate(const struct buffer_head *bh) argument 174 bh_offset(const struct buffer_head *bh) argument 217 clean_bdev_bh_alias(struct buffer_head *bh) argument 295 get_bh(struct buffer_head *bh) argument 300 put_bh(struct buffer_head *bh) argument 306 brelse(struct buffer_head *bh) argument 312 bforget(struct buffer_head *bh) argument 377 map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block) argument 385 wait_on_buffer(struct buffer_head *bh) argument 392 trylock_buffer(struct buffer_head *bh) argument 397 lock_buffer(struct buffer_head *bh) argument 404 bh_readahead(struct buffer_head *bh, blk_opf_t op_flags) argument 414 bh_read_nowait(struct buffer_head *bh, blk_opf_t op_flags) argument 421 bh_read(struct buffer_head *bh, blk_opf_t op_flags) argument 469 get_nth_bh(struct buffer_head *bh, unsigned int count) argument [all...] |
/linux-master/fs/qnx4/ |
H A D | namei.c | 27 struct buffer_head *bh, unsigned long *offset) 33 if (bh == NULL) { 37 de = (union qnx4_directory_entry *) (bh->b_data + *offset); 54 struct buffer_head *bh; local 57 bh = NULL; 60 if (!bh) { 63 bh = sb_bread(dir->i_sb, block); 64 if (!bh) { 69 *res_dir = (struct qnx4_inode_entry *) (bh->b_data + offset); 70 if (qnx4_match(len, name, bh, 26 qnx4_match(int len, const char *name, struct buffer_head *bh, unsigned long *offset) argument 93 struct buffer_head *bh; local [all...] |
H A D | bitmap.c | 28 struct buffer_head *bh; local 33 if ((bh = sb_bread(sb, start + offset)) == NULL) { 38 memweight(bh->b_data, bytes); 39 brelse(bh);
|
/linux-master/fs/omfs/ |
H A D | dir.c | 38 struct buffer_head *bh; local 44 bh = omfs_bread(dir->i_sb, block); 45 if (!bh) { 50 oi = (struct omfs_inode *) bh->b_data; 52 brelse(bh); 57 return bh; 61 brelse(bh); 70 struct buffer_head *bh; local 74 bh = omfs_get_bucket(dir, name, namelen, &ofs); 75 if (!bh) 87 struct buffer_head *bh; local 117 struct buffer_head *bh; local 163 struct buffer_head *bh, *bh2; local 219 struct buffer_head *bh; local 297 struct buffer_head *bh; local 335 struct buffer_head *bh = omfs_bread(dir->i_sb, fsblock); local 411 struct buffer_head *bh; local [all...] |
/linux-master/fs/efs/ |
H A D | symlink.c | 19 struct buffer_head * bh; local 30 bh = sb_bread(inode->i_sb, efs_bmap(inode, 0)); 31 if (!bh) 33 memcpy(link, bh->b_data, (size > EFS_BLOCKSIZE) ? EFS_BLOCKSIZE : size); 34 brelse(bh); 36 bh = sb_bread(inode->i_sb, efs_bmap(inode, 1)); 37 if (!bh) 39 memcpy(link + EFS_BLOCKSIZE, bh->b_data, size - EFS_BLOCKSIZE); 40 brelse(bh);
|
/linux-master/fs/minix/ |
H A D | bitmap.c | 46 struct buffer_head *bh; local 61 bh = sbi->s_zmap[zone]; 63 if (!minix_test_and_clear_bit(bit, bh->b_data)) 67 mark_buffer_dirty(bh); 78 struct buffer_head *bh = sbi->s_zmap[i]; local 82 j = minix_find_first_zero_bit(bh->b_data, bits_per_zone); 84 minix_set_bit(j, bh->b_data); 86 mark_buffer_dirty(bh); 107 minix_V1_raw_inode(struct super_block *sb, ino_t ino, struct buffer_head **bh) argument 121 *bh 131 minix_V2_raw_inode(struct super_block *sb, ino_t ino, struct buffer_head **bh) argument 160 struct buffer_head *bh = NULL; local 187 struct buffer_head *bh; local 218 struct buffer_head * bh; local [all...] |
/linux-master/fs/affs/ |
H A D | amigaffs.c | 21 /* Insert a header block bh into the directory dir 26 affs_insert_hash(struct inode *dir, struct buffer_head *bh) argument 33 ino = bh->b_blocknr; 34 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); 50 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); 51 AFFS_TAIL(sb, bh)->hash_chain = 0; 52 affs_fix_checksum(sb, bh); 78 struct buffer_head *bh; local 89 bh 146 struct buffer_head *bh, *link_bh = NULL; local 237 struct buffer_head *bh; local 271 struct buffer_head *bh = NULL; local 339 affs_checksum_block(struct super_block *sb, struct buffer_head *bh) argument 357 affs_fix_checksum(struct super_block *sb, struct buffer_head *bh) argument [all...] |
H A D | affs.h | 19 #define AFFS_BLOCK(sb, bh, blk) (AFFS_HEAD(bh)->table[AFFS_SB(sb)->s_hashsize-1-(blk)]) 21 #define AFFS_HEAD(bh) ((struct affs_head *)(bh)->b_data) 22 #define AFFS_TAIL(sb, bh) ((struct affs_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(struct affs_tail))) 23 #define AFFS_ROOT_HEAD(bh) ((struct affs_root_head *)(bh)->b_data) 24 #define AFFS_ROOT_TAIL(sb, bh) ((struct affs_root_tail *)((bh) 254 struct buffer_head *bh; local 269 struct buffer_head *bh; local 280 affs_brelse(struct buffer_head *bh) argument 288 affs_adjust_checksum(struct buffer_head *bh, u32 val) argument 294 affs_adjust_bitmapchecksum(struct buffer_head *bh, u32 val) argument [all...] |
H A D | bitmap.c | 43 struct buffer_head *bh; local 59 bh = sbi->s_bmap_bh; 61 affs_brelse(bh); 62 bh = affs_bread(sb, bm->bm_key); 63 if (!bh) 65 sbi->s_bmap_bh = bh; 70 data = (__be32 *)bh->b_data + bit / 32 + 1; 79 tmp = be32_to_cpu(*(__be32 *)bh->b_data); 80 *(__be32 *)bh->b_data = cpu_to_be32(tmp - mask); 82 mark_buffer_dirty(bh); 120 struct buffer_head *bh; local 247 struct buffer_head *bmap_bh = NULL, *bh = NULL; local [all...] |
/linux-master/fs/reiserfs/ |
H A D | prints.c | 148 static int scnprintf_block_head(char *buf, size_t size, struct buffer_head *bh) argument 152 B_LEVEL(bh), B_NR_ITEMS(bh), B_FREE_SPACE(bh)); 155 static int scnprintf_buffer_head(char *buf, size_t size, struct buffer_head *bh) argument 159 bh->b_bdev, bh->b_size, 160 (unsigned long long)bh->b_blocknr, 161 atomic_read(&(bh->b_count)), 162 bh 442 print_internal(struct buffer_head *bh, int first, int last) argument 477 print_leaf(struct buffer_head *bh, int print_mode, int first, int last) argument 546 print_super_block(struct buffer_head *bh) argument 596 print_desc_block(struct buffer_head *bh) argument 611 print_block(struct buffer_head *bh, ...) argument 731 check_leaf_block_head(struct buffer_head *bh) argument 747 check_internal_block_head(struct buffer_head *bh) argument 762 check_leaf(struct buffer_head *bh) argument 774 check_internal(struct buffer_head *bh) argument [all...] |
/linux-master/fs/sysv/ |
H A D | balloc.c | 31 static inline sysv_zone_t *get_chunk(struct super_block *sb, struct buffer_head *bh) argument 33 char *bh_data = bh->b_data; 46 struct buffer_head * bh; local 78 bh = sb_getblk(sb, block); 79 if (!bh) { 84 memset(bh->b_data, 0, sb->s_blocksize); 85 *(__fs16*)bh->b_data = cpu_to_fs16(sbi, count); 86 memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t)); 87 mark_buffer_dirty(bh); 88 set_buffer_uptodate(bh); 105 struct buffer_head * bh; local 164 struct buffer_head * bh = NULL; local [all...] |
/linux-master/fs/hfs/ |
H A D | part_tbl.c | 61 struct buffer_head *bh; local 66 bh = sb_bread512(sb, *part_start + HFS_PMAP_BLK, data); 67 if (!bh) 76 pm = (struct old_pmap *)bh->b_data; 94 pm = (struct new_pmap *)bh->b_data; 104 brelse(bh); 105 bh = sb_bread512(sb, *part_start + HFS_PMAP_BLK + ++i, pm); 106 if (!bh) 114 brelse(bh);
|
/linux-master/fs/ext2/ |
H A D | xattr.c | 53 * by the bh lock. No more than a single bh lock is held at any time 69 #define HDR(bh) ((struct ext2_xattr_header *)((bh)->b_data)) 71 #define FIRST_ENTRY(bh) ENTRY(HDR(bh)+1) 81 # define ea_bdebug(bh, f...) do { \ 83 bh->b_bdev, (unsigned long) bh->b_blocknr); \ 89 # define ea_bdebug(bh, 199 struct buffer_head *bh = NULL; local 291 struct buffer_head *bh = NULL; local 410 struct buffer_head *bh = NULL; local 653 ext2_xattr_release_block(struct inode *inode, struct buffer_head *bh) argument 819 struct buffer_head *bh = NULL; local 872 ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh) argument 950 struct buffer_head *bh; local [all...] |