Lines Matching refs:lcn

95 static void update_full_status(ntfs_volume *vol, LCN lcn)
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;
258 ntfs_log_perror("%s: vcn: %lld, count: %lld, lcn: %lld",
269 rl[0].lcn = LCN_RL_NOT_MAPPED;
334 lcn = bmp_pos & 7;
338 while (lcn < buf_size) {
339 byte = buf + (lcn >> 3);
340 bit = 1 << (lcn & 7);
347 lcn = max_empty_bit_range(buf, br);
348 if (lcn < 0)
354 /* First free bit is at lcn + bmp_pos. */
384 if (prev_lcn == lcn + bmp_pos - prev_run_len && rlpos) {
386 "%lld lcn: %lld bmp_pos: %lld "
389 (long long)lcn, (long long)bmp_pos,
402 rl[rlpos].lcn = prev_lcn = lcn + bmp_pos;
409 (long long)rl[rlpos - 1].lcn,
415 search_zone, lcn + bmp_pos + 1 +
420 lcn++;
478 LCN tc = rl[rlpos - 1].lcn +
535 rl[rlpos].lcn = LCN_RL_NOT_MAPPED;
561 rl[rlpos].lcn = LCN_RL_NOT_MAPPED;
587 ntfs_log_trace("Dealloc lcn 0x%llx, len 0x%llx.\n",
588 (long long)rl->lcn, (long long)rl->length);
590 if (rl->lcn >= 0) {
591 update_full_status(vol,rl->lcn);
592 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn,
596 (long long)rl->lcn,
620 int ntfs_cluster_free_basic(ntfs_volume *vol, s64 lcn, s64 count)
626 ntfs_log_trace("Dealloc lcn 0x%llx, len 0x%llx.\n",
627 (long long)lcn, (long long)count);
629 if (lcn >= 0) {
630 update_full_status(vol,lcn);
631 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, lcn,
635 (long long)lcn,
691 if (rl->lcn < 0 && rl->lcn != LCN_HOLE) {
693 ntfs_log_perror("%s: Unexpected lcn (%lld)", __FUNCTION__,
694 (long long)rl->lcn);
706 if (rl->lcn != LCN_HOLE) {
708 update_full_status(vol,rl->lcn + delta);
709 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn + delta,
727 if (rl->lcn < 0 && rl->lcn != LCN_HOLE) {
730 ntfs_log_perror("%s: Invalid lcn (%lli)",
731 __FUNCTION__, (long long)rl->lcn);
740 if (rl->lcn != LCN_HOLE) {
741 update_full_status(vol,rl->lcn);
742 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn,