Lines Matching refs:bh

40 	struct buffer_head *bh;  in hpfs_prefetch_sectors()  local
49 bh = sb_find_get_block(s, secno); in hpfs_prefetch_sectors()
50 if (bh) { in hpfs_prefetch_sectors()
51 if (buffer_uptodate(bh)) { in hpfs_prefetch_sectors()
52 brelse(bh); in hpfs_prefetch_sectors()
55 brelse(bh); in hpfs_prefetch_sectors()
74 struct buffer_head *bh; in hpfs_map_sector() local
82 *bhp = bh = sb_bread(s, hpfs_search_hotfix_map(s, secno)); in hpfs_map_sector()
83 if (bh != NULL) in hpfs_map_sector()
84 return bh->b_data; in hpfs_map_sector()
95 struct buffer_head *bh; in hpfs_get_sector() local
102 if ((*bhp = bh = sb_getblk(s, hpfs_search_hotfix_map(s, secno))) != NULL) { in hpfs_get_sector()
103 if (!buffer_uptodate(bh)) wait_on_buffer(bh); in hpfs_get_sector()
104 set_buffer_uptodate(bh); in hpfs_get_sector()
105 return bh->b_data; in hpfs_get_sector()
130 if (!hpfs_map_sector(s, secno + 0, &qbh->bh[0], 0)) goto bail0; in hpfs_map_4sectors()
131 if (!hpfs_map_sector(s, secno + 1, &qbh->bh[1], 0)) goto bail1; in hpfs_map_4sectors()
132 if (!hpfs_map_sector(s, secno + 2, &qbh->bh[2], 0)) goto bail2; in hpfs_map_4sectors()
133 if (!hpfs_map_sector(s, secno + 3, &qbh->bh[3], 0)) goto bail3; in hpfs_map_4sectors()
135 if (likely(qbh->bh[1]->b_data == qbh->bh[0]->b_data + 1 * 512) && in hpfs_map_4sectors()
136 likely(qbh->bh[2]->b_data == qbh->bh[0]->b_data + 2 * 512) && in hpfs_map_4sectors()
137 likely(qbh->bh[3]->b_data == qbh->bh[0]->b_data + 3 * 512)) { in hpfs_map_4sectors()
138 return qbh->data = qbh->bh[0]->b_data; in hpfs_map_4sectors()
147 memcpy(data + 0 * 512, qbh->bh[0]->b_data, 512); in hpfs_map_4sectors()
148 memcpy(data + 1 * 512, qbh->bh[1]->b_data, 512); in hpfs_map_4sectors()
149 memcpy(data + 2 * 512, qbh->bh[2]->b_data, 512); in hpfs_map_4sectors()
150 memcpy(data + 3 * 512, qbh->bh[3]->b_data, 512); in hpfs_map_4sectors()
155 brelse(qbh->bh[3]); in hpfs_map_4sectors()
157 brelse(qbh->bh[2]); in hpfs_map_4sectors()
159 brelse(qbh->bh[1]); in hpfs_map_4sectors()
161 brelse(qbh->bh[0]); in hpfs_map_4sectors()
180 if (!hpfs_get_sector(s, secno + 0, &qbh->bh[0])) goto bail0; in hpfs_get_4sectors()
181 if (!hpfs_get_sector(s, secno + 1, &qbh->bh[1])) goto bail1; in hpfs_get_4sectors()
182 if (!hpfs_get_sector(s, secno + 2, &qbh->bh[2])) goto bail2; in hpfs_get_4sectors()
183 if (!hpfs_get_sector(s, secno + 3, &qbh->bh[3])) goto bail3; in hpfs_get_4sectors()
185 if (likely(qbh->bh[1]->b_data == qbh->bh[0]->b_data + 1 * 512) && in hpfs_get_4sectors()
186 likely(qbh->bh[2]->b_data == qbh->bh[0]->b_data + 2 * 512) && in hpfs_get_4sectors()
187 likely(qbh->bh[3]->b_data == qbh->bh[0]->b_data + 3 * 512)) { in hpfs_get_4sectors()
188 return qbh->data = qbh->bh[0]->b_data; in hpfs_get_4sectors()
198 brelse(qbh->bh[3]); in hpfs_get_4sectors()
200 brelse(qbh->bh[2]); in hpfs_get_4sectors()
202 brelse(qbh->bh[1]); in hpfs_get_4sectors()
204 brelse(qbh->bh[0]); in hpfs_get_4sectors()
212 if (unlikely(qbh->data != qbh->bh[0]->b_data)) in hpfs_brelse4()
214 brelse(qbh->bh[0]); in hpfs_brelse4()
215 brelse(qbh->bh[1]); in hpfs_brelse4()
216 brelse(qbh->bh[2]); in hpfs_brelse4()
217 brelse(qbh->bh[3]); in hpfs_brelse4()
222 if (unlikely(qbh->data != qbh->bh[0]->b_data)) { in hpfs_mark_4buffers_dirty()
223 memcpy(qbh->bh[0]->b_data, qbh->data + 0 * 512, 512); in hpfs_mark_4buffers_dirty()
224 memcpy(qbh->bh[1]->b_data, qbh->data + 1 * 512, 512); in hpfs_mark_4buffers_dirty()
225 memcpy(qbh->bh[2]->b_data, qbh->data + 2 * 512, 512); in hpfs_mark_4buffers_dirty()
226 memcpy(qbh->bh[3]->b_data, qbh->data + 3 * 512, 512); in hpfs_mark_4buffers_dirty()
228 mark_buffer_dirty(qbh->bh[0]); in hpfs_mark_4buffers_dirty()
229 mark_buffer_dirty(qbh->bh[1]); in hpfs_mark_4buffers_dirty()
230 mark_buffer_dirty(qbh->bh[2]); in hpfs_mark_4buffers_dirty()
231 mark_buffer_dirty(qbh->bh[3]); in hpfs_mark_4buffers_dirty()