Lines Matching refs:rl

37 		const runlist_element *rl)  in ntfs_cluster_free_from_rl_nolock()  argument
43 if (!rl) in ntfs_cluster_free_from_rl_nolock()
45 for (; rl->length; rl++) { in ntfs_cluster_free_from_rl_nolock()
48 if (rl->lcn < 0) in ntfs_cluster_free_from_rl_nolock()
50 err = ntfs_bitmap_clear_run(lcnbmp_vi, rl->lcn, rl->length); in ntfs_cluster_free_from_rl_nolock()
142 runlist_element *rl = NULL; in ntfs_cluster_alloc() local
320 if ((rlpos + 2) * sizeof(*rl) > rlsize) { in ntfs_cluster_alloc()
324 if (!rl) in ntfs_cluster_alloc()
336 memcpy(rl2, rl, rlsize); in ntfs_cluster_alloc()
337 ntfs_free(rl); in ntfs_cluster_alloc()
338 rl = rl2; in ntfs_cluster_alloc()
367 rl[rlpos - 1].lcn, in ntfs_cluster_alloc()
369 rl[rlpos - 1].length); in ntfs_cluster_alloc()
370 rl[rlpos - 1].length = ++prev_run_len; in ntfs_cluster_alloc()
374 rl[rlpos - 1].lcn, in ntfs_cluster_alloc()
376 rl[rlpos - 1].length, in ntfs_cluster_alloc()
385 rl[rlpos - 1].lcn, in ntfs_cluster_alloc()
387 rl[rlpos - 1].length); in ntfs_cluster_alloc()
388 rl[rlpos].vcn = rl[rlpos - 1].vcn + in ntfs_cluster_alloc()
393 rl[rlpos].vcn = start_vcn; in ntfs_cluster_alloc()
395 rl[rlpos].lcn = prev_lcn = lcn + bmp_pos; in ntfs_cluster_alloc()
396 rl[rlpos].length = prev_run_len = 1; in ntfs_cluster_alloc()
551 tc = rl[rlpos - 1].lcn + in ntfs_cluster_alloc()
552 rl[rlpos - 1].length; in ntfs_cluster_alloc()
594 tc = rl[rlpos - 1].lcn + in ntfs_cluster_alloc()
595 rl[rlpos - 1].length; in ntfs_cluster_alloc()
635 tc = rl[rlpos - 1].lcn + in ntfs_cluster_alloc()
636 rl[rlpos - 1].length; in ntfs_cluster_alloc()
725 if (likely(rl)) { in ntfs_cluster_alloc()
726 rl[rlpos].vcn = rl[rlpos - 1].vcn + rl[rlpos - 1].length; in ntfs_cluster_alloc()
727 rl[rlpos].lcn = is_extension ? LCN_ENOENT : LCN_RL_NOT_MAPPED; in ntfs_cluster_alloc()
728 rl[rlpos].length = 0; in ntfs_cluster_alloc()
742 return rl; in ntfs_cluster_alloc()
746 if (rl) { in ntfs_cluster_alloc()
754 (unsigned long long)rl[0].lcn, in ntfs_cluster_alloc()
758 err2 = ntfs_cluster_free_from_rl_nolock(vol, rl); in ntfs_cluster_alloc()
766 ntfs_free(rl); in ntfs_cluster_alloc()
841 runlist_element *rl; in __ntfs_cluster_free() local
866 rl = ntfs_attr_find_vcn_nolock(ni, start_vcn, ctx); in __ntfs_cluster_free()
867 if (IS_ERR(rl)) { in __ntfs_cluster_free()
871 PTR_ERR(rl)); in __ntfs_cluster_free()
872 err = PTR_ERR(rl); in __ntfs_cluster_free()
875 if (unlikely(rl->lcn < LCN_HOLE)) { in __ntfs_cluster_free()
883 delta = start_vcn - rl->vcn; in __ntfs_cluster_free()
886 to_free = rl->length - delta; in __ntfs_cluster_free()
890 if (likely(rl->lcn >= 0)) { in __ntfs_cluster_free()
892 err = ntfs_bitmap_set_bits_in_run(lcnbmp_vi, rl->lcn + delta, in __ntfs_cluster_free()
904 ++rl; in __ntfs_cluster_free()
914 for (; rl->length && count != 0; ++rl) { in __ntfs_cluster_free()
915 if (unlikely(rl->lcn < LCN_HOLE)) { in __ntfs_cluster_free()
919 vcn = rl->vcn; in __ntfs_cluster_free()
920 rl = ntfs_attr_find_vcn_nolock(ni, vcn, ctx); in __ntfs_cluster_free()
921 if (IS_ERR(rl)) { in __ntfs_cluster_free()
922 err = PTR_ERR(rl); in __ntfs_cluster_free()
931 if (unlikely(rl->lcn < LCN_HOLE)) { in __ntfs_cluster_free()
937 rl->lcn); in __ntfs_cluster_free()
943 to_free = rl->length; in __ntfs_cluster_free()
947 if (likely(rl->lcn >= 0)) { in __ntfs_cluster_free()
949 err = ntfs_bitmap_set_bits_in_run(lcnbmp_vi, rl->lcn, in __ntfs_cluster_free()