Lines Matching refs:bmp

72 	__le32 *bmp;  in chk_if_allocated()  local
73 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "chk"))) goto fail; in chk_if_allocated()
74 if ((le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) >> (sec & 0x1f)) & 1) { in chk_if_allocated()
81 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto fail; in chk_if_allocated()
82 if ((le32_to_cpu(bmp[ssec >> 5]) >> (ssec & 0x1f)) & 1) { in chk_if_allocated()
118 __le32 *bmp; in alloc_in_bmp() local
130 if (!(bmp = hpfs_map_bitmap(s, near >> 14, &qbh, "aib"))) goto uls; in alloc_in_bmp()
132 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto uls; in alloc_in_bmp()
134 if (!tstbits(bmp, nr, n + forward)) { in alloc_in_bmp()
139 while ((a = tstbits(bmp, q, n + forward)) != 0) { in alloc_in_bmp()
157 if (!le32_to_cpu(bmp[i])) goto cont; in alloc_in_bmp()
158 if (n + forward >= 0x3f && le32_to_cpu(bmp[i]) != 0xffffffff) goto cont; in alloc_in_bmp()
161 unsigned k = le32_to_cpu(bmp[i-1]); in alloc_in_bmp()
167 while ((a = tstbits(bmp, q, n + forward)) != 0) { in alloc_in_bmp()
181 …if (hpfs_sb(s)->sb_chk && ((ret >> 14) != (bs >> 14) || (le32_to_cpu(bmp[(ret & 0x3fff) >> 5]) | ~… in alloc_in_bmp()
186 bmp[(ret & 0x3fff) >> 5] &= cpu_to_le32(~(((1 << n) - 1) << (ret & 0x1f))); in alloc_in_bmp()
299 __le32 *bmp; in hpfs_alloc_if_possible() local
300 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "aip"))) goto end; in hpfs_alloc_if_possible()
301 if (le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) & (1 << (sec & 0x1f))) { in hpfs_alloc_if_possible()
302 bmp[(sec & 0x3fff) >> 5] &= cpu_to_le32(~(1 << (sec & 0x1f))); in hpfs_alloc_if_possible()
318 __le32 *bmp; in hpfs_free_sectors() local
329 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "free"))) { in hpfs_free_sectors()
333 if ((le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) >> (sec & 0x1f) & 1)) { in hpfs_free_sectors()
338 bmp[(sec & 0x3fff) >> 5] |= cpu_to_le32(1 << (sec & 0x1f)); in hpfs_free_sectors()
364 __le32 *bmp; in hpfs_check_free_dnodes() local
366 if ((bmp = hpfs_map_dnode_bitmap(s, &qbh))) { in hpfs_check_free_dnodes()
369 if (!le32_to_cpu(bmp[j])) continue; in hpfs_check_free_dnodes()
370 for (k = le32_to_cpu(bmp[j]); k; k >>= 1) if (k & 1) if (!--n) { in hpfs_check_free_dnodes()
379 bmp = hpfs_map_bitmap(s, b, &qbh, "chkdn1"); in hpfs_check_free_dnodes()
385 bmp = hpfs_map_bitmap(s, i, &qbh, "chkdn2"); in hpfs_check_free_dnodes()
387 if (bmp) { in hpfs_check_free_dnodes()
390 if (!le32_to_cpu(bmp[j])) continue; in hpfs_check_free_dnodes()
392 if ((le32_to_cpu(bmp[j]) & k) == k) { in hpfs_check_free_dnodes()
416 __le32 *bmp; in hpfs_free_dnode() local
418 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) { in hpfs_free_dnode()
421 bmp[ssec >> 5] |= cpu_to_le32(1 << (ssec & 0x1f)); in hpfs_free_dnode()
489 static unsigned find_run(__le32 *bmp, unsigned *idx) in find_run() argument
492 while (tstbits(bmp, *idx, 1)) { in find_run()
498 while (!tstbits(bmp, *idx + len, 1)) in find_run()
530 __le32 *bmp; in hpfs_trim_fs() local
546 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) { in hpfs_trim_fs()
551 while ((len = find_run(bmp, &idx)) && !err) { in hpfs_trim_fs()
567 if (!(bmp = hpfs_map_bitmap(s, start_bmp, &qbh, "trim"))) { in hpfs_trim_fs()
572 while ((len = find_run(bmp, &idx)) && !err) { in hpfs_trim_fs()