Lines Matching defs:bm

150 	u8 *bm;
828 if (ntfs_bit_get_and_set(lcn_bitmap->bm, k, 1)) {
884 u8 bm[NTFS_BUF_SIZE];
890 count = ntfs_attr_pread(vol->lcnbmp_na, pos, NTFS_BUF_SIZE, bm);
907 if (a->bm[pos] == bm[i])
913 bit = ntfs_bit_get(a->bm, cl);
914 if (bit == ntfs_bit_get(bm, i * 8 + cl % 8))
1223 static void set_bitmap_range(struct bitmap *bm, s64 pos, s64 length, u8 bit)
1226 ntfs_bit_set(bm->bm, pos++, bit);
1229 static void set_bitmap_clusters(struct bitmap *bm, runlist *rl, u8 bit)
1232 set_bitmap_range(bm, rl->lcn, rl->length, bit);
1235 static void release_bitmap_clusters(struct bitmap *bm, runlist *rl)
1238 set_bitmap_clusters(bm, rl, 0);
1249 static int find_free_cluster(struct bitmap *bm,
1269 if (!ntfs_bit_get(bm->bm, i)) {
1302 set_bitmap_range(bm, rle->lcn, rle->length, 1);
1306 static runlist *alloc_cluster(struct bitmap *bm,
1326 if (find_free_cluster(bm, &rle, nr_vol_clusters, hint) == -1)
1851 static void bitmap_file_data_fixup(s64 cluster, struct bitmap *bm)
1853 for (; cluster < bm->size << 3; cluster++)
1854 ntfs_bit_set(bm->bm, (u64)cluster, 1);
1905 struct bitmap *bm = &resize->lcn_bitmap;
1910 release_bitmap_clusters(bm, *rl);
1914 ntfs_bit_set(bm->bm, i, 0);
1916 if (!(*rl = alloc_cluster(bm, nr_bm_clusters, new_size, 0)))
1924 if (!(tmp = realloc(resize->lcn_bitmap.bm, bm_bsize)))
1927 resize->lcn_bitmap.bm = tmp;
1971 size = ntfs_rl_pwrite(vol, rl, 0, bm_bsize, resize->lcn_bitmap.bm);
2122 static int setup_lcn_bitmap(struct bitmap *bm, s64 nr_clusters)
2125 bm->size = rounded_up_division(nr_clusters, 8);
2127 bm->bm = ntfs_calloc(bm->size);
2128 if (!bm->bm)
2131 bitmap_file_data_fixup(nr_clusters, bm);