Lines Matching defs:bitmap
72 #include "bitmap.h"
159 struct bitmap {
202 struct bitmap lcn_bitmap;
223 struct bitmap lcn_bitmap;
833 struct bitmap *lcn_bitmap = &fsck->lcn_bitmap;
933 static void compare_bitmaps(ntfs_volume *vol, struct bitmap *a)
1054 * Read each record in the MFT, skipping the unused ones, and build up a bitmap
1082 MFT record not in use based on $MFT bitmap */
1309 * the new global bitmap and the new MFT bitmap are saved to
1381 * MFT bitmap.
1382 * The MFT data and MFT bitmap may themselves have delayed parts
1411 /* reopen the MFT bitmap, and swap vol->mftbmp_na */
1437 * Re-record the MFT extents in MFT bitmap
1439 * When both MFT data and MFT bitmap have delayed runlists, MFT data
1479 * Now, there are runlists in the MFT bitmap and MFT data.
1480 * Extents to MFT bitmap have to be stored in the new MFT
1482 * the MFT bitmap.
1484 * extents again in the MFT bitmap if they were recorded
1491 * In this situation the MFT bitmap is never written to
1696 static void set_bitmap_range(struct bitmap *bm, s64 pos, s64 length, u8 bit)
1702 static void set_bitmap_clusters(struct bitmap *bm, runlist *rl, u8 bit)
1708 static void release_bitmap_clusters(struct bitmap *bm, runlist *rl)
1722 static int find_free_cluster(struct bitmap *bm,
1779 static runlist *alloc_cluster(struct bitmap *bm,
2052 /* We don't release old clusters in the bitmap, that area isn't
2208 MFT record not in use based on $MFT bitmap */
2380 static void bitmap_file_data_fixup(s64 cluster, struct bitmap *bm)
2473 struct bitmap *bm = &resize->lcn_bitmap;
2560 /* switch to the new bitmap runlist */
2731 static int setup_lcn_bitmap(struct bitmap *bm, s64 nr_clusters)
2733 /* Determine lcn bitmap byte size and allocate it. */
3052 perr_exit("Failed to setup allocation bitmap");
3106 u8 *bitmap;
3242 * Get the MFT bitmap
3258 /* get the runlist of unnamed bitmap */
3279 err_printf("Could not read the MFT bitmap\n");
3285 err_printf("Could not get the MFT bitmap\n");
3288 err_printf("Invalid MFT bitmap\n");
3499 * The bitmap is one bit per full cluster,
3501 * When evaluating the minimal size, the bitmap
3597 if (expand->bitmap[lcn >> 3] & 1 << (lcn & 7))
3599 expand->bitmap[lcn >> 3] |= 1 << (lcn & 7);
3603 if (expand->bitmap[lcn >> 3])
3605 expand->bitmap[lcn >> 3] = 255;
3609 if (expand->bitmap[lcn >> 3] & 1 << (lcn & 7))
3611 expand->bitmap[lcn >> 3] |= 1 << (lcn & 7);
3663 * Write the new main bitmap
3677 expand->bitmap[cluster >> 3] |= 1 << (cluster & 7);
3681 ntfs_log_verbose("Writing the new bitmap...\n");
3687 expand->bitmap_allocated, expand->bitmap);
3694 err_printf("Failed to write the bitmap (size=0)\n");
3696 err_printf("Error rewriting the bitmap");
4410 expand->bitmap = (u8*)ntfs_calloc(expand->bitmap_allocated);
4411 if (expand->bitmap
4471 free(expand->bitmap);