Lines Matching refs:lcn

176 	s64 lcn;	/* last used LCN for a "special" file/attr type */
663 static void rl_set(runlist *rl, VCN vcn, LCN lcn, s64 len)
666 rl->lcn = lcn;
683 (long long)r->lcn, (long long)r->lcn,
717 last_lcn = rl->lcn + (rl->length - 1);
763 if (llcn->lcn < last_lcn) {
764 llcn->lcn = last_lcn;
778 s64 lcn, lcn_length, start, len, inode;
781 lcn = rl->lcn;
786 if (lcn + lcn_length <= new_vol_size)
792 start = lcn;
795 if (lcn < new_vol_size) {
797 len = lcn_length - (new_vol_size - lcn);
802 print_advise(resize->vol, lcn + lcn_length - 1);
851 s64 lcn = rl[i].lcn;
855 if (lcn == LCN_HOLE || lcn == LCN_RL_NOT_MAPPED)
859 if (lcn < 0 || lcn_length <= 0)
863 (long long)lcn, (long long)lcn_length);
866 u64 k = (u64)lcn + j;
1119 if (rl[i].lcn == LCN_HOLE || rl[i].lcn == LCN_RL_NOT_MAPPED)
1179 if (tmp->lcn == LCN_RL_NOT_MAPPED) {
1192 if (tmp->lcn == LCN_RL_NOT_MAPPED) {
1198 tmp->lcn = LCN_ENOENT;
1248 pnew->lcn = pold->lcn;
1257 pnew->lcn = prep->lcn;
1272 pnew->lcn = pold->lcn + nextvcn - pold->vcn;
1705 set_bitmap_range(bm, rl->lcn, rl->length, bit);
1717 rle->lcn = end - length;
1736 rle->lcn = rle->length = 0;
1762 if (!rle->lcn) {
1771 pos = rle->lcn + items;
1775 set_bitmap_range(bm, rle->lcn, rle->length, 1);
1806 rl_set(rl + runs, vcn, rle.lcn, rle.length);
1882 static void lseek_to_cluster(ntfs_volume *vol, s64 lcn)
1886 pos = (off_t)(lcn * vol->cluster_size);
1889 perr_exit("seek failed to position %lld", (long long)lcn);
1933 r->mftmir_rl.lcn = dest_rl->lcn;
1941 copy_clusters(r, dest_rl->lcn, src_lcn, dest_rl->length);
1965 len_tail = rle->length - (pos - rle->lcn);
1968 rl_set(rle_new, rle->vcn, rle->lcn, len_head);
1969 rl_set(rle_new + 1, rle->vcn + len_head, rle->lcn + len_head, len_tail);
1998 rl_set(rle, vcn, ins->lcn, ins->length);
2005 // (*rl + run)->lcn = ins->lcn;
2010 s64 lcn, lcn_length;
2015 lcn = (*rl + run)->lcn;
2019 if (lcn + lcn_length <= new_vol_size)
2022 if (lcn < new_vol_size) {
2046 (unsigned long long)lcn,
2047 (unsigned long long)relocate_rl->lcn);
2049 relocate_clusters(resize, relocate_rl, lcn);
2080 s64 lcn = rl[i].lcn;
2083 if (lcn == LCN_HOLE || lcn == LCN_RL_NOT_MAPPED)
2087 if (lcn < 0 || lcn_length <= 0)
2092 (long long)lcn, (long long)lcn_length);
2229 pos = (resize->new_mft_start->lcn
2275 if ((resize->vol->mft_na->rl->lcn + resize->vol->mft_na->rl->length)
2340 if (llcn.lcn == 0)
2343 runs_b = llcn.lcn * vol->cluster_size;
2630 if (rl[i].lcn == LCN_HOLE || rl[i].lcn == LCN_RL_NOT_MAPPED)
2635 (long long)rl[i].lcn,
2636 (long long)rl[i].lcn + rl[i].length - 1,
2699 pos = (resize->new_mft_start->lcn << vol->cluster_size_bits)
2733 /* Determine lcn bitmap byte size and allocate it. */
2781 copy_clusters(r, r->mftmir_rl.lcn,
2782 vol->mft_na->rl->lcn, r->mftmir_rl.length);
2785 copy_clusters(r, r->mftmir_rl.lcn,
2786 r->new_mft_start->lcn, r->mftmir_rl.length);
2789 copy_clusters(r, r->mftmir_rl.lcn, r->mftmir_old,
2794 bs->mftmirr_lcn = cpu_to_sle64(r->mftmir_rl.lcn);
2799 bs->mft_lcn = cpu_to_sle64(r->new_mft_start->lcn);
3007 /* last lcn for a filled up volume (no empty space) */
3273 prl->lcn + expand->cluster_increment);
3326 if (rl[i].lcn == LCN_HOLE
3327 || rl[i].lcn == LCN_RL_NOT_MAPPED)
3333 (long long)rl[i].lcn,
3334 (long long)rl[i].lcn
3584 s64 lcn;
3590 if ((rl->lcn >= 0)
3592 && ((rl->lcn + rl->length)
3594 lcn = rl->lcn;
3595 lcn_end = lcn + rl->length;
3596 while ((lcn & 7) && (lcn < lcn_end)) {
3597 if (expand->bitmap[lcn >> 3] & 1 << (lcn & 7))
3599 expand->bitmap[lcn >> 3] |= 1 << (lcn & 7);
3600 lcn++;
3602 while ((lcn_end - lcn) >= 8) {
3603 if (expand->bitmap[lcn >> 3])
3605 expand->bitmap[lcn >> 3] = 255;
3606 lcn += 8;
3608 while (lcn < lcn_end) {
3609 if (expand->bitmap[lcn >> 3] & 1 << (lcn & 7))
3611 expand->bitmap[lcn >> 3] |= 1 << (lcn & 7);
3612 lcn++;
3616 " lcn 0x%llx length %lld\n",
3617 (long long)rl->lcn,(long long)rl->length);
3621 err_printf("Bad run : lcn 0x%llx length %lld\n",
3622 (long long)rl->lcn,(long long)rl->length);
4046 if (prl->lcn >= 0) {
4047 prl->lcn += expand->cluster_increment;
4085 s64 lcn;
4097 lcn = 0;
4102 lcn = expand->boot_size >> vol->cluster_size_bits;
4107 lcn = (expand->boot_size + expand->bitmap_allocated)
4113 lcn = 0; /* not used */
4118 lcn = lth = data_size = 0;
4133 if (prl->lcn >= 0) {
4134 prl->lcn += expand->cluster_increment;
4147 rl[0].lcn = lcn;
4150 rl[1].lcn = LCN_ENOENT;
4220 pos = (prl->lcn << vol->cluster_size_bits)