Lines Matching refs:bh
132 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()
223 struct buffer_head *bh = NULL; in ocfs2_quota_write() local
258 err = ocfs2_read_quota_phys_block(gqinode, pblock, &bh); in ocfs2_quota_write()
261 bh = sb_getblk(sb, pblock); in ocfs2_quota_write()
262 if (!bh) in ocfs2_quota_write()
270 lock_buffer(bh); in ocfs2_quota_write()
272 memset(bh->b_data, 0, sb->s_blocksize); in ocfs2_quota_write()
273 memcpy(bh->b_data + offset, data, len); in ocfs2_quota_write()
274 flush_dcache_page(bh->b_page); in ocfs2_quota_write()
275 set_buffer_uptodate(bh); in ocfs2_quota_write()
276 unlock_buffer(bh); in ocfs2_quota_write()
277 ocfs2_set_buffer_uptodate(INODE_CACHE(gqinode), bh); in ocfs2_quota_write()
278 err = ocfs2_journal_access_dq(handle, INODE_CACHE(gqinode), bh, in ocfs2_quota_write()
281 brelse(bh); in ocfs2_quota_write()
284 ocfs2_journal_dirty(handle, bh); in ocfs2_quota_write()
285 brelse(bh); in ocfs2_quota_write()
299 struct buffer_head *bh = NULL; in ocfs2_lock_global_qf() local
301 status = ocfs2_inode_lock(oinfo->dqi_gqinode, &bh, ex); in ocfs2_lock_global_qf()
306 oinfo->dqi_gqi_bh = bh; in ocfs2_lock_global_qf()
308 WARN_ON(bh != oinfo->dqi_gqi_bh); in ocfs2_lock_global_qf()