• Home
  • Raw
  • Download

Lines Matching refs:bmp

71 	__le32 *bmp;  in chk_if_allocated()  local
72 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "chk"))) goto fail; in chk_if_allocated()
73 if ((le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) >> (sec & 0x1f)) & 1) { in chk_if_allocated()
80 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto fail; in chk_if_allocated()
81 if ((le32_to_cpu(bmp[ssec >> 5]) >> (ssec & 0x1f)) & 1) { in chk_if_allocated()
117 __le32 *bmp; in alloc_in_bmp() local
129 if (!(bmp = hpfs_map_bitmap(s, near >> 14, &qbh, "aib"))) goto uls; in alloc_in_bmp()
131 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto uls; in alloc_in_bmp()
133 if (!tstbits(bmp, nr, n + forward)) { in alloc_in_bmp()
138 while ((a = tstbits(bmp, q, n + forward)) != 0) { in alloc_in_bmp()
156 if (!le32_to_cpu(bmp[i])) goto cont; in alloc_in_bmp()
157 if (n + forward >= 0x3f && le32_to_cpu(bmp[i]) != 0xffffffff) goto cont; in alloc_in_bmp()
160 unsigned k = le32_to_cpu(bmp[i-1]); in alloc_in_bmp()
166 while ((a = tstbits(bmp, q, n + forward)) != 0) { in alloc_in_bmp()
180 …if (hpfs_sb(s)->sb_chk && ((ret >> 14) != (bs >> 14) || (le32_to_cpu(bmp[(ret & 0x3fff) >> 5]) | ~… in alloc_in_bmp()
185 bmp[(ret & 0x3fff) >> 5] &= cpu_to_le32(~(((1 << n) - 1) << (ret & 0x1f))); in alloc_in_bmp()
298 __le32 *bmp; in hpfs_alloc_if_possible() local
299 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "aip"))) goto end; in hpfs_alloc_if_possible()
300 if (le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) & (1 << (sec & 0x1f))) { in hpfs_alloc_if_possible()
301 bmp[(sec & 0x3fff) >> 5] &= cpu_to_le32(~(1 << (sec & 0x1f))); in hpfs_alloc_if_possible()
317 __le32 *bmp; in hpfs_free_sectors() local
328 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "free"))) { in hpfs_free_sectors()
332 if ((le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) >> (sec & 0x1f) & 1)) { in hpfs_free_sectors()
337 bmp[(sec & 0x3fff) >> 5] |= cpu_to_le32(1 << (sec & 0x1f)); in hpfs_free_sectors()
363 __le32 *bmp; in hpfs_check_free_dnodes() local
365 if ((bmp = hpfs_map_dnode_bitmap(s, &qbh))) { in hpfs_check_free_dnodes()
368 if (!le32_to_cpu(bmp[j])) continue; in hpfs_check_free_dnodes()
369 for (k = le32_to_cpu(bmp[j]); k; k >>= 1) if (k & 1) if (!--n) { in hpfs_check_free_dnodes()
378 bmp = hpfs_map_bitmap(s, b, &qbh, "chkdn1"); in hpfs_check_free_dnodes()
384 bmp = hpfs_map_bitmap(s, i, &qbh, "chkdn2"); in hpfs_check_free_dnodes()
386 if (bmp) { in hpfs_check_free_dnodes()
389 if (!le32_to_cpu(bmp[j])) continue; in hpfs_check_free_dnodes()
391 if ((le32_to_cpu(bmp[j]) & k) == k) { in hpfs_check_free_dnodes()
415 __le32 *bmp; in hpfs_free_dnode() local
417 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) { in hpfs_free_dnode()
420 bmp[ssec >> 5] |= cpu_to_le32(1 << (ssec & 0x1f)); in hpfs_free_dnode()
488 static unsigned find_run(__le32 *bmp, unsigned *idx) in find_run() argument
491 while (tstbits(bmp, *idx, 1)) { in find_run()
497 while (!tstbits(bmp, *idx + len, 1)) in find_run()
529 __le32 *bmp; in hpfs_trim_fs() local
545 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) { in hpfs_trim_fs()
550 while ((len = find_run(bmp, &idx)) && !err) { in hpfs_trim_fs()
566 if (!(bmp = hpfs_map_bitmap(s, start_bmp, &qbh, "trim"))) { in hpfs_trim_fs()
571 while ((len = find_run(bmp, &idx)) && !err) { in hpfs_trim_fs()