Home
last modified time | relevance | path

Searched refs:bh (Results 1 – 200 of 340) sorted by relevance

12

/linux-4.1.27/fs/ocfs2/
Dbuffer_head_io.c53 int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, in ocfs2_write_block() argument
58 trace_ocfs2_write_block((unsigned long long)bh->b_blocknr, ci); in ocfs2_write_block()
60 BUG_ON(bh->b_blocknr < OCFS2_SUPER_BLOCK_BLKNO); in ocfs2_write_block()
61 BUG_ON(buffer_jbd(bh)); in ocfs2_write_block()
74 lock_buffer(bh); in ocfs2_write_block()
75 set_buffer_uptodate(bh); in ocfs2_write_block()
78 clear_buffer_dirty(bh); in ocfs2_write_block()
80 get_bh(bh); /* for end_buffer_write_sync() */ in ocfs2_write_block()
81 bh->b_end_io = end_buffer_write_sync; in ocfs2_write_block()
82 submit_bh(WRITE, bh); in ocfs2_write_block()
[all …]
Dquota_local.c93 static int ocfs2_modify_bh(struct inode *inode, struct buffer_head *bh, in ocfs2_modify_bh() argument
107 status = ocfs2_journal_access_dq(handle, INODE_CACHE(inode), bh, in ocfs2_modify_bh()
114 lock_buffer(bh); in ocfs2_modify_bh()
115 modify(bh, private); in ocfs2_modify_bh()
116 unlock_buffer(bh); in ocfs2_modify_bh()
117 ocfs2_journal_dirty(handle, bh); in ocfs2_modify_bh()
134 struct buffer_head **bh) in ocfs2_read_quota_block() argument
137 struct buffer_head *tmp = *bh; in ocfs2_read_quota_block()
154 if (!rc && !*bh) in ocfs2_read_quota_block()
155 *bh = tmp; in ocfs2_read_quota_block()
[all …]
Dbuffer_head_io.h31 void ocfs2_end_buffer_io_sync(struct buffer_head *bh,
35 struct buffer_head *bh,
50 struct buffer_head *bh));
53 struct buffer_head *bh);
59 struct buffer_head **bh, in ocfs2_read_block() argument
61 struct buffer_head *bh)) in ocfs2_read_block() argument
65 if (bh == NULL) { in ocfs2_read_block()
71 status = ocfs2_read_blocks(ci, off, 1, bh, 0, validate); in ocfs2_read_block()
Duptodate.c244 struct buffer_head *bh) in ocfs2_buffer_cached() argument
253 (unsigned long long) bh->b_blocknr, in ocfs2_buffer_cached()
257 index = ocfs2_search_cache_array(ci, bh->b_blocknr); in ocfs2_buffer_cached()
259 item = ocfs2_search_cache_tree(ci, bh->b_blocknr); in ocfs2_buffer_cached()
274 struct buffer_head *bh) in ocfs2_buffer_uptodate() argument
279 if (!buffer_uptodate(bh)) in ocfs2_buffer_uptodate()
284 if (buffer_jbd(bh)) in ocfs2_buffer_uptodate()
289 return ocfs2_buffer_cached(ci, bh); in ocfs2_buffer_uptodate()
297 struct buffer_head *bh) in ocfs2_buffer_read_ahead() argument
299 return buffer_locked(bh) && ocfs2_buffer_cached(ci, bh); in ocfs2_buffer_read_ahead()
[all …]
Djournal.c511 struct buffer_head *bh, in ocfs2_frozen_trigger() argument
530 struct buffer_head *bh, in ocfs2_dq_frozen_trigger() argument
550 struct buffer_head *bh, in ocfs2_db_frozen_trigger() argument
566 struct buffer_head *bh) in ocfs2_abort_trigger() argument
571 (unsigned long)bh, in ocfs2_abort_trigger()
572 (unsigned long long)bh->b_blocknr); in ocfs2_abort_trigger()
576 ocfs2_error(bh->b_assoc_map->host->i_sb, in ocfs2_abort_trigger()
652 struct buffer_head *bh, in __ocfs2_journal_access() argument
662 BUG_ON(!bh); in __ocfs2_journal_access()
666 (unsigned long long)bh->b_blocknr, type, bh->b_size); in __ocfs2_journal_access()
[all …]
Duptodate.h71 struct buffer_head *bh);
73 struct buffer_head *bh);
75 struct buffer_head *bh);
77 struct buffer_head *bh);
82 struct buffer_head *bh);
Ddir.c153 struct buffer_head *bh, u16 rec_len) in ocfs2_init_dir_trailer() argument
157 trailer = ocfs2_trailer_from_bh(bh, inode->i_sb); in ocfs2_init_dir_trailer()
162 trailer->db_blkno = cpu_to_le64(bh->b_blocknr); in ocfs2_init_dir_trailer()
318 struct buffer_head * bh, in ocfs2_check_dir_entry() argument
331 ((char *) de - bh->b_data) + rlen > dir->i_sb->s_blocksize)) in ocfs2_check_dir_entry()
358 static inline int ocfs2_search_dirblock(struct buffer_head *bh, in ocfs2_search_dirblock() argument
383 if (!ocfs2_check_dir_entry(dir, de, bh, offset)) { in ocfs2_search_dirblock()
438 struct buffer_head *bh) in ocfs2_validate_dir_block() argument
442 ocfs2_trailer_from_bh(bh, sb); in ocfs2_validate_dir_block()
449 trace_ocfs2_validate_dir_block((unsigned long long)bh->b_blocknr); in ocfs2_validate_dir_block()
[all …]
Dextent_map.h66 struct buffer_head *bh));
73 struct buffer_head **bh, in ocfs2_read_virt_block() argument
75 struct buffer_head *bh)) in ocfs2_read_virt_block() argument
79 if (bh == NULL) { in ocfs2_read_virt_block()
85 status = ocfs2_read_virt_blocks(inode, v_block, 1, bh, 0, validate); in ocfs2_read_virt_block()
Dsymlink.c60 struct buffer_head *bh = NULL; in ocfs2_fast_symlink_readpage() local
61 int status = ocfs2_read_inode_block(inode, &bh); in ocfs2_fast_symlink_readpage()
72 fe = (struct ocfs2_dinode *) bh->b_data; in ocfs2_fast_symlink_readpage()
81 brelse(bh); in ocfs2_fast_symlink_readpage()
Dquota_global.c132 int ocfs2_validate_quota_block(struct super_block *sb, struct buffer_head *bh) in ocfs2_validate_quota_block() argument
135 ocfs2_block_dqtrailer(sb->s_blocksize, bh->b_data); in ocfs2_validate_quota_block()
137 trace_ocfs2_validate_quota_block((unsigned long long)bh->b_blocknr); in ocfs2_validate_quota_block()
139 BUG_ON(!buffer_uptodate(bh)); in ocfs2_validate_quota_block()
146 return ocfs2_validate_meta_ecc(sb, bh->b_data, &dqt->dq_check); in ocfs2_validate_quota_block()
174 struct buffer_head *bh; in ocfs2_quota_read() local
196 bh = NULL; in ocfs2_quota_read()
197 err = ocfs2_read_quota_phys_block(gqinode, pblock, &bh); in ocfs2_quota_read()
202 memcpy(data, bh->b_data + offset, tocopy); in ocfs2_quota_read()
203 brelse(bh); in ocfs2_quota_read()
[all …]
Djournal.h291 struct buffer_head *bh, int type);
294 struct buffer_head *bh, int type);
297 struct buffer_head *bh, int type);
300 struct buffer_head *bh, int type);
303 struct buffer_head *bh, int type);
306 struct buffer_head *bh, int type);
309 struct buffer_head *bh, int type);
312 struct buffer_head *bh, int type);
315 struct buffer_head *bh, int type);
318 struct buffer_head *bh, int type);
[all …]
Daops.c62 struct buffer_head *bh = NULL; in ocfs2_symlink_get_block() local
79 status = ocfs2_read_inode_block(inode, &bh); in ocfs2_symlink_get_block()
84 fe = (struct ocfs2_dinode *) bh->b_data; in ocfs2_symlink_get_block()
132 brelse(bh); in ocfs2_symlink_get_block()
431 struct buffer_head *bh)) in walk_page_buffers() argument
433 struct buffer_head *bh; in walk_page_buffers() local
439 for ( bh = head, block_start = 0; in walk_page_buffers()
440 ret == 0 && (bh != head || !block_start); in walk_page_buffers()
441 block_start = block_end, bh = next) in walk_page_buffers()
443 next = bh->b_this_page; in walk_page_buffers()
[all …]
Dioctl.c85 struct buffer_head *bh = NULL; in ocfs2_set_inode_attr() local
91 status = ocfs2_inode_lock(inode, &bh, 1); in ocfs2_set_inode_attr()
129 status = ocfs2_mark_inode_dirty(handle, inode, bh); in ocfs2_set_inode_attr()
140 brelse(bh); in ocfs2_set_inode_attr()
286 struct buffer_head *bh = NULL; in ocfs2_info_scan_inode_alloc() local
293 status = ocfs2_inode_lock(inode_alloc, &bh, 0); in ocfs2_info_scan_inode_alloc()
300 status = ocfs2_read_blocks_sync(osb, blkno, 1, &bh); in ocfs2_info_scan_inode_alloc()
307 dinode_alloc = (struct ocfs2_dinode *)bh->b_data; in ocfs2_info_scan_inode_alloc()
322 brelse(bh); in ocfs2_info_scan_inode_alloc()
444 struct buffer_head *bh = NULL; in ocfs2_info_freefrag_scan_chain() local
[all …]
Dslot_map.c167 struct buffer_head **bh) in ocfs2_update_disk_slot_extended() argument
180 *bh = si->si_bh[blkind]; in ocfs2_update_disk_slot_extended()
185 struct buffer_head **bh) in ocfs2_update_disk_slot_old() argument
198 *bh = si->si_bh[0]; in ocfs2_update_disk_slot_old()
206 struct buffer_head *bh; in ocfs2_update_disk_slot() local
210 ocfs2_update_disk_slot_extended(si, slot_num, &bh); in ocfs2_update_disk_slot()
212 ocfs2_update_disk_slot_old(si, slot_num, &bh); in ocfs2_update_disk_slot()
215 status = ocfs2_write_block(osb, bh, INODE_CACHE(si->si_inode)); in ocfs2_update_disk_slot()
361 struct buffer_head *bh; in ocfs2_map_slot_buffers() local
403 bh = NULL; /* Acquire a fresh bh */ in ocfs2_map_slot_buffers()
[all …]
Dalloc.c438 struct buffer_head *bh, in __ocfs2_init_extent_tree() argument
444 et->et_root_bh = bh; in __ocfs2_init_extent_tree()
448 obj = (void *)bh->b_data; in __ocfs2_init_extent_tree()
460 struct buffer_head *bh) in ocfs2_init_dinode_extent_tree() argument
462 __ocfs2_init_extent_tree(et, ci, bh, ocfs2_journal_access_di, in ocfs2_init_dinode_extent_tree()
468 struct buffer_head *bh) in ocfs2_init_xattr_tree_extent_tree() argument
470 __ocfs2_init_extent_tree(et, ci, bh, ocfs2_journal_access_xb, in ocfs2_init_xattr_tree_extent_tree()
484 struct buffer_head *bh) in ocfs2_init_dx_root_extent_tree() argument
486 __ocfs2_init_extent_tree(et, ci, bh, ocfs2_journal_access_dr, in ocfs2_init_dx_root_extent_tree()
492 struct buffer_head *bh) in ocfs2_init_refcount_extent_tree() argument
[all …]
Dinode.c411 struct buffer_head *bh = NULL; in ocfs2_read_locked_inode() local
497 status = ocfs2_read_inode_block_full(inode, &bh, in ocfs2_read_locked_inode()
500 status = ocfs2_read_blocks_sync(osb, args->fi_blkno, 1, &bh); in ocfs2_read_locked_inode()
505 if (!status && !buffer_jbd(bh)) in ocfs2_read_locked_inode()
506 status = ocfs2_validate_inode_block(osb->sb, bh); in ocfs2_read_locked_inode()
514 fe = (struct ocfs2_dinode *) bh->b_data; in ocfs2_read_locked_inode()
543 brelse(bh); in ocfs2_read_locked_inode()
1252 struct buffer_head *bh) in ocfs2_mark_inode_dirty() argument
1255 struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; in ocfs2_mark_inode_dirty()
1259 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), bh, in ocfs2_mark_inode_dirty()
[all …]
Dalloc.h72 struct buffer_head *bh);
75 struct buffer_head *bh);
82 struct buffer_head *bh);
85 struct buffer_head *bh);
93 struct buffer_head **bh);
284 struct buffer_head *bh; member
296 #define path_root_bh(_path) ((_path)->p_node[0].bh)
299 #define path_leaf_bh(_path) ((_path)->p_node[(_path)->p_tree_depth].bh)
Dsuper.c129 struct buffer_head *bh,
133 struct buffer_head *bh,
137 struct buffer_head **bh,
757 struct buffer_head **bh, in ocfs2_sb_probe() argument
766 *bh = NULL; in ocfs2_sb_probe()
782 status = ocfs2_get_sector(sb, bh, 0, *sector_size); in ocfs2_sb_probe()
787 hdr = (struct ocfs1_vol_disk_hdr *) (*bh)->b_data; in ocfs2_sb_probe()
799 brelse(*bh); in ocfs2_sb_probe()
800 *bh = NULL; in ocfs2_sb_probe()
816 tmpstat = ocfs2_get_sector(sb, bh, in ocfs2_sb_probe()
[all …]
Dinode.h158 struct buffer_head *bh);
174 struct buffer_head *bh);
180 int ocfs2_read_inode_block(struct inode *inode, struct buffer_head **bh);
182 int ocfs2_read_inode_block_full(struct inode *inode, struct buffer_head **bh,
/linux-4.1.27/fs/
Dbuffer.c50 void init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private) in init_buffer() argument
52 bh->b_end_io = handler; in init_buffer()
53 bh->b_private = private; in init_buffer()
57 inline void touch_buffer(struct buffer_head *bh) in touch_buffer() argument
59 trace_block_touch_buffer(bh); in touch_buffer()
60 mark_page_accessed(bh->b_page); in touch_buffer()
64 void __lock_buffer(struct buffer_head *bh) in __lock_buffer() argument
66 wait_on_bit_lock_io(&bh->b_state, BH_Lock, TASK_UNINTERRUPTIBLE); in __lock_buffer()
70 void unlock_buffer(struct buffer_head *bh) in unlock_buffer() argument
72 clear_bit_unlock(BH_Lock, &bh->b_state); in unlock_buffer()
[all …]
Ddax.c66 static long dax_get_addr(struct buffer_head *bh, void **addr, unsigned blkbits) in dax_get_addr() argument
69 sector_t sector = bh->b_blocknr << (blkbits - 9); in dax_get_addr()
70 return bdev_direct_access(bh->b_bdev, sector, addr, &pfn, bh->b_size); in dax_get_addr()
84 static bool buffer_written(struct buffer_head *bh) in buffer_written() argument
86 return buffer_mapped(bh) && !buffer_unwritten(bh); in buffer_written()
96 static bool buffer_size_valid(struct buffer_head *bh) in buffer_size_valid() argument
98 return bh->b_state != 0; in buffer_size_valid()
103 struct buffer_head *bh) in dax_io() argument
124 bh->b_size = PAGE_ALIGN(end - pos); in dax_io()
125 bh->b_state = 0; in dax_io()
[all …]
Dmpage.c98 map_buffer_to_page(struct page *page, struct buffer_head *bh, int page_block) in map_buffer_to_page() argument
110 buffer_uptodate(bh)) { in map_buffer_to_page()
120 page_bh->b_state = bh->b_state; in map_buffer_to_page()
121 page_bh->b_bdev = bh->b_bdev; in map_buffer_to_page()
122 page_bh->b_blocknr = bh->b_blocknr; in map_buffer_to_page()
440 struct buffer_head *bh, *head; in clean_buffers() local
444 bh = head; in clean_buffers()
449 clear_buffer_dirty(bh); in clean_buffers()
450 bh = bh->b_this_page; in clean_buffers()
451 } while (bh != head); in clean_buffers()
[all …]
/linux-4.1.27/fs/hpfs/
Dbuffer.c15 struct buffer_head *bh; in hpfs_prefetch_sectors() local
21 bh = sb_find_get_block(s, secno); in hpfs_prefetch_sectors()
22 if (bh) { in hpfs_prefetch_sectors()
23 if (buffer_uptodate(bh)) { in hpfs_prefetch_sectors()
24 brelse(bh); in hpfs_prefetch_sectors()
27 brelse(bh); in hpfs_prefetch_sectors()
46 struct buffer_head *bh; in hpfs_map_sector() local
54 *bhp = bh = sb_bread(s, secno); in hpfs_map_sector()
55 if (bh != NULL) in hpfs_map_sector()
56 return bh->b_data; in hpfs_map_sector()
[all …]
Danode.c15 struct buffer_head *bh) in hpfs_bplus_lookup() argument
27 brelse(bh); in hpfs_bplus_lookup()
28 if (!(anode = hpfs_map_anode(s, a, &bh))) return -1; in hpfs_bplus_lookup()
33 brelse(bh); in hpfs_bplus_lookup()
41 brelse(bh); in hpfs_bplus_lookup()
50 brelse(bh); in hpfs_bplus_lookup()
54 brelse(bh); in hpfs_bplus_lookup()
67 struct buffer_head *bh, *bh1, *bh2; in hpfs_add_sector_to_btree() local
72 if (!(fnode = hpfs_map_fnode(s, node, &bh))) return -1; in hpfs_add_sector_to_btree()
75 if (!(anode = hpfs_map_anode(s, node, &bh))) return -1; in hpfs_add_sector_to_btree()
[all …]
Dmap.c58 struct buffer_head *bh; in hpfs_load_code_page() local
65 struct code_page_directory *cp = hpfs_map_sector(s, cps, &bh, 0); in hpfs_load_code_page()
70 brelse(bh); in hpfs_load_code_page()
75 brelse(bh); in hpfs_load_code_page()
80 brelse(bh); in hpfs_load_code_page()
87 if (!(cpd = hpfs_map_sector(s, cpds, &bh, 0))) return NULL; in hpfs_load_code_page()
90 brelse(bh); in hpfs_load_code_page()
96 brelse(bh); in hpfs_load_code_page()
100 brelse(bh); in hpfs_load_code_page()
113 struct buffer_head *bh; in hpfs_load_bitmap_directory() local
[all …]
Dnamei.c27 struct buffer_head *bh; in hpfs_mkdir() local
40 fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh); in hpfs_mkdir()
98 mark_buffer_dirty(bh); in hpfs_mkdir()
99 brelse(bh); in hpfs_mkdir()
123 brelse(bh); in hpfs_mkdir()
135 struct buffer_head *bh; in hpfs_create() local
145 fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh); in hpfs_create()
189 mark_buffer_dirty(bh); in hpfs_create()
190 brelse(bh); in hpfs_create()
210 brelse(bh); in hpfs_create()
[all …]
Dinode.c45 struct buffer_head *bh; in hpfs_read_inode() local
52 if (!(fnode = hpfs_map_fnode(sb, i->i_ino, &bh))) { in hpfs_read_inode()
84 brelse(bh); in hpfs_read_inode()
104 brelse(bh); in hpfs_read_inode()
141 brelse(bh); in hpfs_read_inode()
210 struct buffer_head *bh; in hpfs_write_inode_nolock() local
215 if (!(fnode = hpfs_map_fnode(i->i_sb, i->i_ino, &bh))) return; in hpfs_write_inode_nolock()
218 brelse(bh); in hpfs_write_inode_nolock()
254 mark_buffer_dirty(bh); in hpfs_write_inode_nolock()
255 brelse(bh); in hpfs_write_inode_nolock()
/linux-4.1.27/fs/gfs2/
Dmeta_io.c38 struct buffer_head *bh, *head; in gfs2_aspace_writepage() local
47 bh = head; in gfs2_aspace_writepage()
50 if (!buffer_mapped(bh)) in gfs2_aspace_writepage()
60 lock_buffer(bh); in gfs2_aspace_writepage()
61 } else if (!trylock_buffer(bh)) { in gfs2_aspace_writepage()
65 if (test_clear_buffer_dirty(bh)) { in gfs2_aspace_writepage()
66 mark_buffer_async_write(bh); in gfs2_aspace_writepage()
68 unlock_buffer(bh); in gfs2_aspace_writepage()
70 } while ((bh = bh->b_this_page) != head); in gfs2_aspace_writepage()
80 struct buffer_head *next = bh->b_this_page; in gfs2_aspace_writepage()
[all …]
Ddir.c95 struct buffer_head *bh; in gfs2_dir_get_new_buffer() local
97 bh = gfs2_meta_new(ip->i_gl, block); in gfs2_dir_get_new_buffer()
98 gfs2_trans_add_meta(ip->i_gl, bh); in gfs2_dir_get_new_buffer()
99 gfs2_metatype_set(bh, GFS2_METATYPE_JD, GFS2_FORMAT_JD); in gfs2_dir_get_new_buffer()
100 gfs2_buffer_clear_tail(bh, sizeof(struct gfs2_meta_header)); in gfs2_dir_get_new_buffer()
101 *bhp = bh; in gfs2_dir_get_new_buffer()
108 struct buffer_head *bh; in gfs2_dir_get_existing_buffer() local
111 error = gfs2_meta_read(ip->i_gl, block, DIO_WAIT, &bh); in gfs2_dir_get_existing_buffer()
114 if (gfs2_metatype_check(GFS2_SB(&ip->i_inode), bh, GFS2_METATYPE_JD)) { in gfs2_dir_get_existing_buffer()
115 brelse(bh); in gfs2_dir_get_existing_buffer()
[all …]
Dbmap.c60 struct buffer_head *bh; in gfs2_unstuffer_page() local
88 bh = page_buffers(page); in gfs2_unstuffer_page()
90 if (!buffer_mapped(bh)) in gfs2_unstuffer_page()
91 map_bh(bh, inode->i_sb, block); in gfs2_unstuffer_page()
93 set_buffer_uptodate(bh); in gfs2_unstuffer_page()
95 mark_buffer_dirty(bh); in gfs2_unstuffer_page()
97 gfs2_trans_add_data(ip->i_gl, bh); in gfs2_unstuffer_page()
120 struct buffer_head *bh, *dibh; in gfs2_unstuff_dinode() local
142 error = gfs2_dir_get_new_buffer(ip, block, &bh); in gfs2_unstuff_dinode()
145 gfs2_buffer_copy_tail(bh, sizeof(struct gfs2_meta_header), in gfs2_unstuff_dinode()
[all …]
Dtrans.c126 struct buffer_head *bh, in gfs2_alloc_bufdata() argument
132 bd->bd_bh = bh; in gfs2_alloc_bufdata()
136 bh->b_private = bd; in gfs2_alloc_bufdata()
158 void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) in gfs2_trans_add_data() argument
162 struct address_space *mapping = bh->b_page->mapping; in gfs2_trans_add_data()
171 lock_buffer(bh); in gfs2_trans_add_data()
173 bd = bh->b_private; in gfs2_trans_add_data()
176 unlock_buffer(bh); in gfs2_trans_add_data()
177 if (bh->b_private == NULL) in gfs2_trans_add_data()
178 bd = gfs2_alloc_bufdata(gl, bh, &gfs2_databuf_lops); in gfs2_trans_add_data()
[all …]
Dmeta_io.h17 static inline void gfs2_buffer_clear(struct buffer_head *bh) in gfs2_buffer_clear() argument
19 memset(bh->b_data, 0, bh->b_size); in gfs2_buffer_clear()
22 static inline void gfs2_buffer_clear_tail(struct buffer_head *bh, int head) in gfs2_buffer_clear_tail() argument
24 BUG_ON(head > bh->b_size); in gfs2_buffer_clear_tail()
25 memset(bh->b_data + head, 0, bh->b_size - head); in gfs2_buffer_clear_tail()
57 extern int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh);
60 extern void gfs2_remove_from_journal(struct buffer_head *bh,
74 #define buffer_busy(bh) \ argument
75 ((bh)->b_state & ((1ul << BH_Dirty) | (1ul << BH_Lock) | (1ul << BH_Pinned)))
Dutil.h79 int gfs2_meta_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
84 struct buffer_head *bh) in gfs2_meta_check() argument
86 struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; in gfs2_meta_check()
90 (unsigned long long)bh->b_blocknr); in gfs2_meta_check()
96 int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
102 struct buffer_head *bh, in gfs2_metatype_check_i() argument
107 struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; in gfs2_metatype_check_i()
111 return gfs2_meta_check_ii(sdp, bh, "magic number", function, in gfs2_metatype_check_i()
114 return gfs2_metatype_check_ii(sdp, bh, type, t, function, in gfs2_metatype_check_i()
119 #define gfs2_metatype_check(sdp, bh, type) \ argument
[all …]
Drecovery.c33 struct buffer_head **bh) in gfs2_replay_read_block() argument
50 *bh = gfs2_meta_ra(gl, dblock, extlen); in gfs2_replay_read_block()
153 struct buffer_head *bh; in get_log_header() local
159 error = gfs2_replay_read_block(jd, blk, &bh); in get_log_header()
163 hash = crc32_le((u32)~0, bh->b_data, sizeof(struct gfs2_log_header) - in get_log_header()
167 error = gfs2_log_header_in(&lh, bh->b_data); in get_log_header()
168 brelse(bh); in get_log_header()
317 struct buffer_head *bh; in foreach_descriptor() local
327 error = gfs2_replay_read_block(jd, start, &bh); in foreach_descriptor()
330 if (gfs2_meta_check(sdp, bh)) { in foreach_descriptor()
[all …]
Dlops.c41 void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh) in gfs2_pin() argument
47 clear_buffer_dirty(bh); in gfs2_pin()
48 if (test_set_buffer_pinned(bh)) in gfs2_pin()
50 if (!buffer_uptodate(bh)) in gfs2_pin()
51 gfs2_io_error_bh(sdp, bh); in gfs2_pin()
52 bd = bh->b_private; in gfs2_pin()
60 get_bh(bh); in gfs2_pin()
98 static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, in gfs2_unpin() argument
101 struct gfs2_bufdata *bd = bh->b_private; in gfs2_unpin()
103 BUG_ON(!buffer_uptodate(bh)); in gfs2_unpin()
[all …]
Daops.c46 struct buffer_head *bh; in gfs2_page_add_databufs() local
49 for (bh = head, start = 0; bh != head || !start; in gfs2_page_add_databufs()
50 bh = bh->b_this_page, start = end) { in gfs2_page_add_databufs()
55 set_buffer_uptodate(bh); in gfs2_page_add_databufs()
56 gfs2_trans_add_data(ip->i_gl, bh); in gfs2_page_add_databufs()
964 static void gfs2_discard(struct gfs2_sbd *sdp, struct buffer_head *bh) in gfs2_discard() argument
968 lock_buffer(bh); in gfs2_discard()
970 clear_buffer_dirty(bh); in gfs2_discard()
971 bd = bh->b_private; in gfs2_discard()
973 if (!list_empty(&bd->bd_list) && !buffer_pinned(bh)) in gfs2_discard()
[all …]
Dxattr.c75 typedef int (*ea_call_t) (struct gfs2_inode *ip, struct buffer_head *bh,
79 static int ea_foreach_i(struct gfs2_inode *ip, struct buffer_head *bh, in ea_foreach_i() argument
85 if (gfs2_metatype_check(GFS2_SB(&ip->i_inode), bh, GFS2_METATYPE_EA)) in ea_foreach_i()
88 for (ea = GFS2_EA_BH2FIRST(bh);; prev = ea, ea = GFS2_EA2NEXT(ea)) { in ea_foreach_i()
91 if (!(bh->b_data <= (char *)ea && (char *)GFS2_EA2NEXT(ea) <= in ea_foreach_i()
92 bh->b_data + bh->b_size)) in ea_foreach_i()
97 error = ea_call(ip, bh, ea, prev, data); in ea_foreach_i()
103 bh->b_data + bh->b_size) in ea_foreach_i()
118 struct buffer_head *bh, *eabh; in ea_foreach() local
122 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, &bh); in ea_foreach()
[all …]
Dlog.c101 struct buffer_head *bh; in gfs2_ail1_start_one() local
104 bh = bd->bd_bh; in gfs2_ail1_start_one()
108 if (!buffer_busy(bh)) { in gfs2_ail1_start_one()
109 if (!buffer_uptodate(bh)) in gfs2_ail1_start_one()
110 gfs2_io_error_bh(sdp, bh); in gfs2_ail1_start_one()
115 if (!buffer_dirty(bh)) in gfs2_ail1_start_one()
121 mapping = bh->b_page->mapping; in gfs2_ail1_start_one()
193 struct buffer_head *bh; in gfs2_ail1_empty_one() local
197 bh = bd->bd_bh; in gfs2_ail1_empty_one()
199 if (buffer_busy(bh)) in gfs2_ail1_empty_one()
[all …]
Dutil.c196 int gfs2_meta_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, in gfs2_meta_check_ii() argument
205 (unsigned long long)bh->b_blocknr, type, in gfs2_meta_check_ii()
216 int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, in gfs2_metatype_check_ii() argument
225 (unsigned long long)bh->b_blocknr, type, t, in gfs2_metatype_check_ii()
253 int gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh, in gfs2_io_error_bh_i() argument
261 (unsigned long long)bh->b_blocknr, in gfs2_io_error_bh_i()
Ddir.h25 struct buffer_head *bh; member
38 if (da->bh) in gfs2_dir_no_add()
39 brelse(da->bh); in gfs2_dir_no_add()
40 da->bh = NULL; in gfs2_dir_no_add()
Dquota.c373 struct buffer_head *bh; in bh_get() local
391 error = gfs2_meta_read(ip->i_gl, bh_map.b_blocknr, DIO_WAIT, &bh); in bh_get()
395 if (gfs2_metatype_check(sdp, bh, GFS2_METATYPE_QC)) in bh_get()
398 qd->qd_bh = bh; in bh_get()
400 (bh->b_data + sizeof(struct gfs2_meta_header) + in bh_get()
408 brelse(bh); in bh_get()
679 struct buffer_head *bh; in gfs2_adjust_quota() local
729 bh = page_buffers(page); in gfs2_adjust_quota()
732 bh = bh->b_this_page; in gfs2_adjust_quota()
737 if (!buffer_mapped(bh)) { in gfs2_adjust_quota()
[all …]
/linux-4.1.27/fs/jbd/
Dcommit.c29 static void journal_end_buffer_io_sync(struct buffer_head *bh, int uptodate) in journal_end_buffer_io_sync() argument
31 BUFFER_TRACE(bh, ""); in journal_end_buffer_io_sync()
33 set_buffer_uptodate(bh); in journal_end_buffer_io_sync()
35 clear_buffer_uptodate(bh); in journal_end_buffer_io_sync()
36 unlock_buffer(bh); in journal_end_buffer_io_sync()
53 static void release_buffer_page(struct buffer_head *bh) in release_buffer_page() argument
57 if (buffer_dirty(bh)) in release_buffer_page()
59 if (atomic_read(&bh->b_count) != 1) in release_buffer_page()
61 page = bh->b_page; in release_buffer_page()
72 __brelse(bh); in release_buffer_page()
[all …]
Dtransaction.c497 static void warn_dirty_buffer(struct buffer_head *bh) in warn_dirty_buffer() argument
505 bdevname(bh->b_bdev, b), (unsigned long long)bh->b_blocknr); in warn_dirty_buffer()
522 struct buffer_head *bh; in do_get_write_access() local
539 bh = jh2bh(jh); in do_get_write_access()
543 lock_buffer(bh); in do_get_write_access()
544 jbd_lock_bh_state(bh); in do_get_write_access()
559 if (buffer_dirty(bh)) { in do_get_write_access()
572 warn_dirty_buffer(bh); in do_get_write_access()
580 clear_buffer_dirty(bh); in do_get_write_access()
581 set_buffer_jbddirty(bh); in do_get_write_access()
[all …]
Dcheckpoint.c96 struct buffer_head *bh = jh2bh(jh); in __try_to_free_cp_buf() local
98 if (jh->b_jlist == BJ_None && !buffer_locked(bh) && in __try_to_free_cp_buf()
99 !buffer_dirty(bh) && !buffer_write_io_error(bh)) { in __try_to_free_cp_buf()
104 get_bh(bh); in __try_to_free_cp_buf()
107 jbd_unlock_bh_state(bh); in __try_to_free_cp_buf()
108 BUFFER_TRACE(bh, "release"); in __try_to_free_cp_buf()
109 __brelse(bh); in __try_to_free_cp_buf()
111 jbd_unlock_bh_state(bh); in __try_to_free_cp_buf()
186 static void jbd_sync_bh(journal_t *journal, struct buffer_head *bh) in jbd_sync_bh() argument
189 get_bh(bh); in jbd_sync_bh()
[all …]
Drecovery.c74 struct buffer_head *bh; in do_readahead() local
97 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead()
98 if (!bh) { in do_readahead()
103 if (!buffer_uptodate(bh) && !buffer_locked(bh)) { in do_readahead()
104 bufs[nbufs++] = bh; in do_readahead()
111 brelse(bh); in do_readahead()
136 struct buffer_head *bh; in jread() local
153 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in jread()
154 if (!bh) in jread()
157 if (!buffer_uptodate(bh)) { in jread()
[all …]
Drevoke.c335 struct buffer_head *bh = NULL; in journal_revoke() local
351 bh = bh_in; in journal_revoke()
353 if (!bh) { in journal_revoke()
354 bh = __find_get_block(bdev, blocknr, journal->j_blocksize); in journal_revoke()
355 if (bh) in journal_revoke()
356 BUFFER_TRACE(bh, "found on hash"); in journal_revoke()
367 if (bh2 != bh && buffer_revokevalid(bh2)) in journal_revoke()
383 if (bh) { in journal_revoke()
384 if (!J_EXPECT_BH(bh, !buffer_revoked(bh), in journal_revoke()
387 brelse(bh); in journal_revoke()
[all …]
Djournal.c710 struct buffer_head *bh; in journal_get_descriptor_buffer() local
719 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in journal_get_descriptor_buffer()
720 if (!bh) in journal_get_descriptor_buffer()
722 lock_buffer(bh); in journal_get_descriptor_buffer()
723 memset(bh->b_data, 0, journal->j_blocksize); in journal_get_descriptor_buffer()
724 set_buffer_uptodate(bh); in journal_get_descriptor_buffer()
725 unlock_buffer(bh); in journal_get_descriptor_buffer()
726 BUFFER_TRACE(bh, "return this buffer"); in journal_get_descriptor_buffer()
727 return journal_add_journal_head(bh); in journal_get_descriptor_buffer()
803 struct buffer_head *bh; in journal_init_dev() local
[all …]
/linux-4.1.27/fs/nilfs2/
Dgcinode.c76 struct buffer_head *bh; in nilfs_gccache_submit_read_data() local
79 bh = nilfs_grab_buffer(inode, inode->i_mapping, blkoff, 0); in nilfs_gccache_submit_read_data()
80 if (unlikely(!bh)) in nilfs_gccache_submit_read_data()
83 if (buffer_uptodate(bh)) in nilfs_gccache_submit_read_data()
91 brelse(bh); in nilfs_gccache_submit_read_data()
96 lock_buffer(bh); in nilfs_gccache_submit_read_data()
97 if (buffer_uptodate(bh)) { in nilfs_gccache_submit_read_data()
98 unlock_buffer(bh); in nilfs_gccache_submit_read_data()
102 if (!buffer_mapped(bh)) { in nilfs_gccache_submit_read_data()
103 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_gccache_submit_read_data()
[all …]
Dbtnode.c47 struct buffer_head *bh; in nilfs_btnode_create_block() local
49 bh = nilfs_grab_buffer(inode, btnc, blocknr, 1 << BH_NILFS_Node); in nilfs_btnode_create_block()
50 if (unlikely(!bh)) in nilfs_btnode_create_block()
53 if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) || in nilfs_btnode_create_block()
54 buffer_dirty(bh))) { in nilfs_btnode_create_block()
55 brelse(bh); in nilfs_btnode_create_block()
58 memset(bh->b_data, 0, 1 << inode->i_blkbits); in nilfs_btnode_create_block()
59 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_btnode_create_block()
60 bh->b_blocknr = blocknr; in nilfs_btnode_create_block()
61 set_buffer_mapped(bh); in nilfs_btnode_create_block()
[all …]
Dmdt.c42 struct buffer_head *bh, in nilfs_mdt_insert_new_block() argument
53 bh->b_blocknr = 0; in nilfs_mdt_insert_new_block()
55 ret = nilfs_bmap_insert(ii->i_bmap, block, (unsigned long)bh); in nilfs_mdt_insert_new_block()
59 set_buffer_mapped(bh); in nilfs_mdt_insert_new_block()
61 kaddr = kmap_atomic(bh->b_page); in nilfs_mdt_insert_new_block()
62 memset(kaddr + bh_offset(bh), 0, 1 << inode->i_blkbits); in nilfs_mdt_insert_new_block()
64 init_block(inode, bh, kaddr); in nilfs_mdt_insert_new_block()
65 flush_dcache_page(bh->b_page); in nilfs_mdt_insert_new_block()
68 set_buffer_uptodate(bh); in nilfs_mdt_insert_new_block()
69 mark_buffer_dirty(bh); in nilfs_mdt_insert_new_block()
[all …]
Dpage.c48 struct buffer_head *bh; in __nilfs_get_page_block() local
54 bh = nilfs_page_get_nth_block(page, block - first_block); in __nilfs_get_page_block()
56 touch_buffer(bh); in __nilfs_get_page_block()
57 wait_on_buffer(bh); in __nilfs_get_page_block()
58 return bh; in __nilfs_get_page_block()
69 struct buffer_head *bh; in nilfs_grab_buffer() local
75 bh = __nilfs_get_page_block(page, blkoff, index, blkbits, b_state); in nilfs_grab_buffer()
76 if (unlikely(!bh)) { in nilfs_grab_buffer()
81 return bh; in nilfs_grab_buffer()
89 void nilfs_forget_buffer(struct buffer_head *bh) in nilfs_forget_buffer() argument
[all …]
Dsegbuf.c110 struct buffer_head *bh; in nilfs_segbuf_extend_segsum() local
112 bh = sb_getblk(segbuf->sb_super, in nilfs_segbuf_extend_segsum()
114 if (unlikely(!bh)) in nilfs_segbuf_extend_segsum()
117 nilfs_segbuf_add_segsum_buffer(segbuf, bh); in nilfs_segbuf_extend_segsum()
124 struct buffer_head *bh; in nilfs_segbuf_extend_payload() local
126 bh = sb_getblk(segbuf->sb_super, in nilfs_segbuf_extend_payload()
128 if (unlikely(!bh)) in nilfs_segbuf_extend_payload()
131 nilfs_segbuf_add_payload_buffer(segbuf, bh); in nilfs_segbuf_extend_payload()
132 *bhp = bh; in nilfs_segbuf_extend_payload()
185 struct buffer_head *bh; in nilfs_segbuf_fill_in_segsum_crc() local
[all …]
Dbtree.c75 struct buffer_head *bh; in nilfs_btree_get_new_block() local
77 bh = nilfs_btnode_create_block(btnc, ptr); in nilfs_btree_get_new_block()
78 if (!bh) in nilfs_btree_get_new_block()
81 set_buffer_nilfs_volatile(bh); in nilfs_btree_get_new_block()
82 *bhp = bh; in nilfs_btree_get_new_block()
401 int nilfs_btree_broken_node_block(struct buffer_head *bh) in nilfs_btree_broken_node_block() argument
405 if (buffer_nilfs_checked(bh)) in nilfs_btree_broken_node_block()
408 ret = nilfs_btree_node_broken((struct nilfs_btree_node *)bh->b_data, in nilfs_btree_broken_node_block()
409 bh->b_size, bh->b_blocknr); in nilfs_btree_broken_node_block()
411 set_buffer_nilfs_checked(bh); in nilfs_btree_broken_node_block()
[all …]
Dsegbuf.h112 #define NILFS_SEGBUF_NEXT_BH(bh) \ argument
113 (list_entry((bh)->b_assoc_buffers.next, struct buffer_head, \
115 #define NILFS_SEGBUF_BH_IS_LAST(bh, head) ((bh)->b_assoc_buffers.next == head) argument
148 struct buffer_head *bh) in nilfs_segbuf_add_segsum_buffer() argument
150 list_add_tail(&bh->b_assoc_buffers, &segbuf->sb_segsum_buffers); in nilfs_segbuf_add_segsum_buffer()
157 struct buffer_head *bh) in nilfs_segbuf_add_payload_buffer() argument
159 list_add_tail(&bh->b_assoc_buffers, &segbuf->sb_payload_buffers); in nilfs_segbuf_add_payload_buffer()
165 struct buffer_head *bh) in nilfs_segbuf_add_file_buffer() argument
167 get_bh(bh); in nilfs_segbuf_add_file_buffer()
168 nilfs_segbuf_add_payload_buffer(segbuf, bh); in nilfs_segbuf_add_file_buffer()
Dcpfile.c82 struct buffer_head *bh, in nilfs_cpfile_block_add_valid_checkpoints() argument
86 struct nilfs_checkpoint *cp = kaddr + bh_offset(bh); in nilfs_cpfile_block_add_valid_checkpoints()
96 struct buffer_head *bh, in nilfs_cpfile_block_sub_valid_checkpoints() argument
100 struct nilfs_checkpoint *cp = kaddr + bh_offset(bh); in nilfs_cpfile_block_sub_valid_checkpoints()
111 struct buffer_head *bh, in nilfs_cpfile_block_get_header() argument
114 return kaddr + bh_offset(bh); in nilfs_cpfile_block_get_header()
119 struct buffer_head *bh, in nilfs_cpfile_block_get_checkpoint() argument
122 return kaddr + bh_offset(bh) + nilfs_cpfile_get_offset(cpfile, cno) * in nilfs_cpfile_block_get_checkpoint()
127 struct buffer_head *bh, in nilfs_cpfile_block_init() argument
130 struct nilfs_checkpoint *cp = kaddr + bh_offset(bh); in nilfs_cpfile_block_init()
[all …]
Dsegment.c347 BUG_ON(NILFS_SEGBUF_BH_IS_LAST(ssp->bh, in nilfs_segctor_map_segsum_entry()
349 ssp->bh = NILFS_SEGBUF_NEXT_BH(ssp->bh); in nilfs_segctor_map_segsum_entry()
351 p = ssp->bh->b_data + ssp->offset; in nilfs_segctor_map_segsum_entry()
376 sci->sc_finfo_ptr.bh = sumbh; sci->sc_finfo_ptr.offset = sumbytes; in nilfs_segctor_reset_segment_buffer()
377 sci->sc_binfo_ptr.bh = sumbh; sci->sc_binfo_ptr.offset = sumbytes; in nilfs_segctor_reset_segment_buffer()
473 struct buffer_head *bh, in nilfs_segctor_add_file_block() argument
501 nilfs_segbuf_add_file_buffer(segbuf, bh); in nilfs_segctor_add_file_block()
511 struct buffer_head *bh, struct inode *inode) in nilfs_collect_file_data() argument
515 err = nilfs_bmap_propagate(NILFS_I(inode)->i_bmap, bh); in nilfs_collect_file_data()
519 err = nilfs_segctor_add_file_block(sci, bh, inode, in nilfs_collect_file_data()
[all …]
Dpage.h72 struct buffer_head *bh = page_buffers(page); in nilfs_page_get_nth_block() local
75 bh = bh->b_this_page; in nilfs_page_get_nth_block()
76 get_bh(bh); in nilfs_page_get_nth_block()
77 return bh; in nilfs_page_get_nth_block()
Ddirect.c122 struct buffer_head *bh; in nilfs_direct_insert() local
137 bh = (struct buffer_head *)((unsigned long)ptr); in nilfs_direct_insert()
138 set_buffer_nilfs_volatile(bh); in nilfs_direct_insert()
269 struct buffer_head *bh) in nilfs_direct_propagate() argument
281 key = nilfs_bmap_data_get_key(bmap, bh); in nilfs_direct_propagate()
283 if (!buffer_nilfs_volatile(bh)) { in nilfs_direct_propagate()
291 set_buffer_nilfs_volatile(bh); in nilfs_direct_propagate()
301 struct buffer_head **bh, in nilfs_direct_assign_v() argument
321 struct buffer_head **bh, in nilfs_direct_assign_p() argument
334 struct buffer_head **bh, in nilfs_direct_assign() argument
[all …]
Dfile.c85 struct buffer_head *bh, *head; in nilfs_page_mkwrite() local
88 bh = head = page_buffers(page); in nilfs_page_mkwrite()
90 if (!buffer_mapped(bh)) { in nilfs_page_mkwrite()
94 } while (bh = bh->b_this_page, bh != head); in nilfs_page_mkwrite()
Dsufile.c85 struct buffer_head *bh, void *kaddr) in nilfs_sufile_block_get_segment_usage() argument
87 return kaddr + bh_offset(bh) + in nilfs_sufile_block_get_segment_usage()
172 struct buffer_head *header_bh, *bh; in nilfs_sufile_updatev() local
201 ret = nilfs_mdt_get_block(sufile, blkoff, create, NULL, &bh); in nilfs_sufile_updatev()
206 dofunc(sufile, *seg, header_bh, bh); in nilfs_sufile_updatev()
216 brelse(bh); in nilfs_sufile_updatev()
217 ret = nilfs_mdt_get_block(sufile, blkoff, create, NULL, &bh); in nilfs_sufile_updatev()
221 brelse(bh); in nilfs_sufile_updatev()
239 struct buffer_head *header_bh, *bh; in nilfs_sufile_update() local
253 ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, create, &bh); in nilfs_sufile_update()
[all …]
Drecovery.c120 struct buffer_head *bh; in nilfs_compute_checksum() local
122 bh = __bread(nilfs->ns_bdev, ++start, blocksize); in nilfs_compute_checksum()
123 if (!bh) in nilfs_compute_checksum()
127 crc = crc32_le(crc, bh->b_data, size); in nilfs_compute_checksum()
128 brelse(bh); in nilfs_compute_checksum()
320 struct buffer_head *bh; in nilfs_scan_dsync_log() local
333 bh = __bread(nilfs->ns_bdev, start_blocknr, nilfs->ns_blocksize); in nilfs_scan_dsync_log()
334 if (unlikely(!bh)) in nilfs_scan_dsync_log()
342 finfo = nilfs_read_summary_info(nilfs, &bh, &offset, in nilfs_scan_dsync_log()
356 binfo = nilfs_read_summary_info(nilfs, &bh, &offset, in nilfs_scan_dsync_log()
[all …]
Dalloc.c193 struct buffer_head *bh, void *kaddr) in nilfs_palloc_desc_block_init() argument
195 struct nilfs_palloc_group_desc *desc = kaddr + bh_offset(bh); in nilfs_palloc_desc_block_init()
218 if (prev->bh && blkoff == prev->blkoff) { in nilfs_palloc_get_block()
219 get_bh(prev->bh); in nilfs_palloc_get_block()
220 *bhp = prev->bh; in nilfs_palloc_get_block()
233 brelse(prev->bh); in nilfs_palloc_get_block()
235 prev->bh = *bhp; in nilfs_palloc_get_block()
308 const struct buffer_head *bh, void *kaddr) in nilfs_palloc_block_get_group_desc() argument
310 return (struct nilfs_palloc_group_desc *)(kaddr + bh_offset(bh)) + in nilfs_palloc_block_get_group_desc()
322 const struct buffer_head *bh, void *kaddr) in nilfs_palloc_block_get_entry() argument
[all …]
/linux-4.1.27/fs/squashfs/
Dblock.c49 struct buffer_head *bh; in get_block_length() local
51 bh = sb_bread(sb, *cur_index); in get_block_length()
52 if (bh == NULL) in get_block_length()
56 *length = (unsigned char) bh->b_data[*offset]; in get_block_length()
57 put_bh(bh); in get_block_length()
58 bh = sb_bread(sb, ++(*cur_index)); in get_block_length()
59 if (bh == NULL) in get_block_length()
61 *length |= (unsigned char) bh->b_data[0] << 8; in get_block_length()
64 *length = (unsigned char) bh->b_data[*offset] | in get_block_length()
65 (unsigned char) bh->b_data[*offset + 1] << 8; in get_block_length()
[all …]
Dzlib_wrapper.c66 struct buffer_head **bh, int b, int offset, int length, in zlib_uncompress() argument
80 stream->next_in = bh[k]->b_data + offset; in zlib_uncompress()
103 put_bh(bh[k++]); in zlib_uncompress()
122 put_bh(bh[k]); in zlib_uncompress()
Dxz_wrapper.c133 struct buffer_head **bh, int b, int offset, int length, in squashfs_xz_uncompress() argument
151 stream->buf.in = bh[k]->b_data + offset; in squashfs_xz_uncompress()
168 put_bh(bh[k++]); in squashfs_xz_uncompress()
180 put_bh(bh[k]); in squashfs_xz_uncompress()
/linux-4.1.27/fs/omfs/
Ddir.c38 struct buffer_head *bh; in omfs_scan_list() local
44 bh = omfs_bread(dir->i_sb, block); in omfs_scan_list()
45 if (!bh) { in omfs_scan_list()
50 oi = (struct omfs_inode *) bh->b_data; in omfs_scan_list()
52 brelse(bh); in omfs_scan_list()
57 return bh; in omfs_scan_list()
61 brelse(bh); in omfs_scan_list()
70 struct buffer_head *bh; in omfs_find_entry() local
74 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_find_entry()
75 if (!bh) in omfs_find_entry()
[all …]
Dbitmap.c52 struct buffer_head *bh; in set_run() local
56 bh = sb_bread(sb, clus_to_blk(sbi, sbi->s_bitmap_ino) + map); in set_run()
57 if (!bh) in set_run()
65 mark_buffer_dirty(bh); in set_run()
66 brelse(bh); in set_run()
67 bh = sb_bread(sb, in set_run()
69 if (!bh) in set_run()
74 set_bit(bit, (unsigned long *)bh->b_data); in set_run()
77 clear_bit(bit, (unsigned long *)bh->b_data); in set_run()
80 mark_buffer_dirty(bh); in set_run()
[all …]
Dfile.c20 void omfs_make_empty_table(struct buffer_head *bh, int offset) in omfs_make_empty_table() argument
22 struct omfs_extent *oe = (struct omfs_extent *) &bh->b_data[offset]; in omfs_make_empty_table()
36 struct buffer_head *bh; in omfs_shrink_inode() local
52 bh = omfs_bread(inode->i_sb, next); in omfs_shrink_inode()
53 if (!bh) in omfs_shrink_inode()
56 oe = (struct omfs_extent *)(&bh->b_data[OMFS_EXTENT_START]); in omfs_shrink_inode()
61 if (omfs_is_bad(sbi, (struct omfs_header *) bh->b_data, next)) in omfs_shrink_inode()
82 omfs_make_empty_table(bh, (char *) oe - bh->b_data); in omfs_shrink_inode()
83 mark_buffer_dirty(bh); in omfs_shrink_inode()
84 brelse(bh); in omfs_shrink_inode()
[all …]
Dinode.c104 struct buffer_head *bh, *bh2; in __omfs_write_inode() local
111 bh = omfs_bread(inode->i_sb, inode->i_ino); in __omfs_write_inode()
112 if (!bh) in __omfs_write_inode()
115 oi = (struct omfs_inode *) bh->b_data; in __omfs_write_inode()
141 mark_buffer_dirty(bh); in __omfs_write_inode()
143 sync_dirty_buffer(bh); in __omfs_write_inode()
144 if (buffer_req(bh) && !buffer_uptodate(bh)) in __omfs_write_inode()
154 memcpy(bh2->b_data, bh->b_data, bh->b_size); in __omfs_write_inode()
165 brelse(bh); in __omfs_write_inode()
204 struct buffer_head *bh; in omfs_iget() local
[all …]
/linux-4.1.27/include/linux/
Dbuffer_head.h51 typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
85 static inline void set_buffer_##name(struct buffer_head *bh) \
87 set_bit(BH_##bit, &(bh)->b_state); \
89 static inline void clear_buffer_##name(struct buffer_head *bh) \
91 clear_bit(BH_##bit, &(bh)->b_state); \
93 static inline int buffer_##name(const struct buffer_head *bh) \
95 return test_bit(BH_##bit, &(bh)->b_state); \
102 static inline int test_set_buffer_##name(struct buffer_head *bh) \
104 return test_and_set_bit(BH_##bit, &(bh)->b_state); \
106 static inline int test_clear_buffer_##name(struct buffer_head *bh) \
[all …]
Djbd_common.h11 static inline struct journal_head *bh2jh(struct buffer_head *bh) in bh2jh() argument
13 return bh->b_private; in bh2jh()
16 static inline void jbd_lock_bh_state(struct buffer_head *bh) in jbd_lock_bh_state() argument
18 bit_spin_lock(BH_State, &bh->b_state); in jbd_lock_bh_state()
21 static inline int jbd_trylock_bh_state(struct buffer_head *bh) in jbd_trylock_bh_state() argument
23 return bit_spin_trylock(BH_State, &bh->b_state); in jbd_trylock_bh_state()
26 static inline int jbd_is_locked_bh_state(struct buffer_head *bh) in jbd_is_locked_bh_state() argument
28 return bit_spin_is_locked(BH_State, &bh->b_state); in jbd_is_locked_bh_state()
31 static inline void jbd_unlock_bh_state(struct buffer_head *bh) in jbd_unlock_bh_state() argument
33 bit_spin_unlock(BH_State, &bh->b_state); in jbd_unlock_bh_state()
[all …]
Djbd2.h343 #define J_ASSERT_BH(bh, expr) J_ASSERT(expr) argument
348 #define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr) argument
363 #define J_EXPECT_BH(bh, expr, why...) __journal_expect(expr, ## why)
1022 extern void __journal_free_buffer(struct journal_head *bh);
1025 static inline void jbd2_file_log_bh(struct list_head *head, struct buffer_head *bh) in jbd2_file_log_bh() argument
1027 list_add_tail(&bh->b_assoc_buffers, head); in jbd2_file_log_bh()
1029 static inline void jbd2_unfile_log_bh(struct buffer_head *bh) in jbd2_unfile_log_bh() argument
1031 list_del_init(&bh->b_assoc_buffers); in jbd2_unfile_log_bh()
1064 struct buffer_head *bh, void *mapped_data,
1072 struct buffer_head *bh);
[all …]
Djbd.h272 #define J_ASSERT_BH(bh, expr) J_ASSERT(expr) argument
277 #define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr) argument
291 #define J_EXPECT_BH(bh, expr, why...) __journal_expect(expr, ## why)
804 extern void __journal_free_buffer(struct journal_head *bh);
900 struct journal_head *journal_add_journal_head(struct buffer_head *bh);
901 struct journal_head *journal_grab_journal_head(struct buffer_head *bh);
1038 #define buffer_trace_init(bh) do {} while (0) argument
1039 #define print_buffer_fields(bh) do {} while (0) argument
1040 #define print_buffer_trace(bh) do {} while (0) argument
1041 #define BUFFER_TRACE(bh, info) do {} while (0) argument
[all …]
/linux-4.1.27/fs/reiserfs/
Dprints.c134 static void sprintf_block_head(char *buf, struct buffer_head *bh) in sprintf_block_head() argument
137 B_LEVEL(bh), B_NR_ITEMS(bh), B_FREE_SPACE(bh)); in sprintf_block_head()
140 static void sprintf_buffer_head(char *buf, struct buffer_head *bh) in sprintf_buffer_head() argument
146 bdevname(bh->b_bdev, b), bh->b_size, in sprintf_buffer_head()
147 (unsigned long long)bh->b_blocknr, atomic_read(&(bh->b_count)), in sprintf_buffer_head()
148 bh->b_state, bh->b_page, in sprintf_buffer_head()
149 buffer_uptodate(bh) ? "UPTODATE" : "!UPTODATE", in sprintf_buffer_head()
150 buffer_dirty(bh) ? "DIRTY" : "CLEAN", in sprintf_buffer_head()
151 buffer_locked(bh) ? "LOCKED" : "UNLOCKED"); in sprintf_buffer_head()
423 static int print_internal(struct buffer_head *bh, int first, int last) in print_internal() argument
[all …]
Dresize.c26 struct buffer_head *bh; in reiserfs_resize() local
48 bh = sb_bread(s, block_count_new - 1); in reiserfs_resize()
50 if (!bh) { in reiserfs_resize()
54 bforget(bh); in reiserfs_resize()
148 bh = sb_bread(s, i * s->s_blocksize * 8); in reiserfs_resize()
150 if (!bh) { in reiserfs_resize()
154 memset(bh->b_data, 0, sb_blocksize(sb)); in reiserfs_resize()
155 reiserfs_set_le_bit(0, bh->b_data); in reiserfs_resize()
156 reiserfs_cache_bitmap_metadata(s, bh, bitmap + i); in reiserfs_resize()
158 set_buffer_uptodate(bh); in reiserfs_resize()
[all …]
Djournal.c127 static int reiserfs_clean_and_file_buffer(struct buffer_head *bh) in reiserfs_clean_and_file_buffer() argument
129 if (bh) { in reiserfs_clean_and_file_buffer()
130 clear_buffer_dirty(bh); in reiserfs_clean_and_file_buffer()
131 clear_buffer_journal_test(bh); in reiserfs_clean_and_file_buffer()
412 static void clear_prepared_bits(struct buffer_head *bh) in clear_prepared_bits() argument
414 clear_buffer_journal_prepared(bh); in clear_prepared_bits()
415 clear_buffer_journal_restore_dirty(bh); in clear_prepared_bits()
604 static void release_buffer_page(struct buffer_head *bh) in release_buffer_page() argument
606 struct page *page = bh->b_page; in release_buffer_page()
609 put_bh(bh); in release_buffer_page()
[all …]
Dtail_conversion.c166 void reiserfs_unmap_buffer(struct buffer_head *bh) in reiserfs_unmap_buffer() argument
168 lock_buffer(bh); in reiserfs_unmap_buffer()
169 if (buffer_journaled(bh) || buffer_journal_dirty(bh)) { in reiserfs_unmap_buffer()
172 clear_buffer_dirty(bh); in reiserfs_unmap_buffer()
178 if ((!list_empty(&bh->b_assoc_buffers) || bh->b_private) && bh->b_page) { in reiserfs_unmap_buffer()
179 struct inode *inode = bh->b_page->mapping->host; in reiserfs_unmap_buffer()
182 list_del_init(&bh->b_assoc_buffers); in reiserfs_unmap_buffer()
183 reiserfs_free_jh(bh); in reiserfs_unmap_buffer()
186 clear_buffer_mapped(bh); in reiserfs_unmap_buffer()
187 clear_buffer_req(bh); in reiserfs_unmap_buffer()
[all …]
Dinode.c194 struct buffer_head *head, *next, *bh; in fix_tail_page_for_writing() local
198 bh = head; in fix_tail_page_for_writing()
200 next = bh->b_this_page; in fix_tail_page_for_writing()
201 if (buffer_mapped(bh) && bh->b_blocknr == 0) { in fix_tail_page_for_writing()
202 reiserfs_unmap_buffer(bh); in fix_tail_page_for_writing()
204 bh = next; in fix_tail_page_for_writing()
205 } while (bh != head); in fix_tail_page_for_writing()
230 static inline void set_block_dev_mapped(struct buffer_head *bh, in set_block_dev_mapped() argument
233 map_bh(bh, inode->i_sb, block); in set_block_dev_mapped()
289 struct buffer_head *bh; in _get_block_create_0() local
[all …]
Dlbalance.c830 struct buffer_head *bh; in leaf_delete_items() local
831 int item_amount = B_NR_ITEMS(bh = cur_bi->bi_bh); in leaf_delete_items()
833 RFALSE(!bh, "10155: bh is not defined"); in leaf_delete_items()
847 do_balance_mark_leaf_dirty(cur_bi->tb, bh, 0); in leaf_delete_items()
878 ih = item_head(bh, B_NR_ITEMS(bh) - 1); in leaf_delete_items()
894 leaf_cut_from_buffer(cur_bi, B_NR_ITEMS(bh) - 1, in leaf_delete_items()
906 struct buffer_head *bh = bi->bi_bh; in leaf_insert_into_buf() local
914 blkh = B_BLK_HEAD(bh); in leaf_insert_into_buf()
921 bh, inserted_item_ih); in leaf_insert_into_buf()
927 ih = item_head(bh, before); in leaf_insert_into_buf()
[all …]
Dfile.c182 struct buffer_head *bh, *head; in reiserfs_commit_page() local
201 for (bh = head = page_buffers(page), block_start = 0; in reiserfs_commit_page()
202 bh != head || !block_start; in reiserfs_commit_page()
203 block_start = block_end, bh = bh->b_this_page) { in reiserfs_commit_page()
205 new = buffer_new(bh); in reiserfs_commit_page()
206 clear_buffer_new(bh); in reiserfs_commit_page()
209 if (!buffer_uptodate(bh)) in reiserfs_commit_page()
212 set_buffer_uptodate(bh); in reiserfs_commit_page()
214 reiserfs_prepare_for_journal(s, bh, 1); in reiserfs_commit_page()
215 journal_mark_dirty(&th, bh); in reiserfs_commit_page()
[all …]
Dstree.c19 inline int B_IS_IN_TREE(const struct buffer_head *bh) in B_IS_IN_TREE() argument
22 RFALSE(B_LEVEL(bh) > MAX_HEIGHT, in B_IS_IN_TREE()
23 "PAP-1010: block (%b) has too big level (%z)", bh, bh); in B_IS_IN_TREE()
25 return (B_LEVEL(bh) != FREE_LEVEL); in B_IS_IN_TREE()
367 struct buffer_head *bh; in pathrelse_and_restore() local
368 bh = PATH_OFFSET_PBUFFER(search_path, path_offset--); in pathrelse_and_restore()
369 reiserfs_restore_prepared_buffer(sb, bh); in pathrelse_and_restore()
370 brelse(bh); in pathrelse_and_restore()
389 static int is_leaf(char *buf, int blocksize, struct buffer_head *bh) in is_leaf() argument
409 "nr_item seems wrong: %z", bh); in is_leaf()
[all …]
Dreiserfs.h226 struct buffer_head *bh; /* real buffer head */ member
744 void reiserfs_file_buffer(struct buffer_head *bh, int list);
1682 #define B_BLK_HEAD(bh) ((struct block_head *)((bh)->b_data)) argument
1684 #define B_NR_ITEMS(bh) (blkh_nr_item(B_BLK_HEAD(bh))) argument
1685 #define B_LEVEL(bh) (blkh_level(B_BLK_HEAD(bh))) argument
1686 #define B_FREE_SPACE(bh) (blkh_free_space(B_BLK_HEAD(bh))) argument
1688 #define PUT_B_NR_ITEMS(bh, val) do { set_blkh_nr_item(B_BLK_HEAD(bh), val); } while (0) argument
1689 #define PUT_B_LEVEL(bh, val) do { set_blkh_level(B_BLK_HEAD(bh), val); } while (0) argument
1690 #define PUT_B_FREE_SPACE(bh, val) do { set_blkh_free_space(B_BLK_HEAD(bh), val); } while (0) argument
1693 #define B_PRIGHT_DELIM_KEY(bh) (&(blk_right_delim_key(B_BLK_HEAD(bh)))) argument
[all …]
Dbitmap.c149 struct buffer_head *bh; in scan_bitmap_block() local
164 bh = reiserfs_read_bitmap_block(s, bmap_n); in scan_bitmap_block()
165 if (bh == NULL) in scan_bitmap_block()
171 brelse(bh); in scan_bitmap_block()
177 ((unsigned long *)(bh->b_data), boundary, *beg); in scan_bitmap_block()
184 brelse(bh); in scan_bitmap_block()
193 || reiserfs_test_le_bit(end, bh->b_data)) { in scan_bitmap_block()
215 reiserfs_prepare_for_journal(s, bh, 1); in scan_bitmap_block()
223 (i, bh->b_data)) { in scan_bitmap_block()
246 (i, bh->b_data); in scan_bitmap_block()
[all …]
Ddir.c67 struct buffer_head *bh; in reiserfs_readdir_inode() local
109 bh = de.de_bh; in reiserfs_readdir_inode()
118 RFALSE(item_num > B_NR_ITEMS(bh) - 1, in reiserfs_readdir_inode()
120 item_num, B_NR_ITEMS(bh)); in reiserfs_readdir_inode()
137 B_I_DEH(bh, ih) + entry_num; in reiserfs_readdir_inode()
149 d_reclen = entry_length(bh, ih, entry_num); in reiserfs_readdir_inode()
150 d_name = B_I_DEH_ENTRY_FILE_NAME(bh, ih, deh); in reiserfs_readdir_inode()
153 d_name + d_reclen > bh->b_data + bh->b_size) { in reiserfs_readdir_inode()
235 if (item_num != B_NR_ITEMS(bh) - 1) in reiserfs_readdir_inode()
Dfix_node.c2096 struct buffer_head *bh; in get_direct_parent() local
2120 (bh = PATH_OFFSET_PBUFFER(path, path_offset - 1))) in get_direct_parent()
2125 path_offset - 1)) > B_NR_ITEMS(bh)) in get_direct_parent()
2129 if (B_N_CHILD_NUM(bh, position) != in get_direct_parent()
2133 if (buffer_locked(bh)) { in get_direct_parent()
2135 __wait_on_buffer(bh); in get_direct_parent()
2161 struct buffer_head *bh; in get_neighbors() local
2169 bh = PATH_OFFSET_PBUFFER(tb->tb_path, path_offset); in get_neighbors()
2171 RFALSE(bh == tb->FL[h] && in get_neighbors()
2176 (bh == in get_neighbors()
[all …]
Dsuper.c200 struct buffer_head *bh; in finish_unfinished() local
259 bh = get_last_bh(&path); in finish_unfinished()
261 if (item_pos != B_NR_ITEMS(bh)) { in finish_unfinished()
267 ih = item_head(bh, item_pos); in finish_unfinished()
280 item = ih_item_body(bh, ih); in finish_unfinished()
1559 struct buffer_head *bh; in read_super_block() local
1563 bh = sb_bread(s, offset / s->s_blocksize); in read_super_block()
1564 if (!bh) { in read_super_block()
1572 rs = (struct reiserfs_super_block *)bh->b_data; in read_super_block()
1574 brelse(bh); in read_super_block()
[all …]
/linux-4.1.27/fs/ext4/
Dmmp.c41 static int write_mmp_block(struct super_block *sb, struct buffer_head *bh) in write_mmp_block() argument
43 struct mmp_struct *mmp = (struct mmp_struct *)(bh->b_data); in write_mmp_block()
51 mark_buffer_dirty(bh); in write_mmp_block()
52 lock_buffer(bh); in write_mmp_block()
53 bh->b_end_io = end_buffer_write_sync; in write_mmp_block()
54 get_bh(bh); in write_mmp_block()
55 submit_bh(WRITE_SYNC | REQ_META | REQ_PRIO, bh); in write_mmp_block()
56 wait_on_buffer(bh); in write_mmp_block()
58 if (unlikely(!buffer_uptodate(bh))) in write_mmp_block()
68 static int read_mmp_block(struct super_block *sb, struct buffer_head **bh, in read_mmp_block() argument
[all …]
Dext4_jbd2.c133 struct buffer_head *bh, in ext4_journal_abort_handle() argument
141 if (bh) in ext4_journal_abort_handle()
142 BUFFER_TRACE(bh, "abort"); in ext4_journal_abort_handle()
157 handle_t *handle, struct buffer_head *bh) in __ext4_journal_get_write_access() argument
164 err = jbd2_journal_get_write_access(handle, bh); in __ext4_journal_get_write_access()
166 ext4_journal_abort_handle(where, line, __func__, bh, in __ext4_journal_get_write_access()
186 struct buffer_head *bh, ext4_fsblk_t blocknr) in __ext4_forget() argument
193 BUFFER_TRACE(bh, "enter"); in __ext4_forget()
197 bh, is_metadata, inode->i_mode, in __ext4_forget()
202 bforget(bh); in __ext4_forget()
[all …]
Dpage-io.c53 static void buffer_io_error(struct buffer_head *bh) in buffer_io_error() argument
57 bdevname(bh->b_bdev, b), in buffer_io_error()
58 (unsigned long long)bh->b_blocknr); in buffer_io_error()
73 struct buffer_head *bh, *head; in ext4_finish_bio() local
95 bh = head = page_buffers(page); in ext4_finish_bio()
103 if (bh_offset(bh) < bio_start || in ext4_finish_bio()
104 bh_offset(bh) + bh->b_size > bio_end) { in ext4_finish_bio()
105 if (buffer_async_write(bh)) in ext4_finish_bio()
109 clear_buffer_async_write(bh); in ext4_finish_bio()
111 buffer_io_error(bh); in ext4_finish_bio()
[all …]
Dindirect.c32 struct buffer_head *bh; member
35 static inline void add_chain(Indirect *p, struct buffer_head *bh, __le32 *v) in add_chain() argument
38 p->bh = bh; in add_chain()
148 struct buffer_head *bh; in ext4_get_branch() local
157 bh = sb_getblk(sb, le32_to_cpu(p->key)); in ext4_get_branch()
158 if (unlikely(!bh)) { in ext4_get_branch()
163 if (!bh_uptodate_or_lock(bh)) { in ext4_get_branch()
164 if (bh_submit_read(bh) < 0) { in ext4_get_branch()
165 put_bh(bh); in ext4_get_branch()
169 if (ext4_check_indirect_blockref(inode, bh)) { in ext4_get_branch()
[all …]
Dballoc.c179 struct buffer_head *bh, in ext4_init_block_bitmap() argument
189 J_ASSERT_BH(bh, buffer_locked(bh)); in ext4_init_block_bitmap()
208 memset(bh->b_data, 0, sb->s_blocksize); in ext4_init_block_bitmap()
212 ext4_set_bit(bit, bh->b_data); in ext4_init_block_bitmap()
222 ext4_set_bit(EXT4_B2C(sbi, tmp - start), bh->b_data); in ext4_init_block_bitmap()
226 ext4_set_bit(EXT4_B2C(sbi, tmp - start), bh->b_data); in ext4_init_block_bitmap()
232 ext4_set_bit(EXT4_B2C(sbi, tmp - start), bh->b_data); in ext4_init_block_bitmap()
241 sb->s_blocksize * 8, bh->b_data); in ext4_init_block_bitmap()
242 ext4_block_bitmap_csum_set(sb, block_group, gdp, bh); in ext4_init_block_bitmap()
278 struct buffer_head **bh) in ext4_get_group_desc() argument
[all …]
Dxattr.c70 # define ea_bdebug(bh, f...) do { \ argument
73 bdevname(bh->b_bdev, b), \
74 (unsigned long) bh->b_blocknr); \
80 # define ea_bdebug(bh, fmt, ...) no_printk(fmt, ##__VA_ARGS__) argument
162 struct buffer_head *bh) in ext4_handle_dirty_xattr_block() argument
164 ext4_xattr_block_csum_set(inode, bh->b_blocknr, BHDR(bh)); in ext4_handle_dirty_xattr_block()
165 return ext4_handle_dirty_metadata(handle, inode, bh); in ext4_handle_dirty_xattr_block()
216 ext4_xattr_check_block(struct inode *inode, struct buffer_head *bh) in ext4_xattr_check_block() argument
220 if (buffer_verified(bh)) in ext4_xattr_check_block()
223 if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) || in ext4_xattr_check_block()
[all …]
Dnamei.c54 struct buffer_head *bh; in ext4_append() local
64 bh = ext4_bread(handle, inode, *block, 1); in ext4_append()
65 if (IS_ERR(bh)) in ext4_append()
66 return bh; in ext4_append()
69 BUFFER_TRACE(bh, "get_write_access"); in ext4_append()
70 err = ext4_journal_get_write_access(handle, bh); in ext4_append()
72 brelse(bh); in ext4_append()
76 return bh; in ext4_append()
94 struct buffer_head *bh; in __ext4_read_dirblock() local
98 bh = ext4_bread(NULL, inode, block, 0); in __ext4_read_dirblock()
[all …]
Dinode.c134 static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh);
663 static void ext4_update_bh_state(struct buffer_head *bh, unsigned long flags) in ext4_update_bh_state() argument
671 if (!bh->b_page) { in ext4_update_bh_state()
672 bh->b_state = (bh->b_state & ~EXT4_MAP_FLAGS) | flags; in ext4_update_bh_state()
681 old_state = READ_ONCE(bh->b_state); in ext4_update_bh_state()
684 cmpxchg(&bh->b_state, old_state, new_state) != old_state)); in ext4_update_bh_state()
691 struct buffer_head *bh, int flags) in _ext4_get_block() argument
702 map.m_len = bh->b_size >> inode->i_blkbits; in _ext4_get_block()
722 map_bh(bh, inode->i_sb, map.m_pblk); in _ext4_get_block()
723 ext4_update_bh_state(bh, map.m_flags); in _ext4_get_block()
[all …]
Dmigrate.c121 struct buffer_head *bh; in update_ind_extent_range() local
126 bh = sb_bread(inode->i_sb, pblock); in update_ind_extent_range()
127 if (!bh) in update_ind_extent_range()
130 i_data = (__le32 *)bh->b_data; in update_ind_extent_range()
141 put_bh(bh); in update_ind_extent_range()
150 struct buffer_head *bh; in update_dind_extent_range() local
155 bh = sb_bread(inode->i_sb, pblock); in update_dind_extent_range()
156 if (!bh) in update_dind_extent_range()
159 i_data = (__le32 *)bh->b_data; in update_dind_extent_range()
171 put_bh(bh); in update_dind_extent_range()
[all …]
Dbitmap.c20 struct buffer_head *bh, int sz) in ext4_inode_bitmap_csum_verify() argument
30 calculated = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_inode_bitmap_csum_verify()
42 struct buffer_head *bh, int sz) in ext4_inode_bitmap_csum_set() argument
50 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_inode_bitmap_csum_set()
58 struct buffer_head *bh) in ext4_block_bitmap_csum_verify() argument
69 calculated = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_block_bitmap_csum_verify()
84 struct buffer_head *bh) in ext4_block_bitmap_csum_set() argument
93 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_block_bitmap_csum_set()
Dresize.c96 struct buffer_head *bh = NULL; in verify_group_input() local
127 else if (!(bh = sb_bread(sb, end - 1))) in verify_group_input()
169 brelse(bh); in verify_group_input()
357 struct buffer_head *bh; in bclean() local
360 bh = sb_getblk(sb, blk); in bclean()
361 if (unlikely(!bh)) in bclean()
363 BUFFER_TRACE(bh, "get_write_access"); in bclean()
364 if ((err = ext4_journal_get_write_access(handle, bh))) { in bclean()
365 brelse(bh); in bclean()
366 bh = ERR_PTR(err); in bclean()
[all …]
Dialloc.c68 struct buffer_head *bh, in ext4_init_inode_bitmap() argument
74 J_ASSERT_BH(bh, buffer_locked(bh)); in ext4_init_inode_bitmap()
95 memset(bh->b_data, 0, (EXT4_INODES_PER_GROUP(sb) + 7) / 8); in ext4_init_inode_bitmap()
97 bh->b_data); in ext4_init_inode_bitmap()
98 ext4_inode_bitmap_csum_set(sb, block_group, gdp, bh, in ext4_init_inode_bitmap()
105 void ext4_end_bitmap_read(struct buffer_head *bh, int uptodate) in ext4_end_bitmap_read() argument
108 set_buffer_uptodate(bh); in ext4_end_bitmap_read()
109 set_bitmap_uptodate(bh); in ext4_end_bitmap_read()
111 unlock_buffer(bh); in ext4_end_bitmap_read()
112 put_bh(bh); in ext4_end_bitmap_read()
[all …]
Ddir.c64 struct buffer_head *bh, char *buf, int size, in __ext4_check_dir_entry() argument
86 ext4_error_file(filp, function, line, bh->b_blocknr, in __ext4_check_dir_entry()
93 ext4_error_inode(dir, function, line, bh->b_blocknr, in __ext4_check_dir_entry()
111 struct buffer_head *bh = NULL; in ext4_readdir() local
166 bh = ext4_bread(NULL, inode, map.m_lblk, 0); in ext4_readdir()
167 if (IS_ERR(bh)) in ext4_readdir()
168 return PTR_ERR(bh); in ext4_readdir()
171 if (!bh) { in ext4_readdir()
187 if (!buffer_verified(bh) && in ext4_readdir()
189 (struct ext4_dir_entry *)bh->b_data)) { in ext4_readdir()
[all …]
Dmove_extent.c184 struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE]; in mext_page_mkuptodate() local
199 for (bh = head, block_start = 0; bh != head || !block_start; in mext_page_mkuptodate()
200 block++, block_start = block_end, bh = bh->b_this_page) { in mext_page_mkuptodate()
203 if (!buffer_uptodate(bh)) in mext_page_mkuptodate()
207 if (buffer_uptodate(bh)) in mext_page_mkuptodate()
209 if (!buffer_mapped(bh)) { in mext_page_mkuptodate()
210 err = ext4_get_block(inode, block, bh, 0); in mext_page_mkuptodate()
215 if (!buffer_mapped(bh)) { in mext_page_mkuptodate()
217 set_buffer_uptodate(bh); in mext_page_mkuptodate()
222 arr[nr++] = bh; in mext_page_mkuptodate()
[all …]
Dinline.c117 brelse(iloc.bh); in ext4_get_max_inline_size()
160 brelse(is.iloc.bh); in ext4_find_inline_data_nolock()
263 BUFFER_TRACE(is.iloc.bh, "get_write_access"); in ext4_create_inline_data()
264 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_create_inline_data()
302 get_bh(is.iloc.bh); in ext4_create_inline_data()
306 brelse(is.iloc.bh); in ext4_create_inline_data()
347 BUFFER_TRACE(is.iloc.bh, "get_write_access"); in ext4_update_inline_data()
348 error = ext4_journal_get_write_access(handle, is.iloc.bh); in ext4_update_inline_data()
365 get_bh(is.iloc.bh); in ext4_update_inline_data()
370 brelse(is.iloc.bh); in ext4_update_inline_data()
[all …]
Dext4_jbd2.h235 handle_t *handle, struct buffer_head *bh);
239 struct buffer_head *bh, ext4_fsblk_t blocknr);
242 handle_t *handle, struct buffer_head *bh);
246 struct buffer_head *bh);
251 #define ext4_journal_get_write_access(handle, bh) \ argument
252 __ext4_journal_get_write_access(__func__, __LINE__, (handle), (bh))
253 #define ext4_forget(handle, is_metadata, inode, bh, block_nr) \ argument
255 (bh), (block_nr))
256 #define ext4_journal_get_create_access(handle, bh) \ argument
257 __ext4_journal_get_create_access(__func__, __LINE__, (handle), (bh))
[all …]
Dfile.c195 static void ext4_end_io_unwritten(struct buffer_head *bh, int uptodate) in ext4_end_io_unwritten() argument
197 struct inode *inode = bh->b_assoc_map->host; in ext4_end_io_unwritten()
199 loff_t offset = (loff_t)(uintptr_t)bh->b_private << inode->i_blkbits; in ext4_end_io_unwritten()
203 WARN_ON(!buffer_unwritten(bh)); in ext4_end_io_unwritten()
204 err = ext4_convert_unwritten_extents(NULL, inode, offset, bh->b_size); in ext4_end_io_unwritten()
385 struct buffer_head *bh, *head; in ext4_find_unwritten_pgoff() local
412 bh = head = page_buffers(page); in ext4_find_unwritten_pgoff()
414 if (buffer_uptodate(bh) || in ext4_find_unwritten_pgoff()
415 buffer_unwritten(bh)) { in ext4_find_unwritten_pgoff()
428 lastoff += bh->b_size; in ext4_find_unwritten_pgoff()
[all …]
Dxattr.h71 #define BHDR(bh) ((struct ext4_xattr_header *)((bh)->b_data)) argument
73 #define BFIRST(bh) ENTRY(BHDR(bh)+1) argument
Dextents.c503 struct buffer_head *bh; in __read_extent_tree_block() local
506 bh = sb_getblk_gfp(inode->i_sb, pblk, __GFP_MOVABLE | GFP_NOFS); in __read_extent_tree_block()
507 if (unlikely(!bh)) in __read_extent_tree_block()
510 if (!bh_uptodate_or_lock(bh)) { in __read_extent_tree_block()
512 err = bh_submit_read(bh); in __read_extent_tree_block()
516 if (buffer_verified(bh) && !(flags & EXT4_EX_FORCE_CACHE)) in __read_extent_tree_block()
517 return bh; in __read_extent_tree_block()
519 ext_block_hdr(bh), depth, pblk); in __read_extent_tree_block()
522 set_buffer_verified(bh); in __read_extent_tree_block()
527 struct ext4_extent_header *eh = ext_block_hdr(bh); in __read_extent_tree_block()
[all …]
/linux-4.1.27/fs/ext2/
Dxattr.c67 #define HDR(bh) ((struct ext2_xattr_header *)((bh)->b_data)) argument
69 #define FIRST_ENTRY(bh) ENTRY(HDR(bh)+1) argument
79 # define ea_bdebug(bh, f...) do { \ argument
82 bdevname(bh->b_bdev, b), \
83 (unsigned long) bh->b_blocknr); \
152 struct buffer_head *bh = NULL; in ext2_xattr_get() local
172 bh = sb_bread(inode->i_sb, EXT2_I(inode)->i_file_acl); in ext2_xattr_get()
174 if (!bh) in ext2_xattr_get()
176 ea_bdebug(bh, "b_count=%d, refcount=%d", in ext2_xattr_get()
177 atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount)); in ext2_xattr_get()
[all …]
Dinode.c113 struct buffer_head *bh; member
116 static inline void add_chain(Indirect *p, struct buffer_head *bh, __le32 *v) in add_chain() argument
119 p->bh = bh; in add_chain()
238 struct buffer_head *bh; in ext2_get_branch() local
246 bh = sb_bread(sb, le32_to_cpu(p->key)); in ext2_get_branch()
247 if (!bh) in ext2_get_branch()
252 add_chain(++p, bh, (__le32*)bh->b_data + *++offsets); in ext2_get_branch()
261 brelse(bh); in ext2_get_branch()
293 __le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data; in ext2_find_near()
304 if (ind->bh) in ext2_find_near()
[all …]
Dballoc.c41 struct buffer_head ** bh) in ext2_get_group_desc() argument
68 if (bh) in ext2_get_group_desc()
69 *bh = sbi->s_group_desc[group_desc]; in ext2_get_group_desc()
76 struct buffer_head *bh) in ext2_valid_block_bitmap() argument
88 if (!ext2_test_bit(offset, bh->b_data)) in ext2_valid_block_bitmap()
95 if (!ext2_test_bit(offset, bh->b_data)) in ext2_valid_block_bitmap()
102 next_zero_bit = ext2_find_next_zero_bit(bh->b_data, in ext2_valid_block_bitmap()
127 struct buffer_head * bh = NULL; in read_block_bitmap() local
134 bh = sb_getblk(sb, bitmap_blk); in read_block_bitmap()
135 if (unlikely(!bh)) { in read_block_bitmap()
[all …]
Dsuper.c779 struct buffer_head * bh; in ext2_fill_super() local
835 if (!(bh = sb_bread(sb, logic_sb_block))) { in ext2_fill_super()
843 es = (struct ext2_super_block *) (((char *)bh->b_data) + offset); in ext2_fill_super()
930 brelse(bh); in ext2_fill_super()
940 bh = sb_bread(sb, logic_sb_block); in ext2_fill_super()
941 if(!bh) { in ext2_fill_super()
946 es = (struct ext2_super_block *) (((char *)bh->b_data) + offset); in ext2_fill_super()
992 sbi->s_sbh = bh; in ext2_fill_super()
1002 if (sb->s_blocksize != bh->b_size) { in ext2_fill_super()
1156 brelse(bh); in ext2_fill_super()
[all …]
/linux-4.1.27/fs/affs/
Dfile.c50 struct buffer_head *bh; in affs_grow_extcache() local
99 bh = affs_bread(sb, key); in affs_grow_extcache()
100 if (!bh) in affs_grow_extcache()
102 key = be32_to_cpu(AFFS_TAIL(sb, bh)->extension); in affs_grow_extcache()
103 affs_brelse(bh); in affs_grow_extcache()
117 affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext) in affs_alloc_extblock() argument
123 blocknr = affs_alloc_block(inode, bh->b_blocknr); in affs_alloc_extblock()
141 tmp = be32_to_cpu(AFFS_TAIL(sb, bh)->extension); in affs_alloc_extblock()
144 AFFS_TAIL(sb, bh)->extension = cpu_to_be32(blocknr); in affs_alloc_extblock()
145 affs_adjust_checksum(bh, blocknr - tmp); in affs_alloc_extblock()
[all …]
Damigaffs.c23 affs_insert_hash(struct inode *dir, struct buffer_head *bh) in affs_insert_hash() argument
30 ino = bh->b_blocknr; in affs_insert_hash()
31 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); in affs_insert_hash()
47 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); in affs_insert_hash()
48 AFFS_TAIL(sb, bh)->hash_chain = 0; in affs_insert_hash()
49 affs_fix_checksum(sb, bh); in affs_insert_hash()
75 struct buffer_head *bh; in affs_remove_hash() local
86 bh = affs_bread(sb, dir->i_ino); in affs_remove_hash()
87 if (!bh) in affs_remove_hash()
91 hash_ino = be32_to_cpu(AFFS_HEAD(bh)->table[offset]); in affs_remove_hash()
[all …]
Daffs.h18 #define AFFS_BLOCK(sb, bh, blk) (AFFS_HEAD(bh)->table[AFFS_SB(sb)->s_hashsize-1-(blk)]) argument
20 #define AFFS_HEAD(bh) ((struct affs_head *)(bh)->b_data) argument
21 #define AFFS_TAIL(sb, bh) ((struct affs_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(struct affs_t… argument
22 #define AFFS_ROOT_HEAD(bh) ((struct affs_root_head *)(bh)->b_data) argument
23 #define AFFS_ROOT_TAIL(sb, bh) ((struct affs_root_tail *)((bh)->b_data+(sb)->s_blocksize-sizeof(str… argument
24 #define AFFS_DATA_HEAD(bh) ((struct affs_data_head *)(bh)->b_data) argument
25 #define AFFS_DATA(bh) (((struct affs_data_head *)(bh)->b_data)->data) argument
136 extern int affs_insert_hash(struct inode *inode, struct buffer_head *bh);
139 extern u32 affs_checksum_block(struct super_block *sb, struct buffer_head *bh);
140 extern void affs_fix_checksum(struct super_block *sb, struct buffer_head *bh);
[all …]
Dbitmap.c42 struct buffer_head *bh; in affs_free_block() local
58 bh = sbi->s_bmap_bh; in affs_free_block()
60 affs_brelse(bh); in affs_free_block()
61 bh = affs_bread(sb, bm->bm_key); in affs_free_block()
62 if (!bh) in affs_free_block()
64 sbi->s_bmap_bh = bh; in affs_free_block()
69 data = (__be32 *)bh->b_data + bit / 32 + 1; in affs_free_block()
78 tmp = be32_to_cpu(*(__be32 *)bh->b_data); in affs_free_block()
79 *(__be32 *)bh->b_data = cpu_to_be32(tmp - mask); in affs_free_block()
81 mark_buffer_dirty(bh); in affs_free_block()
[all …]
Dinode.c19 struct buffer_head *bh; in affs_iget() local
36 bh = affs_bread(sb, block); in affs_iget()
37 if (!bh) { in affs_iget()
41 if (affs_checksum_block(sb, bh) || be32_to_cpu(AFFS_HEAD(bh)->ptype) != T_SHORT) { in affs_iget()
44 AFFS_HEAD(bh)->ptype, block); in affs_iget()
48 tail = AFFS_TAIL(sb, bh); in affs_iget()
155 affs_brelse(bh); in affs_iget()
160 affs_brelse(bh); in affs_iget()
169 struct buffer_head *bh; in affs_write_inode() local
179 bh = affs_bread(sb, inode->i_ino); in affs_write_inode()
[all …]
Dnamei.c191 struct buffer_head *bh; in affs_find_entry() local
197 bh = affs_bread(sb, dir->i_ino); in affs_find_entry()
198 if (!bh) in affs_find_entry()
201 …key = be32_to_cpu(AFFS_HEAD(bh)->table[affs_hash_name(sb, dentry->d_name.name, dentry->d_name.len)… in affs_find_entry()
204 affs_brelse(bh); in affs_find_entry()
207 bh = affs_bread(sb, key); in affs_find_entry()
208 if (!bh) in affs_find_entry()
210 if (affs_match(dentry, AFFS_TAIL(sb, bh)->name, toupper)) in affs_find_entry()
211 return bh; in affs_find_entry()
212 key = be32_to_cpu(AFFS_TAIL(sb, bh)->hash_chain); in affs_find_entry()
[all …]
Dsymlink.c15 struct buffer_head *bh; in affs_symlink_readpage() local
27 bh = affs_bread(inode->i_sb, inode->i_ino); in affs_symlink_readpage()
28 if (!bh) in affs_symlink_readpage()
32 lf = (struct slink_front *)bh->b_data; in affs_symlink_readpage()
60 affs_brelse(bh); in affs_symlink_readpage()
/linux-4.1.27/fs/ext3/
Dext3_jbd.c8 struct buffer_head *bh) in __ext3_journal_get_undo_access() argument
10 int err = journal_get_undo_access(handle, bh); in __ext3_journal_get_undo_access()
12 ext3_journal_abort_handle(where, __func__, bh, handle,err); in __ext3_journal_get_undo_access()
17 struct buffer_head *bh) in __ext3_journal_get_write_access() argument
19 int err = journal_get_write_access(handle, bh); in __ext3_journal_get_write_access()
21 ext3_journal_abort_handle(where, __func__, bh, handle,err); in __ext3_journal_get_write_access()
26 struct buffer_head *bh) in __ext3_journal_forget() argument
28 int err = journal_forget(handle, bh); in __ext3_journal_forget()
30 ext3_journal_abort_handle(where, __func__, bh, handle,err); in __ext3_journal_forget()
35 unsigned long blocknr, struct buffer_head *bh) in __ext3_journal_revoke() argument
[all …]
Dxattr.c59 #define BHDR(bh) ((struct ext3_xattr_header *)((bh)->b_data)) argument
61 #define BFIRST(bh) ENTRY(BHDR(bh)+1) argument
78 # define ea_bdebug(bh, f...) do { \ argument
81 bdevname(bh->b_bdev, b), \
82 (unsigned long) bh->b_blocknr); \
161 ext3_xattr_check_block(struct buffer_head *bh) in ext3_xattr_check_block() argument
165 if (BHDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) || in ext3_xattr_check_block()
166 BHDR(bh)->h_blocks != cpu_to_le32(1)) in ext3_xattr_check_block()
168 error = ext3_xattr_check_names(BFIRST(bh), bh->b_data + bh->b_size); in ext3_xattr_check_block()
214 struct buffer_head *bh = NULL; in ext3_xattr_block_get() local
[all …]
Dinode.c59 struct buffer_head *bh, ext3_fsblk_t blocknr) in ext3_forget() argument
66 BUFFER_TRACE(bh, "enter"); in ext3_forget()
70 bh, is_metadata, inode->i_mode, in ext3_forget()
80 if (bh) { in ext3_forget()
81 BUFFER_TRACE(bh, "call journal_forget"); in ext3_forget()
82 return ext3_journal_forget(handle, bh); in ext3_forget()
90 BUFFER_TRACE(bh, "call ext3_journal_revoke"); in ext3_forget()
91 err = ext3_journal_revoke(handle, blocknr, bh); in ext3_forget()
95 BUFFER_TRACE(bh, "exit"); in ext3_forget()
295 struct buffer_head *bh; member
[all …]
Dnamei.c44 struct buffer_head *bh; in ext3_append() local
48 if ((bh = ext3_dir_bread(handle, inode, *block, 1, err))) { in ext3_append()
51 *err = ext3_journal_get_write_access(handle, bh); in ext3_append()
53 brelse(bh); in ext3_append()
54 bh = NULL; in ext3_append()
57 return bh; in ext3_append()
123 struct buffer_head *bh; member
294 struct buffer_head *bh; in dx_show_entries() local
303 if (!(bh = ext3_bread (NULL,dir, block, 0,&err))) continue; in dx_show_entries()
305 dx_show_entries(hinfo, dir, ((struct dx_node *) bh->b_data)->entries, levels - 1): in dx_show_entries()
[all …]
Dresize.c33 struct buffer_head *bh = NULL; in verify_group_input() local
60 else if (!(bh = sb_bread(sb, end - 1))) in verify_group_input()
107 brelse(bh); in verify_group_input()
115 struct buffer_head *bh; in bclean() local
118 bh = sb_getblk(sb, blk); in bclean()
119 if (unlikely(!bh)) in bclean()
121 if ((err = ext3_journal_get_write_access(handle, bh))) { in bclean()
122 brelse(bh); in bclean()
123 bh = ERR_PTR(err); in bclean()
125 lock_buffer(bh); in bclean()
[all …]
Dnamei.h15 struct buffer_head *bh; in ext3_dir_bread() local
17 bh = ext3_bread(handle, inode, block, create, err); in ext3_dir_bread()
19 if (!bh && !(*err)) { in ext3_dir_bread()
26 return bh; in ext3_dir_bread()
Dballoc.c60 struct buffer_head ** bh) in ext3_get_group_desc() argument
88 if (bh) in ext3_get_group_desc()
89 *bh = sbi->s_group_desc[group_desc]; in ext3_get_group_desc()
96 struct buffer_head *bh) in ext3_valid_block_bitmap() argument
108 if (!ext3_test_bit(offset, bh->b_data)) in ext3_valid_block_bitmap()
115 if (!ext3_test_bit(offset, bh->b_data)) in ext3_valid_block_bitmap()
122 next_zero_bit = ext3_find_next_zero_bit(bh->b_data, in ext3_valid_block_bitmap()
151 struct buffer_head * bh = NULL; in read_block_bitmap() local
159 bh = sb_getblk(sb, bitmap_blk); in read_block_bitmap()
160 if (unlikely(!bh)) { in read_block_bitmap()
[all …]
Dext3.h946 struct buffer_head *bh; member
953 return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset); in ext3_raw_inode()
1012 struct buffer_head ** bh);
1047 struct buffer_head *bh, ext3_fsblk_t blocknr);
1219 struct buffer_head *bh) in ext3_journal_release_buffer() argument
1221 journal_release_buffer(handle, bh); in ext3_journal_release_buffer()
1225 struct buffer_head *bh, handle_t *handle, int err);
1228 struct buffer_head *bh);
1231 struct buffer_head *bh);
1234 struct buffer_head *bh);
[all …]
Ddir.c64 struct buffer_head * bh, in ext3_check_dir_entry() argument
76 else if (unlikely((((char *) de - bh->b_data) + rlen > dir->i_sb->s_blocksize))) in ext3_check_dir_entry()
118 struct buffer_head *bh = NULL; in ext3_readdir() local
131 bh = ext3_bread(NULL, inode, blk, 0, &err); in ext3_readdir()
138 if (!bh) { in ext3_readdir()
159 (bh->b_data + i); in ext3_readdir()
179 de = (struct ext3_dir_entry_2 *) (bh->b_data + offset); in ext3_readdir()
181 bh, offset)) { in ext3_readdir()
193 brelse(bh); in ext3_readdir()
200 brelse (bh); in ext3_readdir()
/linux-4.1.27/fs/jbd2/
Dcommit.c35 static void journal_end_buffer_io_sync(struct buffer_head *bh, int uptodate) in journal_end_buffer_io_sync() argument
37 struct buffer_head *orig_bh = bh->b_private; in journal_end_buffer_io_sync()
39 BUFFER_TRACE(bh, ""); in journal_end_buffer_io_sync()
41 set_buffer_uptodate(bh); in journal_end_buffer_io_sync()
43 clear_buffer_uptodate(bh); in journal_end_buffer_io_sync()
49 unlock_buffer(bh); in journal_end_buffer_io_sync()
66 static void release_buffer_page(struct buffer_head *bh) in release_buffer_page() argument
70 if (buffer_dirty(bh)) in release_buffer_page()
72 if (atomic_read(&bh->b_count) != 1) in release_buffer_page()
74 page = bh->b_page; in release_buffer_page()
[all …]
Dtransaction.c753 static void warn_dirty_buffer(struct buffer_head *bh) in warn_dirty_buffer() argument
761 bdevname(bh->b_bdev, b), (unsigned long long)bh->b_blocknr); in warn_dirty_buffer()
778 struct buffer_head *bh; in do_get_write_access() local
794 bh = jh2bh(jh); in do_get_write_access()
799 lock_buffer(bh); in do_get_write_access()
800 jbd_lock_bh_state(bh); in do_get_write_access()
805 trace_jbd2_lock_buffer_stall(bh->b_bdev->bd_dev, in do_get_write_access()
821 if (buffer_dirty(bh)) { in do_get_write_access()
834 warn_dirty_buffer(bh); in do_get_write_access()
842 clear_buffer_dirty(bh); in do_get_write_access()
[all …]
Drecovery.c75 struct buffer_head *bh; in do_readahead() local
98 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead()
99 if (!bh) { in do_readahead()
104 if (!buffer_uptodate(bh) && !buffer_locked(bh)) { in do_readahead()
105 bufs[nbufs++] = bh; in do_readahead()
112 brelse(bh); in do_readahead()
137 struct buffer_head *bh; in jread() local
154 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in jread()
155 if (!bh) in jread()
158 if (!buffer_uptodate(bh)) { in jread()
[all …]
Drevoke.c332 struct buffer_head *bh = NULL; in jbd2_journal_revoke() local
348 bh = bh_in; in jbd2_journal_revoke()
350 if (!bh) { in jbd2_journal_revoke()
351 bh = __find_get_block(bdev, blocknr, journal->j_blocksize); in jbd2_journal_revoke()
352 if (bh) in jbd2_journal_revoke()
353 BUFFER_TRACE(bh, "found on hash"); in jbd2_journal_revoke()
364 if (bh2 != bh && buffer_revokevalid(bh2)) in jbd2_journal_revoke()
380 if (bh) { in jbd2_journal_revoke()
381 if (!J_EXPECT_BH(bh, !buffer_revoked(bh), in jbd2_journal_revoke()
384 brelse(bh); in jbd2_journal_revoke()
[all …]
Dcheckpoint.c95 struct buffer_head *bh = jh2bh(jh); in __try_to_free_cp_buf() local
97 if (jh->b_transaction == NULL && !buffer_locked(bh) && in __try_to_free_cp_buf()
98 !buffer_dirty(bh) && !buffer_write_io_error(bh)) { in __try_to_free_cp_buf()
193 struct buffer_head *bh = journal->j_chkpt_bhs[i]; in __flush_batch() local
194 BUFFER_TRACE(bh, "brelse"); in __flush_batch()
195 __brelse(bh); in __flush_batch()
211 struct buffer_head *bh; in jbd2_log_do_checkpoint() local
254 bh = jh2bh(jh); in jbd2_log_do_checkpoint()
256 if (buffer_locked(bh)) { in jbd2_log_do_checkpoint()
258 get_bh(bh); in jbd2_log_do_checkpoint()
[all …]
Djournal.c819 struct buffer_head *bh; in jbd2_journal_get_descriptor_buffer() local
828 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in jbd2_journal_get_descriptor_buffer()
829 if (!bh) in jbd2_journal_get_descriptor_buffer()
831 lock_buffer(bh); in jbd2_journal_get_descriptor_buffer()
832 memset(bh->b_data, 0, journal->j_blocksize); in jbd2_journal_get_descriptor_buffer()
833 set_buffer_uptodate(bh); in jbd2_journal_get_descriptor_buffer()
834 unlock_buffer(bh); in jbd2_journal_get_descriptor_buffer()
835 BUFFER_TRACE(bh, "return this buffer"); in jbd2_journal_get_descriptor_buffer()
836 return bh; in jbd2_journal_get_descriptor_buffer()
1146 struct buffer_head *bh; in jbd2_journal_init_dev() local
[all …]
/linux-4.1.27/arch/sh/kernel/
Dprocess_64.c40 unsigned long long ah, al, bh, bl, ch, cl; in show_regs() local
47 bh = (regs->regs[18]) >> 32; in show_regs()
52 ah, al, bh, bl, ch, cl); in show_regs()
56 asm volatile ("getcon " __TEA ", %0" : "=r" (bh)); in show_regs()
58 bh = (bh) >> 32; in show_regs()
65 ah, al, bh, bl, ch, cl); in show_regs()
69 bh = (regs->regs[1]) >> 32; in show_regs()
74 ah, al, bh, bl, ch, cl); in show_regs()
78 bh = (regs->regs[4]) >> 32; in show_regs()
83 ah, al, bh, bl, ch, cl); in show_regs()
[all …]
/linux-4.1.27/fs/minix/
Ditree_common.c6 struct buffer_head *bh; member
11 static inline void add_chain(Indirect *p, struct buffer_head *bh, block_t *v) in add_chain() argument
14 p->bh = bh; in add_chain()
24 static inline block_t *block_end(struct buffer_head *bh) in block_end() argument
26 return (block_t *)((char*)bh->b_data + bh->b_size); in block_end()
37 struct buffer_head *bh; in get_branch() local
45 bh = sb_bread(sb, block_to_cpu(p->key)); in get_branch()
46 if (!bh) in get_branch()
51 add_chain(++p, bh, (block_t *)bh->b_data + *++offsets); in get_branch()
60 brelse(bh); in get_branch()
[all …]
Dbitmap.c45 struct buffer_head *bh; in minix_free_block() local
60 bh = sbi->s_zmap[zone]; in minix_free_block()
62 if (!minix_test_and_clear_bit(bit, bh->b_data)) in minix_free_block()
66 mark_buffer_dirty(bh); in minix_free_block()
77 struct buffer_head *bh = sbi->s_zmap[i]; in minix_new_block() local
81 j = minix_find_first_zero_bit(bh->b_data, bits_per_zone); in minix_new_block()
83 minix_set_bit(j, bh->b_data); in minix_new_block()
85 mark_buffer_dirty(bh); in minix_new_block()
106 minix_V1_raw_inode(struct super_block *sb, ino_t ino, struct buffer_head **bh) in minix_V1_raw_inode() argument
120 *bh = sb_bread(sb, block); in minix_V1_raw_inode()
[all …]
Dinode.c160 struct buffer_head *bh; in minix_fill_super() local
180 if (!(bh = sb_bread(s, 1))) in minix_fill_super()
183 ms = (struct minix_super_block *) bh->b_data; in minix_fill_super()
185 sbi->s_sbh = bh; in minix_fill_super()
217 } else if ( *(__u16 *)(bh->b_data + 24) == MINIX3_SUPER_MAGIC) { in minix_fill_super()
218 m3s = (struct minix3_super_block *) bh->b_data; in minix_fill_super()
241 i = (sbi->s_imap_blocks + sbi->s_zmap_blocks) * sizeof(bh); in minix_fill_super()
299 mark_buffer_dirty(bh); in minix_fill_super()
341 brelse(bh); in minix_fill_super()
465 struct buffer_head * bh; in V1_minix_iget() local
[all …]
/linux-4.1.27/fs/sysv/
Dballoc.c30 static inline sysv_zone_t *get_chunk(struct super_block *sb, struct buffer_head *bh) in get_chunk() argument
32 char *bh_data = bh->b_data; in get_chunk()
45 struct buffer_head * bh; in sysv_free_block() local
77 bh = sb_getblk(sb, block); in sysv_free_block()
78 if (!bh) { in sysv_free_block()
83 memset(bh->b_data, 0, sb->s_blocksize); in sysv_free_block()
84 *(__fs16*)bh->b_data = cpu_to_fs16(sbi, count); in sysv_free_block()
85 memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t)); in sysv_free_block()
86 mark_buffer_dirty(bh); in sysv_free_block()
87 set_buffer_uptodate(bh); in sysv_free_block()
[all …]
Ditree.c15 static inline void dirty_indirect(struct buffer_head *bh, struct inode *inode) in dirty_indirect() argument
17 mark_buffer_dirty_inode(bh, inode); in dirty_indirect()
19 sync_dirty_buffer(bh); in dirty_indirect()
61 struct buffer_head *bh; member
66 static inline void add_chain(Indirect *p, struct buffer_head *bh, sysv_zone_t *v) in add_chain() argument
69 p->bh = bh; in add_chain()
79 static inline sysv_zone_t *block_end(struct buffer_head *bh) in block_end() argument
81 return (sysv_zone_t*)((char*)bh->b_data + bh->b_size); in block_end()
95 struct buffer_head *bh; in get_branch() local
103 bh = sb_bread(sb, block); in get_branch()
[all …]
Dialloc.c56 sysv_raw_inode(struct super_block *sb, unsigned ino, struct buffer_head **bh) in sysv_raw_inode() argument
63 *bh = sb_bread(sb, block); in sysv_raw_inode()
64 if (!*bh) in sysv_raw_inode()
66 res = (struct sysv_inode *)(*bh)->b_data; in sysv_raw_inode()
73 struct buffer_head * bh; in refill_free_cache() local
78 raw_inode = sysv_raw_inode(sb, ino, &bh); in refill_free_cache()
88 brelse(bh); in refill_free_cache()
89 raw_inode = sysv_raw_inode(sb, ino, &bh); in refill_free_cache()
95 brelse(bh); in refill_free_cache()
105 struct buffer_head * bh; in sysv_free_inode() local
[all …]
Dsuper.c178 static int detect_xenix(struct sysv_sb_info *sbi, struct buffer_head *bh) in detect_xenix() argument
180 struct xenix_super_block *sbd = (struct xenix_super_block *)bh->b_data; in detect_xenix()
199 static int detect_sysv(struct sysv_sb_info *sbi, struct buffer_head *bh) in detect_sysv() argument
206 sbd = (struct sysv4_super_block *) (bh->b_data + BLOCK_SIZE/2); in detect_sysv()
252 static int detect_coherent(struct sysv_sb_info *sbi, struct buffer_head *bh) in detect_coherent() argument
256 sbd = (struct coh_super_block *) (bh->b_data + BLOCK_SIZE/2); in detect_coherent()
265 static int detect_sysv_odd(struct sysv_sb_info *sbi, struct buffer_head *bh) in detect_sysv_odd() argument
267 int size = detect_sysv(sbi, bh); in detect_sysv_odd()
354 struct buffer_head *bh1, *bh = NULL; in sysv_fill_super() local
377 brelse(bh); in sysv_fill_super()
[all …]
Dinode.c180 struct buffer_head * bh; in sysv_iget() local
198 raw_inode = sysv_raw_inode(sb, ino, &bh); in sysv_iget()
222 brelse(bh); in sysv_iget()
241 struct buffer_head * bh; in __sysv_write_inode() local
253 raw_inode = sysv_raw_inode(sb, ino, &bh); in __sysv_write_inode()
274 mark_buffer_dirty(bh); in __sysv_write_inode()
276 sync_dirty_buffer(bh); in __sysv_write_inode()
277 if (buffer_req(bh) && !buffer_uptodate(bh)) { in __sysv_write_inode()
283 brelse(bh); in __sysv_write_inode()
/linux-4.1.27/fs/xfs/
Dxfs_aops.c45 struct buffer_head *bh, *head; in xfs_count_page_state() local
49 bh = head = page_buffers(page); in xfs_count_page_state()
51 if (buffer_unwritten(bh)) in xfs_count_page_state()
53 else if (buffer_delay(bh)) in xfs_count_page_state()
55 } while ((bh = bh->b_this_page) != head); in xfs_count_page_state()
81 struct buffer_head *bh, *next; in xfs_destroy_ioend() local
83 for (bh = ioend->io_buffer_head; bh; bh = next) { in xfs_destroy_ioend()
84 next = bh->b_private; in xfs_destroy_ioend()
85 bh->b_end_io(bh, !ioend->io_error); in xfs_destroy_ioend()
384 struct buffer_head *bh) in xfs_alloc_ioend_bio() argument
[all …]
/linux-4.1.27/fs/qnx4/
Dnamei.c26 struct buffer_head *bh, unsigned long *offset) in qnx4_match() argument
31 if (bh == NULL) { in qnx4_match()
35 de = (struct qnx4_inode_entry *) (bh->b_data + *offset); in qnx4_match()
60 struct buffer_head *bh; in qnx4_find_entry() local
63 bh = NULL; in qnx4_find_entry()
66 if (!bh) { in qnx4_find_entry()
69 bh = sb_bread(dir->i_sb, block); in qnx4_find_entry()
70 if (!bh) { in qnx4_find_entry()
75 *res_dir = (struct qnx4_inode_entry *) (bh->b_data + offset); in qnx4_find_entry()
76 if (qnx4_match(len, name, bh, &offset)) { in qnx4_find_entry()
[all …]
Dinode.c54 static int qnx4_get_block( struct inode *inode, sector_t iblock, struct buffer_head *bh, int create… in qnx4_get_block() argument
63 map_bh(bh, inode->i_sb, phys); in qnx4_get_block()
81 struct buffer_head *bh = NULL; in qnx4_block_map() local
97 bh = sb_bread(inode->i_sb, i_xblk - 1); in qnx4_block_map()
98 if ( !bh ) { in qnx4_block_map()
102 xblk = (struct qnx4_xblk*)bh->b_data; in qnx4_block_map()
116 brelse( bh ); in qnx4_block_map()
117 bh = NULL; in qnx4_block_map()
120 if ( bh ) in qnx4_block_map()
121 brelse( bh ); in qnx4_block_map()
[all …]
Ddir.c21 struct buffer_head *bh; in qnx4_readdir() local
33 bh = sb_bread(inode->i_sb, blknum); in qnx4_readdir()
34 if (bh == NULL) { in qnx4_readdir()
41 de = (struct qnx4_inode_entry *) (bh->b_data + offset); in qnx4_readdir()
61 brelse(bh); in qnx4_readdir()
65 brelse(bh); in qnx4_readdir()
Dbitmap.c27 struct buffer_head *bh; in qnx4_count_free_blocks() local
32 if ((bh = sb_bread(sb, start + offset)) == NULL) { in qnx4_count_free_blocks()
37 memweight(bh->b_data, bytes); in qnx4_count_free_blocks()
38 brelse(bh); in qnx4_count_free_blocks()
/linux-4.1.27/fs/ntfs/
Daops.c58 static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) in ntfs_end_buffer_async_read() argument
67 page = bh->b_page; in ntfs_end_buffer_async_read()
75 set_buffer_uptodate(bh); in ntfs_end_buffer_async_read()
78 bh_offset(bh); in ntfs_end_buffer_async_read()
88 if (unlikely(file_ofs + bh->b_size > init_size)) { in ntfs_end_buffer_async_read()
97 memset(kaddr + bh_offset(bh) + ofs, 0, in ntfs_end_buffer_async_read()
98 bh->b_size - ofs); in ntfs_end_buffer_async_read()
104 clear_buffer_uptodate(bh); in ntfs_end_buffer_async_read()
107 "0x%llx.", (unsigned long long)bh->b_blocknr); in ntfs_end_buffer_async_read()
112 clear_buffer_async_read(bh); in ntfs_end_buffer_async_read()
[all …]
Dfile.c550 static inline int ntfs_submit_bh_for_read(struct buffer_head *bh) in ntfs_submit_bh_for_read() argument
552 lock_buffer(bh); in ntfs_submit_bh_for_read()
553 get_bh(bh); in ntfs_submit_bh_for_read()
554 bh->b_end_io = end_buffer_read_sync; in ntfs_submit_bh_for_read()
555 return submit_bh(READ, bh); in ntfs_submit_bh_for_read()
595 struct buffer_head *bh, *head, *wait[2], **wait_bh = wait; in ntfs_prepare_pages_for_non_resident_write() local
656 bh = head = page_buffers(page); in ntfs_prepare_pages_for_non_resident_write()
663 if (buffer_new(bh)) in ntfs_prepare_pages_for_non_resident_write()
664 clear_buffer_new(bh); in ntfs_prepare_pages_for_non_resident_write()
668 if (buffer_mapped(bh)) { in ntfs_prepare_pages_for_non_resident_write()
[all …]
Dlogfile.c802 struct buffer_head *bh; in ntfs_empty_logfile() local
805 bh = sb_getblk(sb, block); in ntfs_empty_logfile()
806 BUG_ON(!bh); in ntfs_empty_logfile()
808 lock_buffer(bh); in ntfs_empty_logfile()
809 bh->b_end_io = end_buffer_write_sync; in ntfs_empty_logfile()
810 get_bh(bh); in ntfs_empty_logfile()
812 memset(bh->b_data, -1, block_size); in ntfs_empty_logfile()
813 if (!buffer_uptodate(bh)) in ntfs_empty_logfile()
814 set_buffer_uptodate(bh); in ntfs_empty_logfile()
815 if (buffer_dirty(bh)) in ntfs_empty_logfile()
[all …]
/linux-4.1.27/fs/udf/
Dballoc.c38 struct buffer_head *bh = NULL; in read_block_bitmap() local
45 bh = udf_tread(sb, udf_get_lb_pblock(sb, &loc, block)); in read_block_bitmap()
46 if (!bh) in read_block_bitmap()
49 bitmap->s_block_bitmap[bitmap_nr] = bh; in read_block_bitmap()
112 struct buffer_head *bh = NULL; in udf_bitmap_free_blocks() local
151 bh = bitmap->s_block_bitmap[bitmap_nr]; in udf_bitmap_free_blocks()
153 if (udf_set_bit(bit + i, bh->b_data)) { in udf_bitmap_free_blocks()
156 ((char *)bh->b_data)[(bit + i) >> 3]); in udf_bitmap_free_blocks()
160 mark_buffer_dirty(bh); in udf_bitmap_free_blocks()
180 struct buffer_head *bh; in udf_bitmap_prealloc_blocks() local
[all …]
Dinode.c74 brelse(iinfo->cached_extent.epos.bh); in __udf_clear_extent_cache()
103 if (pos->bh) in udf_read_extent_cache()
104 get_bh(pos->bh); in udf_read_extent_cache()
120 if (pos->bh) in udf_update_extent_cache()
121 get_bh(pos->bh); in udf_update_extent_cache()
409 epos.bh = NULL; in udf_expand_dir_adinicb()
415 brelse(epos.bh); in udf_expand_dir_adinicb()
461 struct buffer_head *bh; in udf_getblk() local
468 bh = sb_getblk(inode->i_sb, dummy.b_blocknr); in udf_getblk()
470 lock_buffer(bh); in udf_getblk()
[all …]
Dtruncate.c118 brelse(epos.bh); in udf_truncate_tail_extent()
153 if (!epos.bh) { in udf_discard_prealloc()
160 (struct allocExtDesc *)(epos.bh->b_data); in udf_discard_prealloc()
166 udf_update_tag(epos.bh->b_data, epos.offset); in udf_discard_prealloc()
168 udf_update_tag(epos.bh->b_data, in udf_discard_prealloc()
170 mark_buffer_dirty_inode(epos.bh, inode); in udf_discard_prealloc()
176 brelse(epos.bh); in udf_discard_prealloc()
186 struct allocExtDesc *aed = (struct allocExtDesc *) (epos->bh->b_data); in udf_update_alloc_ext_desc()
193 udf_update_tag(epos->bh->b_data, len); in udf_update_alloc_ext_desc()
194 mark_buffer_dirty_inode(epos->bh, inode); in udf_update_alloc_ext_desc()
[all …]
Dsuper.c697 struct buffer_head *bh = NULL; in udf_check_vsd() local
726 bh = udf_tread(sb, sector >> sb->s_blocksize_bits); in udf_check_vsd()
727 if (!bh) in udf_check_vsd()
731 vsd = (struct volStructDesc *)(bh->b_data + in udf_check_vsd()
762 brelse(bh); in udf_check_vsd()
778 brelse(bh); in udf_check_vsd()
781 brelse(bh); in udf_check_vsd()
788 else if (!bh && sector - (sbi->s_session << sb->s_blocksize_bits) == in udf_check_vsd()
799 struct buffer_head *bh = NULL; in udf_find_fileset() local
806 bh = udf_read_ptagged(sb, fileset, 0, &ident); in udf_find_fileset()
[all …]
Dpartition.c49 struct buffer_head *bh = NULL; in udf_get_pblock_virt15() local
84 bh = sb_bread(sb, loc); in udf_get_pblock_virt15()
85 if (!bh) { in udf_get_pblock_virt15()
91 loc = le32_to_cpu(((__le32 *)bh->b_data)[index]); in udf_get_pblock_virt15()
93 brelse(bh); in udf_get_pblock_virt15()
161 struct buffer_head *bh; in udf_relocate_blocks() local
194 bh = sdata->s_spar_map[j]; in udf_relocate_blocks()
195 if (!bh) in udf_relocate_blocks()
199 bh->b_data; in udf_relocate_blocks()
207 mark_buffer_dirty(bh); in udf_relocate_blocks()
[all …]
Dsymlink.c104 struct buffer_head *bh = NULL; in udf_symlink_filler() local
124 bh = sb_bread(inode->i_sb, pos); in udf_symlink_filler()
126 if (!bh) { in udf_symlink_filler()
131 symlink = bh->b_data; in udf_symlink_filler()
135 brelse(bh); in udf_symlink_filler()
Dmisc.c205 struct buffer_head *bh = NULL; in udf_read_tagged() local
212 bh = udf_tread(sb, block); in udf_read_tagged()
213 if (!bh) { in udf_read_tagged()
219 tag_p = (struct tag *)(bh->b_data); in udf_read_tagged()
248 bh->b_data + sizeof(struct tag), in udf_read_tagged()
250 return bh; in udf_read_tagged()
256 brelse(bh); in udf_read_tagged()
/linux-4.1.27/fs/bfs/
Ddir.c32 struct buffer_head *bh; in bfs_readdir() local
47 bh = sb_bread(dir->i_sb, block); in bfs_readdir()
48 if (!bh) { in bfs_readdir()
53 de = (struct bfs_dirent *)(bh->b_data + offset); in bfs_readdir()
59 brelse(bh); in bfs_readdir()
66 brelse(bh); in bfs_readdir()
130 struct buffer_head *bh; in bfs_lookup() local
138 bh = bfs_find_entry(dir, dentry->d_name.name, dentry->d_name.len, &de); in bfs_lookup()
139 if (bh) { in bfs_lookup()
141 brelse(bh); in bfs_lookup()
[all …]
Dinode.c38 struct buffer_head *bh; in bfs_iget() local
53 bh = sb_bread(inode->i_sb, block); in bfs_iget()
54 if (!bh) { in bfs_iget()
61 di = (struct bfs_inode *)bh->b_data + off; in bfs_iget()
90 brelse(bh); in bfs_iget()
123 struct buffer_head *bh; in bfs_write_inode() local
128 di = find_inode(inode->i_sb, ino, &bh); in bfs_write_inode()
152 mark_buffer_dirty(bh); in bfs_write_inode()
154 sync_dirty_buffer(bh); in bfs_write_inode()
155 if (buffer_req(bh) && !buffer_uptodate(bh)) in bfs_write_inode()
[all …]
Dfile.c35 struct buffer_head *bh, *new; in bfs_move_block() local
37 bh = sb_bread(sb, from); in bfs_move_block()
38 if (!bh) in bfs_move_block()
41 memcpy(new->b_data, bh->b_data, bh->b_size); in bfs_move_block()
43 bforget(bh); in bfs_move_block()
/linux-4.1.27/fs/fat/
Ddir.c40 struct buffer_head *bh, in fat_make_i_pos() argument
43 return ((loff_t)bh->b_blocknr << MSDOS_SB(sb)->dir_per_block_bits) in fat_make_i_pos()
44 | (de - (struct msdos_dir_entry *)bh->b_data); in fat_make_i_pos()
52 struct buffer_head *bh; in fat_dir_readahead() local
62 bh = sb_find_get_block(sb, phys); in fat_dir_readahead()
63 if (bh == NULL || !buffer_uptodate(bh)) { in fat_dir_readahead()
67 brelse(bh); in fat_dir_readahead()
81 struct buffer_head **bh, struct msdos_dir_entry **de) in fat__get_entry() argument
89 if (*bh) in fat__get_entry()
90 brelse(*bh); in fat__get_entry()
[all …]
Dnfs.c75 struct buffer_head *bh = NULL; in __fat_nfs_get_inode() local
80 bh = sb_bread(sb, blocknr); in __fat_nfs_get_inode()
81 if (!bh) { in __fat_nfs_get_inode()
87 de = (struct msdos_dir_entry *)bh->b_data; in __fat_nfs_get_inode()
95 brelse(bh); in __fat_nfs_get_inode()
274 struct buffer_head *bh = NULL; in fat_get_parent() local
279 if (!fat_get_dotdot_entry(d_inode(child_dir), &bh, &de)) { in fat_get_parent()
285 brelse(bh); in fat_get_parent()
Dmisc.c63 struct buffer_head *bh; in fat_clusters_flush() local
69 bh = sb_bread(sb, sbi->fsinfo_sector); in fat_clusters_flush()
70 if (bh == NULL) { in fat_clusters_flush()
75 fsinfo = (struct fat_boot_fsinfo *)bh->b_data; in fat_clusters_flush()
88 mark_buffer_dirty(bh); in fat_clusters_flush()
90 brelse(bh); in fat_clusters_flush()
Dnamei_msdos.c138 brelse(sinfo->bh); in msdos_find()
215 brelse(sinfo.bh); in msdos_lookup()
281 brelse(sinfo.bh); in msdos_create()
291 brelse(sinfo.bh); in msdos_create()
362 brelse(sinfo.bh); in msdos_mkdir()
379 brelse(sinfo.bh); in msdos_mkdir()
442 old_sinfo.bh = sinfo.bh = dotdot_bh = NULL; in do_msdos_rename()
540 old_sinfo.bh = NULL; in do_msdos_rename()
557 brelse(sinfo.bh); in do_msdos_rename()
559 brelse(old_sinfo.bh); in do_msdos_rename()
[all …]
/linux-4.1.27/drivers/usb/gadget/function/
Df_mass_storage.c366 struct fsg_buffhd *bh, unsigned int length) in set_bulk_out_req_length() argument
370 bh->bulk_out_intended_length = length; in set_bulk_out_req_length()
374 bh->outreq->length = length; in set_bulk_out_req_length()
454 struct fsg_buffhd *bh = req->context; in bulk_in_complete() local
465 bh->inreq_busy = 0; in bulk_in_complete()
466 bh->state = BUF_STATE_EMPTY; in bulk_in_complete()
474 struct fsg_buffhd *bh = req->context; in bulk_out_complete() local
477 if (req->status || req->actual != bh->bulk_out_intended_length) in bulk_out_complete()
479 req->status, req->actual, bh->bulk_out_intended_length); in bulk_out_complete()
486 bh->outreq_busy = 0; in bulk_out_complete()
[all …]
/linux-4.1.27/fs/romfs/
Dstorage.c110 struct buffer_head *bh; in romfs_blk_read() local
118 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_read()
119 if (!bh) in romfs_blk_read()
121 memcpy(buf, bh->b_data + offset, segment); in romfs_blk_read()
122 brelse(bh); in romfs_blk_read()
137 struct buffer_head *bh; in romfs_blk_strnlen() local
147 bh = sb_bread(sb, pos >> ROMBSBITS); in romfs_blk_strnlen()
148 if (!bh) in romfs_blk_strnlen()
150 buf = bh->b_data + offset; in romfs_blk_strnlen()
152 brelse(bh); in romfs_blk_strnlen()
[all …]
/linux-4.1.27/fs/adfs/
Ddir_f.c64 *(u8 *)(bh[_buf]->b_data + _off); \
70 *(__le32 *)(bh[_buf]->b_data + _off); \
87 struct buffer_head * const *bh = dir->bh; in adfs_dir_checkbyte() local
113 ptr.ptr8 = bufoff(bh, i); in adfs_dir_checkbyte()
128 ptr.ptr8 = bufoff(bh, 2008); in adfs_dir_checkbyte()
171 dir->bh[blk] = sb_bread(sb, phys); in adfs_dir_read()
172 if (!dir->bh[blk]) in adfs_dir_read()
176 memcpy(&dir->dirhead, bufoff(dir->bh, 0), sizeof(dir->dirhead)); in adfs_dir_read()
177 memcpy(&dir->dirtail, bufoff(dir->bh, 2007), sizeof(dir->dirtail)); in adfs_dir_read()
199 brelse(dir->bh[blk]); in adfs_dir_read()
[all …]
Ddir_fplus.c27 dir->bh_fplus = &dir->bh[0]; in adfs_fplus_read()
58 if (size > ARRAY_SIZE(dir->bh)) { in adfs_fplus_read()
71 dir->bh_fplus[0] = dir->bh[0]; in adfs_fplus_read()
111 if (&dir->bh[0] != dir->bh_fplus) in adfs_fplus_read()
231 struct buffer_head *bh = dir->bh_fplus[i]; in adfs_fplus_sync() local
232 sync_dirty_buffer(bh); in adfs_fplus_sync()
233 if (buffer_req(bh) && !buffer_uptodate(bh)) in adfs_fplus_sync()
249 if (&dir->bh[0] != dir->bh_fplus) in adfs_fplus_free()
/linux-4.1.27/fs/efs/
Dsymlink.c17 struct buffer_head * bh; in efs_symlink_readpage() local
28 bh = sb_bread(inode->i_sb, efs_bmap(inode, 0)); in efs_symlink_readpage()
29 if (!bh) in efs_symlink_readpage()
31 memcpy(link, bh->b_data, (size > EFS_BLOCKSIZE) ? EFS_BLOCKSIZE : size); in efs_symlink_readpage()
32 brelse(bh); in efs_symlink_readpage()
34 bh = sb_bread(inode->i_sb, efs_bmap(inode, 1)); in efs_symlink_readpage()
35 if (!bh) in efs_symlink_readpage()
37 memcpy(link + EFS_BLOCKSIZE, bh->b_data, size - EFS_BLOCKSIZE); in efs_symlink_readpage()
38 brelse(bh); in efs_symlink_readpage()
Dinode.c52 struct buffer_head *bh; in efs_iget() local
90 bh = sb_bread(inode->i_sb, block); in efs_iget()
91 if (!bh) { in efs_iget()
96 efs_inode = (struct efs_dinode *) (bh->b_data + offset); in efs_iget()
135 brelse(bh); in efs_iget()
140 brelse(bh); in efs_iget()
200 struct buffer_head *bh = NULL; in efs_map_block() local
263 if (bh) brelse(bh); in efs_map_block()
275 if (bh) brelse(bh); in efs_map_block()
277 bh = sb_bread(inode->i_sb, iblock); in efs_map_block()
[all …]
Ddir.c41 struct buffer_head *bh; in efs_readdir() local
44 bh = sb_bread(inode->i_sb, efs_bmap(inode, block)); in efs_readdir()
46 if (!bh) { in efs_readdir()
52 dirblock = (struct efs_dir *) bh->b_data; in efs_readdir()
56 brelse(bh); in efs_readdir()
69 dirslot = (struct efs_dentry *) (((char *) bh->b_data) + EFS_SLOTAT(dirblock, slot)); in efs_readdir()
91 brelse(bh); in efs_readdir()
95 brelse(bh); in efs_readdir()
Dnamei.c17 struct buffer_head *bh; in efs_find_entry() local
32 bh = sb_bread(inode->i_sb, efs_bmap(inode, block)); in efs_find_entry()
33 if (!bh) { in efs_find_entry()
39 dirblock = (struct efs_dir *) bh->b_data; in efs_find_entry()
43 brelse(bh); in efs_find_entry()
48 dirslot = (struct efs_dentry *) (((char *) bh->b_data) + EFS_SLOTAT(dirblock, slot)); in efs_find_entry()
55 brelse(bh); in efs_find_entry()
59 brelse(bh); in efs_find_entry()
Dsuper.c258 struct buffer_head *bh; in efs_fill_super() local
274 bh = sb_bread(s, 0); in efs_fill_super()
276 if (!bh) { in efs_fill_super()
286 sb->fs_start = efs_validate_vh((struct volume_header *) bh->b_data); in efs_fill_super()
287 brelse(bh); in efs_fill_super()
293 bh = sb_bread(s, sb->fs_start + EFS_SUPER); in efs_fill_super()
294 if (!bh) { in efs_fill_super()
299 if (efs_validate_super(sb, (struct efs_super *) bh->b_data)) { in efs_fill_super()
304 brelse(bh); in efs_fill_super()
307 brelse(bh); in efs_fill_super()
/linux-4.1.27/fs/isofs/
Dnamei.c42 struct buffer_head *bh = NULL; in isofs_find_entry() local
57 if (!bh) { in isofs_find_entry()
58 bh = isofs_bread(dir, block); in isofs_find_entry()
59 if (!bh) in isofs_find_entry()
63 de = (struct iso_directory_record *) (bh->b_data + offset); in isofs_find_entry()
67 brelse(bh); in isofs_find_entry()
68 bh = NULL; in isofs_find_entry()
75 block_saved = bh->b_blocknr; in isofs_find_entry()
86 brelse(bh); in isofs_find_entry()
87 bh = NULL; in isofs_find_entry()
[all …]
Ddir.c89 struct buffer_head *bh = NULL; in do_isofs_readdir() local
103 if (!bh) { in do_isofs_readdir()
104 bh = isofs_bread(inode, block); in do_isofs_readdir()
105 if (!bh) in do_isofs_readdir()
109 de = (struct iso_directory_record *) (bh->b_data + offset); in do_isofs_readdir()
120 brelse(bh); in do_isofs_readdir()
121 bh = NULL; in do_isofs_readdir()
138 brelse(bh); in do_isofs_readdir()
139 bh = NULL; in do_isofs_readdir()
141 bh = isofs_bread(inode, block); in do_isofs_readdir()
[all …]
Dinode.c548 struct buffer_head *bh; in rootdir_empty() local
550 bh = sb_bread(sb, block); in rootdir_empty()
551 if (!bh) in rootdir_empty()
554 de = (struct iso_directory_record *) (bh->b_data + offset); in rootdir_empty()
561 brelse(bh); in rootdir_empty()
573 struct buffer_head *bh = NULL, *pri_bh = NULL; in isofs_fill_super() local
620 if (!(bh = sb_bread(s, block))) in isofs_fill_super()
623 vdp = (struct iso_volume_descriptor *)bh->b_data; in isofs_fill_super()
624 hdp = (struct hs_volume_descriptor *)bh->b_data; in isofs_fill_super()
638 pri_bh = bh; in isofs_fill_super()
[all …]
Dexport.c50 struct buffer_head * bh = NULL; in isofs_export_get_parent() local
77 bh = sb_bread(child_inode->i_sb, parent_block); in isofs_export_get_parent()
78 if (bh == NULL) { in isofs_export_get_parent()
84 de = (struct iso_directory_record*)bh->b_data; in isofs_export_get_parent()
88 de = (struct iso_directory_record*)(bh->b_data + parent_offset); in isofs_export_get_parent()
104 if (bh) in isofs_export_get_parent()
105 brelse(bh); in isofs_export_get_parent()
Dcompress.c209 struct buffer_head *bh; in zisofs_fill_pages() local
236 bh = isofs_bread(inode, blockptr >> blkbits); in zisofs_fill_pages()
237 if (!bh) in zisofs_fill_pages()
240 (bh->b_data + (blockptr & (blksize - 1)))); in zisofs_fill_pages()
247 brelse(bh); in zisofs_fill_pages()
249 bh = isofs_bread(inode, blockptr >> blkbits); in zisofs_fill_pages()
250 if (!bh) in zisofs_fill_pages()
254 (bh->b_data + (blockptr & (blksize - 1)))); in zisofs_fill_pages()
256 brelse(bh); in zisofs_fill_pages()
269 brelse(bh); in zisofs_fill_pages()
/linux-4.1.27/lib/mpi/
Dlonglong.h114 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
120 "rI" ((USItype)(bh)), \
123 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument
129 "rI" ((USItype)(bh)), \
176 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
182 "rI" ((USItype)(bh)), \
185 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument
191 "rI" ((USItype)(bh)), \
263 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
269 "g" ((USItype)(bh)), \
[all …]
/linux-4.1.27/fs/hfs/
Dmdb.c69 struct buffer_head *bh; in hfs_mdb_get() local
87 bh = sb_bread512(sb, part_start + HFS_MDB_BLK, mdb); in hfs_mdb_get()
88 if (!bh) in hfs_mdb_get()
93 brelse(bh); in hfs_mdb_get()
119 brelse(bh); in hfs_mdb_get()
125 bh = sb_bread512(sb, part_start + HFS_MDB_BLK, mdb); in hfs_mdb_get()
126 if (!bh) in hfs_mdb_get()
131 HFS_SB(sb)->mdb_bh = bh; in hfs_mdb_get()
155 bh = sb_bread512(sb, sect, mdb2); in hfs_mdb_get()
156 if (bh) { in hfs_mdb_get()
[all …]
Dpart_tbl.c61 struct buffer_head *bh; in hfs_part_find() local
66 bh = sb_bread512(sb, *part_start + HFS_PMAP_BLK, data); in hfs_part_find()
67 if (!bh) in hfs_part_find()
76 pm = (struct old_pmap *)bh->b_data; in hfs_part_find()
94 pm = (struct new_pmap *)bh->b_data; in hfs_part_find()
104 brelse(bh); in hfs_part_find()
105 bh = sb_bread512(sb, *part_start + HFS_PMAP_BLK + ++i, pm); in hfs_part_find()
106 if (!bh) in hfs_part_find()
114 brelse(bh); in hfs_part_find()
/linux-4.1.27/fs/ufs/
Dutil.c35 if (!(ubh->bh[i] = sb_bread(sb, fragment + i))) in _ubh_bread_()
38 ubh->bh[i] = NULL; in _ubh_bread_()
42 brelse (ubh->bh[j]); in _ubh_bread_()
60 if (!(USPI_UBH(uspi)->bh[i] = sb_bread(sb, fragment + i))) in ubh_bread_uspi()
63 USPI_UBH(uspi)->bh[i] = NULL; in ubh_bread_uspi()
67 brelse (USPI_UBH(uspi)->bh[j]); in ubh_bread_uspi()
77 brelse (ubh->bh[i]); in ubh_brelse()
87 brelse (USPI_UBH(uspi)->bh[i]); in ubh_brelse_uspi()
88 USPI_UBH(uspi)->bh[i] = NULL; in ubh_brelse_uspi()
98 mark_buffer_dirty (ubh->bh[i]); in ubh_mark_buffer_dirty()
[all …]
Dinode.c117 struct buffer_head *bh; in ufs_frag_map() local
120 bh = sb_bread(sb, uspi->s_sbbase + fs32_to_cpu(sb, block)+(n>>shift)); in ufs_frag_map()
121 if (!bh) in ufs_frag_map()
123 block = ((__fs32 *) bh->b_data)[n & mask]; in ufs_frag_map()
124 brelse (bh); in ufs_frag_map()
137 struct buffer_head *bh; in ufs_frag_map() local
142 bh = sb_bread(sb, temp +(u64) (n>>shift)); in ufs_frag_map()
143 if (!bh) in ufs_frag_map()
145 u2_block = ((__fs64 *)bh->b_data)[n & mask]; in ufs_frag_map()
146 brelse(bh); in ufs_frag_map()
[all …]
Dialloc.c132 struct buffer_head *bh; in ufs2_init_inodes_chunk() local
142 bh = sb_getblk(sb, beg); in ufs2_init_inodes_chunk()
143 lock_buffer(bh); in ufs2_init_inodes_chunk()
144 memset(bh->b_data, 0, sb->s_blocksize); in ufs2_init_inodes_chunk()
145 set_buffer_uptodate(bh); in ufs2_init_inodes_chunk()
146 mark_buffer_dirty(bh); in ufs2_init_inodes_chunk()
147 unlock_buffer(bh); in ufs2_init_inodes_chunk()
149 sync_dirty_buffer(bh); in ufs2_init_inodes_chunk()
150 brelse(bh); in ufs2_init_inodes_chunk()
308 struct buffer_head *bh; in ufs_new_inode() local
[all …]
Dtruncate.c382 struct buffer_head *bh; in ufs_alloc_lastblock() local
400 bh = page_buffers(lastpage); in ufs_alloc_lastblock()
402 bh = bh->b_this_page; in ufs_alloc_lastblock()
405 err = ufs_getfrag_block(inode, lastfrag, bh, 1); in ufs_alloc_lastblock()
410 if (buffer_new(bh)) { in ufs_alloc_lastblock()
411 clear_buffer_new(bh); in ufs_alloc_lastblock()
412 unmap_underlying_metadata(bh->b_bdev, in ufs_alloc_lastblock()
413 bh->b_blocknr); in ufs_alloc_lastblock()
418 set_buffer_uptodate(bh); in ufs_alloc_lastblock()
419 mark_buffer_dirty(bh); in ufs_alloc_lastblock()
[all …]
Dballoc.c247 struct buffer_head *head, *bh; in ufs_change_blocknr() local
276 bh = head; in ufs_change_blocknr()
279 bh = bh->b_this_page; in ufs_change_blocknr()
292 if (!buffer_mapped(bh)) in ufs_change_blocknr()
293 map_bh(bh, inode->i_sb, oldb + pos); in ufs_change_blocknr()
294 if (!buffer_uptodate(bh)) { in ufs_change_blocknr()
295 ll_rw_block(READ, 1, &bh); in ufs_change_blocknr()
296 wait_on_buffer(bh); in ufs_change_blocknr()
297 if (!buffer_uptodate(bh)) { in ufs_change_blocknr()
308 bh->b_blocknr = newb + pos; in ufs_change_blocknr()
[all …]
/linux-4.1.27/fs/befs/
Dio.c29 struct buffer_head *bh = NULL; in befs_bread_iaddr() local
47 bh = sb_bread(sb, block); in befs_bread_iaddr()
49 if (bh == NULL) { in befs_bread_iaddr()
56 return bh; in befs_bread_iaddr()
66 struct buffer_head *bh = NULL; in befs_bread() local
70 bh = sb_bread(sb, block); in befs_bread()
72 if (bh == NULL) { in befs_bread()
80 return bh; in befs_bread()
Dbtree.c83 struct buffer_head *bh; member
140 struct buffer_head *bh = NULL; in befs_bt_read_super() local
145 bh = befs_read_datastream(sb, ds, 0, NULL); in befs_bt_read_super()
147 if (!bh) { in befs_bt_read_super()
151 od_sup = (befs_disk_btree_super *) bh->b_data; in befs_bt_read_super()
162 brelse(bh); in befs_bt_read_super()
203 if (node->bh) in befs_bt_read_node()
204 brelse(node->bh); in befs_bt_read_node()
206 node->bh = befs_read_datastream(sb, ds, node_off, &off); in befs_bt_read_node()
207 if (!node->bh) { in befs_bt_read_node()
[all …]
Ddatastream.c51 struct buffer_head *bh = NULL; in befs_read_datastream() local
66 bh = befs_bread_iaddr(sb, run); in befs_read_datastream()
67 if (!bh) { in befs_read_datastream()
75 return bh; in befs_read_datastream()
130 struct buffer_head *bh = NULL; in befs_read_lsymlink() local
134 bh = befs_read_datastream(sb, ds, bytes_read, NULL); in befs_read_lsymlink()
135 if (!bh) { in befs_read_lsymlink()
144 memcpy(buff + bytes_read, bh->b_data, plen); in befs_read_lsymlink()
145 brelse(bh); in befs_read_lsymlink()
/linux-4.1.27/arch/powerpc/include/asm/
Dsfp-machine.h216 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
218 if (__builtin_constant_p (bh) && (bh) == 0) \
225 else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
237 "r" ((USItype)(bh)), \
251 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument
257 : "r" ((USItype)(bh)), \
264 : "r" ((USItype)(bh)), \
267 else if (__builtin_constant_p (bh) && (bh) == 0) \
274 else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
286 "r" ((USItype)(bh)), \
/linux-4.1.27/fs/jfs/
Dresize.c85 struct buffer_head *bh, *bh2; in jfs_extendfs() local
111 bh = sb_bread(sb, newLVSize - 1); in jfs_extendfs()
112 if (!bh) { in jfs_extendfs()
117 bforget(bh); in jfs_extendfs()
237 if ((rc = readSuper(sb, &bh))) in jfs_extendfs()
239 j_sb = (struct jfs_superblock *)bh->b_data; in jfs_extendfs()
250 mark_buffer_dirty(bh); in jfs_extendfs()
251 sync_dirty_buffer(bh); in jfs_extendfs()
252 brelse(bh); in jfs_extendfs()
489 if ((rc = readSuper(sb, &bh))) in jfs_extendfs()
[all …]
Djfs_mount.c306 struct buffer_head *bh; in chkSuper() local
313 if ((rc = readSuper(sb, &bh))) in chkSuper()
315 j_sb = (struct jfs_superblock *)bh->b_data; in chkSuper()
399 brelse(bh); in chkSuper()
413 struct buffer_head *bh; in updateSuper() local
430 if ((rc = readSuper(sb, &bh))) in updateSuper()
433 j_sb = (struct jfs_superblock *)bh->b_data; in updateSuper()
451 mark_buffer_dirty(bh); in updateSuper()
452 sync_dirty_buffer(bh); in updateSuper()
453 brelse(bh); in updateSuper()
Dsuper.c751 struct buffer_head *bh; in jfs_quota_read() local
771 bh = sb_bread(sb, tmp_bh.b_blocknr); in jfs_quota_read()
772 if (!bh) in jfs_quota_read()
774 memcpy(data, bh->b_data+offset, tocopy); in jfs_quota_read()
775 brelse(bh); in jfs_quota_read()
796 struct buffer_head *bh; in jfs_quota_write() local
809 bh = sb_bread(sb, tmp_bh.b_blocknr); in jfs_quota_write()
811 bh = sb_getblk(sb, tmp_bh.b_blocknr); in jfs_quota_write()
812 if (!bh) { in jfs_quota_write()
816 lock_buffer(bh); in jfs_quota_write()
[all …]
/linux-4.1.27/arch/alpha/math-emu/
Dsfp-util.h7 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
8 ((sl) = (al) + (bl), (sh) = (ah) + (bh) + ((sl) < (al)))
10 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument
11 ((sl) = (al) - (bl), (sh) = (ah) - (bh) - ((al) < (bl)))
/linux-4.1.27/arch/sparc/math-emu/
Dsfp-util_32.h6 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
12 "rI" ((USItype)(bh)), \
16 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument
22 "rI" ((USItype)(bh)), \
Dsfp-util_64.h14 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
23 "r" ((UDItype)(bh)), \
28 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument
37 "r" ((UDItype)(bh)), \
/linux-4.1.27/arch/s390/include/asm/
Dsfp-util.h6 #define add_ssaaaa(sh, sl, ah, al, bh, bl) ({ \ argument
15 : "d" (bh), "d" (bl) : "cc"); \
20 #define sub_ddmmss(sh, sl, ah, al, bh, bl) ({ \ argument
29 : "d" (bh), "d" (bl) : "cc"); \
/linux-4.1.27/mm/
Dmigrate.c255 struct buffer_head *bh = head; in buffer_migrate_lock_buffers() local
260 get_bh(bh); in buffer_migrate_lock_buffers()
261 lock_buffer(bh); in buffer_migrate_lock_buffers()
262 bh = bh->b_this_page; in buffer_migrate_lock_buffers()
264 } while (bh != head); in buffer_migrate_lock_buffers()
271 get_bh(bh); in buffer_migrate_lock_buffers()
272 if (!trylock_buffer(bh)) { in buffer_migrate_lock_buffers()
277 struct buffer_head *failed_bh = bh; in buffer_migrate_lock_buffers()
279 bh = head; in buffer_migrate_lock_buffers()
280 while (bh != failed_bh) { in buffer_migrate_lock_buffers()
[all …]
/linux-4.1.27/drivers/scsi/esas2r/
Desas2r_flash.c247 struct esas2r_boot_header *bh; in fix_bios() local
250 bh = in fix_bios()
253 bh->device_id = cpu_to_le16(a->pcid->device); in fix_bios()
281 struct esas2r_boot_header *bh; in fix_efi() local
287 bh = (struct esas2r_boot_header *)((u8 *)ei + in fix_efi()
290 bh->device_id = cpu_to_le16(a->pcid->device); in fix_efi()
291 thislen = (u32)le16_to_cpu(bh->image_length) * 512; in fix_efi()
634 struct esas2r_boot_header *bh; in chk_boot() local
644 bh = (struct esas2r_boot_header *)((char *)bi + hdroffset); in chk_boot()
646 if (bh->signature[0] != 'P' in chk_boot()
[all …]
/linux-4.1.27/arch/sh/math-emu/
Dsfp-util.h5 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ argument
9 (sh) = (ah) + (bh) + (__x < (al)); \
13 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ argument
17 (sh) = (ah) - (bh) - (__x > (al)); \
/linux-4.1.27/fs/qnx6/
Dinode.c72 struct buffer_head *bh, int create) in qnx6_get_block() argument
82 map_bh(bh, inode->i_sb, phys); in qnx6_get_block()
117 struct buffer_head *bh; in qnx6_block_map() local
137 bh = sb_bread(s, block); in qnx6_block_map()
138 if (!bh) { in qnx6_block_map()
144 ptr = ((__fs32 *)bh->b_data)[levelptr]; in qnx6_block_map()
150 brelse(bh); in qnx6_block_map()
261 struct buffer_head *bh; in qnx6_check_first_superblock() local
266 bh = sb_bread(s, offset); in qnx6_check_first_superblock()
267 if (!bh) { in qnx6_check_first_superblock()
[all …]
/linux-4.1.27/fs/btrfs/
Dcheck-integrity.c169 bh_end_io_t *bh; member
340 struct buffer_head *bh,
347 static void btrfsic_bh_end_io(struct buffer_head *bh, int uptodate);
801 struct buffer_head *bh; in btrfsic_process_superblock_dev_mirror() local
810 bh = __bread(superblock_bdev, dev_bytenr / 4096, in btrfsic_process_superblock_dev_mirror()
812 if (NULL == bh) in btrfsic_process_superblock_dev_mirror()
815 (bh->b_data + (dev_bytenr & 4095)); in btrfsic_process_superblock_dev_mirror()
822 brelse(bh); in btrfsic_process_superblock_dev_mirror()
834 brelse(bh); in btrfsic_process_superblock_dev_mirror()
921 brelse(bh); in btrfsic_process_superblock_dev_mirror()
[all …]

12