• Home
  • Raw
  • Download

Lines Matching refs:bhs

45 	struct buffer_head **bhs = fatent->bhs;  in fat12_ent_set_ptr()  local
47 WARN_ON(offset >= (bhs[0]->b_size - 1)); in fat12_ent_set_ptr()
48 fatent->u.ent12_p[0] = bhs[0]->b_data + offset; in fat12_ent_set_ptr()
49 fatent->u.ent12_p[1] = bhs[0]->b_data + (offset + 1); in fat12_ent_set_ptr()
51 WARN_ON(offset != (bhs[0]->b_size - 1)); in fat12_ent_set_ptr()
52 fatent->u.ent12_p[0] = bhs[0]->b_data + offset; in fat12_ent_set_ptr()
53 fatent->u.ent12_p[1] = bhs[1]->b_data; in fat12_ent_set_ptr()
60 fatent->u.ent16_p = (__le16 *)(fatent->bhs[0]->b_data + offset); in fat16_ent_set_ptr()
66 fatent->u.ent32_p = (__le32 *)(fatent->bhs[0]->b_data + offset); in fat32_ent_set_ptr()
72 struct buffer_head **bhs = fatent->bhs; in fat12_ent_bread() local
77 bhs[0] = sb_bread(sb, blocknr); in fat12_ent_bread()
78 if (!bhs[0]) in fat12_ent_bread()
86 bhs[1] = sb_bread(sb, blocknr); in fat12_ent_bread()
87 if (!bhs[1]) in fat12_ent_bread()
95 brelse(bhs[0]); in fat12_ent_bread()
109 fatent->bhs[0] = sb_bread(sb, blocknr); in fat_ent_bread()
110 if (!fatent->bhs[0]) { in fat_ent_bread()
173 mark_buffer_dirty_inode(fatent->bhs[0], fatent->fat_inode); in fat12_ent_put()
175 mark_buffer_dirty_inode(fatent->bhs[1], fatent->fat_inode); in fat12_ent_put()
184 mark_buffer_dirty_inode(fatent->bhs[0], fatent->fat_inode); in fat16_ent_put()
192 mark_buffer_dirty_inode(fatent->bhs[0], fatent->fat_inode); in fat32_ent_put()
198 struct buffer_head **bhs = fatent->bhs; in fat12_ent_next() local
203 WARN_ON(ent12_p[0] > (u8 *)(bhs[0]->b_data + in fat12_ent_next()
204 (bhs[0]->b_size - 2))); in fat12_ent_next()
205 WARN_ON(ent12_p[1] > (u8 *)(bhs[0]->b_data + in fat12_ent_next()
206 (bhs[0]->b_size - 1))); in fat12_ent_next()
207 if (nextp < (u8 *)(bhs[0]->b_data + (bhs[0]->b_size - 1))) { in fat12_ent_next()
213 WARN_ON(ent12_p[0] != (u8 *)(bhs[0]->b_data + in fat12_ent_next()
214 (bhs[0]->b_size - 1))); in fat12_ent_next()
215 WARN_ON(ent12_p[1] != (u8 *)bhs[1]->b_data); in fat12_ent_next()
218 brelse(bhs[0]); in fat12_ent_next()
219 bhs[0] = bhs[1]; in fat12_ent_next()
230 const struct buffer_head *bh = fatent->bhs[0]; in fat16_ent_next()
242 const struct buffer_head *bh = fatent->bhs[0]; in fat32_ent_next()
325 struct buffer_head **bhs = fatent->bhs; in fat_ent_update_ptr() local
328 if (!fatent->nr_bhs || bhs[0]->b_blocknr != blocknr) in fat_ent_update_ptr()
334 brelse(bhs[1]); in fat_ent_update_ptr()
341 if (bhs[1]->b_blocknr != (blocknr + 1)) in fat_ent_update_ptr()
376 static int fat_mirror_bhs(struct super_block *sb, struct buffer_head **bhs, in fat_mirror_bhs() argument
388 c_bh = sb_getblk(sb, backup_fat + bhs[n]->b_blocknr); in fat_mirror_bhs()
395 memcpy(c_bh->b_data, bhs[n]->b_data, sb->s_blocksize); in fat_mirror_bhs()
419 err = fat_sync_bhs(fatent->bhs, fatent->nr_bhs); in fat_ent_write()
423 return fat_mirror_bhs(sb, fatent->bhs, fatent->nr_bhs); in fat_ent_write()
448 static void fat_collect_bhs(struct buffer_head **bhs, int *nr_bhs, in fat_collect_bhs() argument
455 if (fatent->bhs[n] == bhs[i]) in fat_collect_bhs()
459 get_bh(fatent->bhs[n]); in fat_collect_bhs()
460 bhs[i] = fatent->bhs[n]; in fat_collect_bhs()
472 struct buffer_head *bhs[MAX_BUF_PER_PAGE]; in fat_alloc_clusters() local
507 fat_collect_bhs(bhs, &nr_bhs, &fatent); in fat_alloc_clusters()
541 err = fat_sync_bhs(bhs, nr_bhs); in fat_alloc_clusters()
543 err = fat_mirror_bhs(sb, bhs, nr_bhs); in fat_alloc_clusters()
546 brelse(bhs[i]); in fat_alloc_clusters()
560 struct buffer_head *bhs[MAX_BUF_PER_PAGE]; in fat_free_clusters() local
605 err = fat_sync_bhs(bhs, nr_bhs); in fat_free_clusters()
609 err = fat_mirror_bhs(sb, bhs, nr_bhs); in fat_free_clusters()
613 brelse(bhs[i]); in fat_free_clusters()
616 fat_collect_bhs(bhs, &nr_bhs, &fatent); in fat_free_clusters()
620 err = fat_sync_bhs(bhs, nr_bhs); in fat_free_clusters()
624 err = fat_mirror_bhs(sb, bhs, nr_bhs); in fat_free_clusters()
628 brelse(bhs[i]); in fat_free_clusters()