/haiku/src/add-ons/kernel/file_systems/ntfs/libntfs/ |
H A D | debug.c | 59 LCN lcn = (rl + i)->lcn; local 61 if (lcn < (LCN)0) { 62 int idx = -lcn - 1; 72 (long long)rl[i].vcn, (long long)rl[i].lcn,
|
H A D | lcnalloc.c | 95 static void update_full_status(ntfs_volume *vol, LCN lcn) argument 97 if (lcn >= vol->mft_zone_end) { 99 ntfs_cluster_update_zone_pos(vol, ZONE_DATA1, lcn); 103 if (lcn < vol->mft_zone_start) { 105 ntfs_cluster_update_zone_pos(vol, ZONE_DATA2, lcn); 110 ntfs_cluster_update_zone_pos(vol, ZONE_MFT, lcn); 200 * @start_lcn: starting lcn at which to allocate the clusters (or -1 if none) 224 * approach and from the fact that we have access to the lcn bitmap via up to 239 LCN last_read_pos, lcn; local 258 ntfs_log_perror("%s: vcn: %lld, count: %lld, lcn 620 ntfs_cluster_free_basic(ntfs_volume *vol, s64 lcn, s64 count) argument [all...] |
H A D | runlist.c | 171 if ((dst->lcn == LCN_RL_NOT_MAPPED) && (src->lcn == LCN_RL_NOT_MAPPED)) 177 if ((dst->lcn >= 0) && (src->lcn >= 0) && 178 ((dst->lcn + dst->length) == src->lcn)) 181 if ((dst->lcn == LCN_HOLE) && (src->lcn == LCN_HOLE)) 262 if (dst[marker].lcn == LCN_ENOENT) 348 if (dst[marker].lcn 787 LCN lcn; /* Current lcn. */ local 1807 LCN lcn = rl->lcn; local [all...] |
H A D | lcnalloc.h | 45 extern int ntfs_cluster_free_basic(ntfs_volume *vol, s64 lcn, s64 count);
|
H A D | compress.c | 664 if (rl->lcn < LCN_HOLE || !rl->length) { 667 if (!rl || rl->lcn < LCN_HOLE || !rl->length) 677 if (rl->lcn == LCN_HOLE) 813 if (!rl || rl->lcn < LCN_HOLE) { 822 if (rl->lcn == LCN_HOLE) { 998 xpos = xrl->lcn << vol->cluster_size_bits; 1039 xpos = xrl->lcn << vol->cluster_size_bits; 1182 if (xrl->lcn == LCN_HOLE) { 1187 if (fullcheck && (xrl[1].lcn == LCN_HOLE)) { 1248 freelcn = rl->lcn [all...] |
H A D | ioctl.c | 89 static int fstrim_clusters(ntfs_volume *vol, LCN lcn, s64 length) argument 95 (long long) lcn, (long long) length); 97 range[0] = lcn << vol->cluster_size_bits; 229 static inline LCN align_up(ntfs_volume *vol, LCN lcn, u64 granularity) argument 233 aligned = (lcn << vol->cluster_size_bits) + granularity - 1;
|
H A D | runlist.h | 36 * struct _runlist_element - in memory vcn to lcn mapping array element. 38 * @lcn: starting lcn of the current array element 43 * When lcn == -1 this means that the count vcns starting at vcn are not 46 struct _runlist_element {/* In memory vcn to lcn mapping structure element. */ 48 LCN lcn; /* lcn = Starting logical cluster number. */ member in struct:_runlist_element
|
H A D | device.c | 428 * @lcn: starting logical cluster number 432 * Read @count ntfs clusters starting at logical cluster number @lcn from 436 s64 ntfs_cluster_read(const ntfs_volume *vol, const s64 lcn, const s64 count, argument 441 if (!vol || lcn < 0 || count < 0) { 445 if (vol->nr_clusters < lcn + count) { 449 (long long)lcn + count); 452 br = ntfs_pread(vol->dev, lcn << vol->cluster_size_bits, 464 * @lcn: starting logical cluster number 468 * Write @count ntfs clusters starting at logical cluster number @lcn from 472 s64 ntfs_cluster_write(const ntfs_volume *vol, const s64 lcn, argument [all...] |
H A D | attrib.c | 250 * FIXME: If compressed file: Only read if lcn != -1. 261 rl[i].lcn << vol->cluster_size_bits, 288 * FIXME: If compressed file: Only read if lcn != -1. 297 r = ntfs_pread(vol->dev, rl[i].lcn << vol->cluster_size_bits, 613 LCN lcn; local 619 lcn = ntfs_rl_vcn_to_lcn(na->rl, vcn); 620 if (lcn >= 0 || lcn == LCN_HOLE || lcn == LCN_ENOENT) 858 * ntfs_attr_vcn_to_lcn - convert a vcn into a lcn give 880 LCN lcn; local [all...] |
H A D | device.h | 133 extern s64 ntfs_cluster_read(const ntfs_volume *vol, const s64 lcn, 135 extern s64 ntfs_cluster_write(const ntfs_volume *vol, const s64 lcn,
|
H A D | mft.c | 717 LCN lcn; local 732 * Determine the last lcn of the mft bitmap. The allocated size of the 737 if (!rl || !rl->length || rl->lcn < 0) { 744 lcn = rl->lcn + rl->length; 746 rl2 = ntfs_cluster_alloc(vol, rl[1].vcn, 1, lcn, DATA_ZONE); 878 lcn = rl->lcn; 879 rl->lcn = rl[1].lcn; 1038 LCN lcn; local [all...] |
H A D | volume.c | 371 if (nrl->lcn != vol->mft_lcn) { 468 if (vol->mftmirr_na->rl->lcn != vol->mftmirr_lcn) { 469 ntfs_log_error("Bad $MFTMirr lcn 0x%llx, want 0x%llx\n", 470 (long long)vol->mftmirr_na->rl->lcn,
|
H A D | inode.c | 622 if (!rl || (rl->lcn < 0)) {
|
/haiku/src/add-ons/kernel/file_systems/ntfs/utils/ |
H A D | mkntfs.c | 160 LCN lcn; /* first allocated cluster */ member in struct:BITMAP_ALLOCATION 195 static long long g_mft_lcn = 0; /* lcn of $MFT, $DATA attribute */ 196 static long long g_mftmirr_lcn = 0; /* lcn of $MFTMirr, $DATA */ 197 static long long g_logfile_lcn = 0; /* lcn of $LogFile, $DATA */ 280 static BOOL bitmap_allocate(LCN lcn, s64 length) argument 291 /* locate the first run which starts beyond the requested lcn */ 292 while (p && (p->lcn <= lcn)) { 297 if ((q && ((q->lcn + q->length) > lcn)) 330 bitmap_deallocate(LCN lcn, s64 length) argument 384 bitmap_get_and_set(LCN lcn, unsigned long length) argument 415 bitmap_build(u8 *buf, LCN lcn, s64 length) argument 773 LCN lcn, end, prev_lcn = 0LL; local [all...] |
H A D | utils.c | 718 * @lcn: The Logical Cluster Number to test 725 * If the lcn, being tested, lies outside the range, the buffer will be 735 int utils_cluster_in_use(ntfs_volume *vol, long long lcn) argument 747 /* Does lcn lie in the section of $Bitmap we already have cached? */ 748 if ((lcn < bmplcn) 749 || (lcn >= (long long)(bmplcn + (sizeof(buffer) << 3)))) { 759 bmplcn = lcn & (~((sizeof(buffer) << 3) - 1)); 772 bit = 1 << (lcn & 7); 773 byte = (lcn >> 3) & (sizeof(buffer) - 1); 775 "in use %d\n", lcn, bmplc [all...] |
H A D | utils.h | 49 int utils_cluster_in_use(ntfs_volume *vol, long long lcn);
|