Lines Matching refs:sbi

13 	struct hpfs_sb_info *sbi = hpfs_sb(s);  in hpfs_claim_alloc()  local
14 if (sbi->sb_n_free != (unsigned)-1) { in hpfs_claim_alloc()
15 if (unlikely(!sbi->sb_n_free)) { in hpfs_claim_alloc()
17 sbi->sb_n_free = -1; in hpfs_claim_alloc()
20 sbi->sb_n_free--; in hpfs_claim_alloc()
26 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_claim_free() local
27 if (sbi->sb_n_free != (unsigned)-1) { in hpfs_claim_free()
28 if (unlikely(sbi->sb_n_free >= sbi->sb_fs_size)) { in hpfs_claim_free()
30 sbi->sb_n_free = -1; in hpfs_claim_free()
33 sbi->sb_n_free++; in hpfs_claim_free()
39 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_claim_dirband_alloc() local
40 if (sbi->sb_n_free_dnodes != (unsigned)-1) { in hpfs_claim_dirband_alloc()
41 if (unlikely(!sbi->sb_n_free_dnodes)) { in hpfs_claim_dirband_alloc()
43 sbi->sb_n_free_dnodes = -1; in hpfs_claim_dirband_alloc()
46 sbi->sb_n_free_dnodes--; in hpfs_claim_dirband_alloc()
52 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_claim_dirband_free() local
53 if (sbi->sb_n_free_dnodes != (unsigned)-1) { in hpfs_claim_dirband_free()
54 if (unlikely(sbi->sb_n_free_dnodes >= sbi->sb_dirband_size / 4)) { in hpfs_claim_dirband_free()
56 sbi->sb_n_free_dnodes = -1; in hpfs_claim_dirband_free()
59 sbi->sb_n_free_dnodes++; in hpfs_claim_dirband_free()
207 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_alloc_sector() local
214 n_bmps = (sbi->sb_fs_size + 0x4000 - 1) >> 14; in hpfs_alloc_sector()
215 if (near && near < sbi->sb_fs_size) { in hpfs_alloc_sector()
227 if (!f_p) if (forward > sbi->sb_max_fwd_alloc) forward = sbi->sb_max_fwd_alloc; in hpfs_alloc_sector()
231 sbi->sb_c_bitmap = near_bmp+i; in hpfs_alloc_sector()
236 sbi->sb_c_bitmap = near_bmp-i-1; in hpfs_alloc_sector()
241 sbi->sb_c_bitmap = near_bmp+i-n_bmps; in hpfs_alloc_sector()
245 …if (i == 1 && sbi->sb_c_bitmap != -1 && ((sec = alloc_in_bmp(s, (sbi->sb_c_bitmap) << 14, n, forwa… in hpfs_alloc_sector()
251 sbi->sb_max_fwd_alloc = forward * 3 / 4; in hpfs_alloc_sector()
280 struct hpfs_sb_info *sbi = hpfs_sb(s); in alloc_in_dirband() local
281 if (nr < sbi->sb_dirband_start) in alloc_in_dirband()
282 nr = sbi->sb_dirband_start; in alloc_in_dirband()
283 if (nr >= sbi->sb_dirband_start + sbi->sb_dirband_size) in alloc_in_dirband()
284 nr = sbi->sb_dirband_start + sbi->sb_dirband_size - 4; in alloc_in_dirband()
285 nr -= sbi->sb_dirband_start; in alloc_in_dirband()
290 return ((sec & 0x3fff) << 2) + sbi->sb_dirband_start; in alloc_in_dirband()
318 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_free_sectors() local
325 sbi->sb_max_fwd_alloc += n > 0xffff ? 0xffff : n; in hpfs_free_sectors()
326 if (sbi->sb_max_fwd_alloc > 0xffffff) sbi->sb_max_fwd_alloc = 0xffffff; in hpfs_free_sectors()