Lines Matching refs:lcn
95 static void update_full_status(ntfs_volume *vol, LCN lcn) in update_full_status() argument
97 if (lcn >= vol->mft_zone_end) { in update_full_status()
99 ntfs_cluster_update_zone_pos(vol, ZONE_DATA1, lcn); in update_full_status()
103 if (lcn < vol->mft_zone_start) { in update_full_status()
105 ntfs_cluster_update_zone_pos(vol, ZONE_DATA2, lcn); in update_full_status()
110 ntfs_cluster_update_zone_pos(vol, ZONE_MFT, lcn); in update_full_status()
239 LCN last_read_pos, lcn; in ntfs_cluster_alloc() local
269 rl[0].lcn = LCN_RL_NOT_MAPPED; in ntfs_cluster_alloc()
334 lcn = bmp_pos & 7; in ntfs_cluster_alloc()
338 while (lcn < buf_size) { in ntfs_cluster_alloc()
339 byte = buf + (lcn >> 3); in ntfs_cluster_alloc()
340 bit = 1 << (lcn & 7); in ntfs_cluster_alloc()
347 lcn = max_empty_bit_range(buf, br); in ntfs_cluster_alloc()
348 if (lcn < 0) in ntfs_cluster_alloc()
384 if (prev_lcn == lcn + bmp_pos - prev_run_len && rlpos) { in ntfs_cluster_alloc()
389 (long long)lcn, (long long)bmp_pos, in ntfs_cluster_alloc()
402 rl[rlpos].lcn = prev_lcn = lcn + bmp_pos; in ntfs_cluster_alloc()
409 (long long)rl[rlpos - 1].lcn, in ntfs_cluster_alloc()
415 search_zone, lcn + bmp_pos + 1 + in ntfs_cluster_alloc()
420 lcn++; in ntfs_cluster_alloc()
478 LCN tc = rl[rlpos - 1].lcn + in ntfs_cluster_alloc()
535 rl[rlpos].lcn = LCN_RL_NOT_MAPPED; in ntfs_cluster_alloc()
561 rl[rlpos].lcn = LCN_RL_NOT_MAPPED; in ntfs_cluster_alloc()
588 (long long)rl->lcn, (long long)rl->length); in ntfs_cluster_free_from_rl()
590 if (rl->lcn >= 0) { in ntfs_cluster_free_from_rl()
591 update_full_status(vol,rl->lcn); in ntfs_cluster_free_from_rl()
592 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn, in ntfs_cluster_free_from_rl()
596 (long long)rl->lcn, in ntfs_cluster_free_from_rl()
620 int ntfs_cluster_free_basic(ntfs_volume *vol, s64 lcn, s64 count) in ntfs_cluster_free_basic() argument
627 (long long)lcn, (long long)count); in ntfs_cluster_free_basic()
629 if (lcn >= 0) { in ntfs_cluster_free_basic()
630 update_full_status(vol,lcn); in ntfs_cluster_free_basic()
631 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, lcn, in ntfs_cluster_free_basic()
635 (long long)lcn, in ntfs_cluster_free_basic()
691 if (rl->lcn < 0 && rl->lcn != LCN_HOLE) { in ntfs_cluster_free()
694 (long long)rl->lcn); in ntfs_cluster_free()
706 if (rl->lcn != LCN_HOLE) { in ntfs_cluster_free()
708 update_full_status(vol,rl->lcn + delta); in ntfs_cluster_free()
709 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn + delta, in ntfs_cluster_free()
727 if (rl->lcn < 0 && rl->lcn != LCN_HOLE) { in ntfs_cluster_free()
731 __FUNCTION__, (long long)rl->lcn); in ntfs_cluster_free()
740 if (rl->lcn != LCN_HOLE) { in ntfs_cluster_free()
741 update_full_status(vol,rl->lcn); in ntfs_cluster_free()
742 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn, in ntfs_cluster_free()