Lines Matching refs:bh
43 struct buffer_head *bh) in write_mmp_block_thawed() argument
45 struct mmp_struct *mmp = (struct mmp_struct *)(bh->b_data); in write_mmp_block_thawed()
48 lock_buffer(bh); in write_mmp_block_thawed()
49 bh->b_end_io = end_buffer_write_sync; in write_mmp_block_thawed()
50 get_bh(bh); in write_mmp_block_thawed()
51 submit_bh(REQ_OP_WRITE | REQ_SYNC | REQ_META | REQ_PRIO, bh); in write_mmp_block_thawed()
52 wait_on_buffer(bh); in write_mmp_block_thawed()
53 if (unlikely(!buffer_uptodate(bh))) in write_mmp_block_thawed()
58 static int write_mmp_block(struct super_block *sb, struct buffer_head *bh) in write_mmp_block() argument
67 err = write_mmp_block_thawed(sb, bh); in write_mmp_block()
76 static int read_mmp_block(struct super_block *sb, struct buffer_head **bh, in read_mmp_block() argument
82 if (*bh) in read_mmp_block()
83 clear_buffer_uptodate(*bh); in read_mmp_block()
88 if (!*bh) { in read_mmp_block()
89 *bh = sb_getblk(sb, mmp_block); in read_mmp_block()
90 if (!*bh) { in read_mmp_block()
96 lock_buffer(*bh); in read_mmp_block()
97 ret = ext4_read_bh(*bh, REQ_META | REQ_PRIO, NULL, false); in read_mmp_block()
101 mmp = (struct mmp_struct *)((*bh)->b_data); in read_mmp_block()
112 brelse(*bh); in read_mmp_block()
113 *bh = NULL; in read_mmp_block()
140 struct buffer_head *bh = EXT4_SB(sb)->s_mmp_bh; in kmmpd() local
152 mmp = (struct mmp_struct *)(bh->b_data); in kmmpd()
178 retval = write_mmp_block(sb, bh); in kmmpd()
246 retval = write_mmp_block(sb, bh); in kmmpd()
283 struct buffer_head *bh = NULL; in ext4_multi_mount_protect() local
297 retval = read_mmp_block(sb, &bh, mmp_block); in ext4_multi_mount_protect()
301 mmp = (struct mmp_struct *)(bh->b_data); in ext4_multi_mount_protect()
337 retval = read_mmp_block(sb, &bh, mmp_block); in ext4_multi_mount_protect()
340 mmp = (struct mmp_struct *)(bh->b_data); in ext4_multi_mount_protect()
359 retval = write_mmp_block_thawed(sb, bh); in ext4_multi_mount_protect()
372 retval = read_mmp_block(sb, &bh, mmp_block); in ext4_multi_mount_protect()
375 mmp = (struct mmp_struct *)(bh->b_data); in ext4_multi_mount_protect()
383 EXT4_SB(sb)->s_mmp_bh = bh; in ext4_multi_mount_protect()
387 "%pg", bh->b_bdev); in ext4_multi_mount_protect()
406 brelse(bh); in ext4_multi_mount_protect()