Lines Matching refs:rl
51 const runlist_element *rl) in ntfs_cluster_free_from_rl_nolock() argument
57 if (!rl) in ntfs_cluster_free_from_rl_nolock()
59 for (; rl->length; rl++) { in ntfs_cluster_free_from_rl_nolock()
62 if (rl->lcn < 0) in ntfs_cluster_free_from_rl_nolock()
64 err = ntfs_bitmap_clear_run(lcnbmp_vi, rl->lcn, rl->length); in ntfs_cluster_free_from_rl_nolock()
156 runlist_element *rl = NULL; in ntfs_cluster_alloc() local
334 if ((rlpos + 2) * sizeof(*rl) > rlsize) { in ntfs_cluster_alloc()
338 if (!rl) in ntfs_cluster_alloc()
350 memcpy(rl2, rl, rlsize); in ntfs_cluster_alloc()
351 ntfs_free(rl); in ntfs_cluster_alloc()
352 rl = rl2; in ntfs_cluster_alloc()
381 rl[rlpos - 1].lcn, in ntfs_cluster_alloc()
383 rl[rlpos - 1].length); in ntfs_cluster_alloc()
384 rl[rlpos - 1].length = ++prev_run_len; in ntfs_cluster_alloc()
388 rl[rlpos - 1].lcn, in ntfs_cluster_alloc()
390 rl[rlpos - 1].length, in ntfs_cluster_alloc()
399 rl[rlpos - 1].lcn, in ntfs_cluster_alloc()
401 rl[rlpos - 1].length); in ntfs_cluster_alloc()
402 rl[rlpos].vcn = rl[rlpos - 1].vcn + in ntfs_cluster_alloc()
407 rl[rlpos].vcn = start_vcn; in ntfs_cluster_alloc()
409 rl[rlpos].lcn = prev_lcn = lcn + bmp_pos; in ntfs_cluster_alloc()
410 rl[rlpos].length = prev_run_len = 1; in ntfs_cluster_alloc()
565 tc = rl[rlpos - 1].lcn + in ntfs_cluster_alloc()
566 rl[rlpos - 1].length; in ntfs_cluster_alloc()
608 tc = rl[rlpos - 1].lcn + in ntfs_cluster_alloc()
609 rl[rlpos - 1].length; in ntfs_cluster_alloc()
649 tc = rl[rlpos - 1].lcn + in ntfs_cluster_alloc()
650 rl[rlpos - 1].length; in ntfs_cluster_alloc()
739 if (likely(rl)) { in ntfs_cluster_alloc()
740 rl[rlpos].vcn = rl[rlpos - 1].vcn + rl[rlpos - 1].length; in ntfs_cluster_alloc()
741 rl[rlpos].lcn = is_extension ? LCN_ENOENT : LCN_RL_NOT_MAPPED; in ntfs_cluster_alloc()
742 rl[rlpos].length = 0; in ntfs_cluster_alloc()
756 return rl; in ntfs_cluster_alloc()
760 if (rl) { in ntfs_cluster_alloc()
768 (unsigned long long)rl[0].lcn, in ntfs_cluster_alloc()
772 err2 = ntfs_cluster_free_from_rl_nolock(vol, rl); in ntfs_cluster_alloc()
780 ntfs_free(rl); in ntfs_cluster_alloc()
855 runlist_element *rl; in __ntfs_cluster_free() local
880 rl = ntfs_attr_find_vcn_nolock(ni, start_vcn, ctx); in __ntfs_cluster_free()
881 if (IS_ERR(rl)) { in __ntfs_cluster_free()
885 PTR_ERR(rl)); in __ntfs_cluster_free()
886 err = PTR_ERR(rl); in __ntfs_cluster_free()
889 if (unlikely(rl->lcn < LCN_HOLE)) { in __ntfs_cluster_free()
897 delta = start_vcn - rl->vcn; in __ntfs_cluster_free()
900 to_free = rl->length - delta; in __ntfs_cluster_free()
904 if (likely(rl->lcn >= 0)) { in __ntfs_cluster_free()
906 err = ntfs_bitmap_set_bits_in_run(lcnbmp_vi, rl->lcn + delta, in __ntfs_cluster_free()
918 ++rl; in __ntfs_cluster_free()
928 for (; rl->length && count != 0; ++rl) { in __ntfs_cluster_free()
929 if (unlikely(rl->lcn < LCN_HOLE)) { in __ntfs_cluster_free()
933 vcn = rl->vcn; in __ntfs_cluster_free()
934 rl = ntfs_attr_find_vcn_nolock(ni, vcn, ctx); in __ntfs_cluster_free()
935 if (IS_ERR(rl)) { in __ntfs_cluster_free()
936 err = PTR_ERR(rl); in __ntfs_cluster_free()
945 if (unlikely(rl->lcn < LCN_HOLE)) { in __ntfs_cluster_free()
951 rl->lcn); in __ntfs_cluster_free()
957 to_free = rl->length; in __ntfs_cluster_free()
961 if (likely(rl->lcn >= 0)) { in __ntfs_cluster_free()
963 err = ntfs_bitmap_set_bits_in_run(lcnbmp_vi, rl->lcn, in __ntfs_cluster_free()