Lines Matching refs:length
151 if ((dst->vcn + dst->length) != src->vcn) in ntfs_are_rl_mergeable()
155 ((dst->lcn + dst->length) == src->lcn)) in ntfs_are_rl_mergeable()
177 dst->length += src->length; in __ntfs_rl_merge()
238 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_append()
242 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_append()
292 merged_length = dst[loc - 1].length; in ntfs_rl_insert()
294 merged_length += src->length; in ntfs_rl_insert()
325 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_insert()
328 dst[marker].length = dst[marker + 1].vcn - dst[marker].vcn; in ntfs_rl_insert()
333 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length; in ntfs_rl_insert()
334 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_insert()
337 dst[loc].length = dst[loc + 1].vcn; in ntfs_rl_insert()
428 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_replace()
476 dst[loc].length = dst[loc+1].vcn - dst[loc].vcn; in ntfs_rl_split()
477 dst[loc+ssize+1].vcn = dst[loc+ssize].vcn + dst[loc+ssize].length; in ntfs_rl_split()
478 dst[loc+ssize+1].length = dst[loc+ssize+2].vcn - dst[loc+ssize+1].vcn; in ntfs_rl_split()
548 for (dend = 0; likely(drl[dend].length); dend++) in ntfs_runlists_merge()
558 drl[0].length = drl[1].vcn; in ntfs_runlists_merge()
566 while (srl[si].length && srl[si].lcn < LCN_HOLE) in ntfs_runlists_merge()
570 BUG_ON(!srl[si].length); in ntfs_runlists_merge()
580 for (; drl[di].length; di++) { in ntfs_runlists_merge()
581 if (drl[di].vcn + drl[di].length > srl[sstart].vcn) in ntfs_runlists_merge()
594 for (send = si; srl[send].length; send++) in ntfs_runlists_merge()
596 for (dend = di; drl[dend].length; dend++) in ntfs_runlists_merge()
617 ((drl[dins].vcn + drl[dins].length) <= /* End of hole */ in ntfs_runlists_merge()
618 (srl[send - 1].vcn + srl[send - 1].length))); in ntfs_runlists_merge()
621 if (finish && !drl[dins].length) in ntfs_runlists_merge()
623 if (marker && (drl[dins].vcn + drl[dins].length > srl[send - 1].vcn)) in ntfs_runlists_merge()
649 for (ds = dend; drl[ds].length; ds++) in ntfs_runlists_merge()
683 drl[ds - 1].length; in ntfs_runlists_merge()
688 drl[ds].length = marker_vcn - drl[ds].vcn; in ntfs_runlists_merge()
695 drl[ds].length = (s64)0; in ntfs_runlists_merge()
763 attr_end = (u8*)attr + le32_to_cpu(attr->length); in ntfs_mapping_pairs_decompress()
781 rl->length = vcn; in ntfs_mapping_pairs_decompress()
836 rl[rlpos].length = deltaxcn; in ntfs_mapping_pairs_decompress()
925 vcn += rl[rlpos].length = max_cluster - in ntfs_mapping_pairs_decompress()
945 rl[rlpos].length = (s64)0; in ntfs_mapping_pairs_decompress()
1007 for (i = 0; likely(rl[i].length); i++) { in ntfs_rl_vcn_to_lcn()
1044 while (likely(rl->length)) { in ntfs_rl_find_vcn_nolock()
1134 while (rl->length && first_vcn >= rl[1].vcn) in ntfs_get_size_for_mapping_pairs()
1136 if (unlikely((!rl->length && first_vcn > rl->vcn) || in ntfs_get_size_for_mapping_pairs()
1144 s64 delta, length = rl->length; in ntfs_get_size_for_mapping_pairs() local
1147 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_get_size_for_mapping_pairs()
1156 length = s1 - rl->vcn; in ntfs_get_size_for_mapping_pairs()
1161 rls += 1 + ntfs_get_nr_significant_bytes(length - delta); in ntfs_get_size_for_mapping_pairs()
1180 for (; rl->length && !the_end; rl++) { in ntfs_get_size_for_mapping_pairs()
1181 s64 length = rl->length; in ntfs_get_size_for_mapping_pairs() local
1183 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_get_size_for_mapping_pairs()
1192 length = s1 - rl->vcn; in ntfs_get_size_for_mapping_pairs()
1196 rls += 1 + ntfs_get_nr_significant_bytes(length); in ntfs_get_size_for_mapping_pairs()
1333 while (rl->length && first_vcn >= rl[1].vcn) in ntfs_mapping_pairs_build()
1335 if (unlikely((!rl->length && first_vcn > rl->vcn) || in ntfs_mapping_pairs_build()
1346 s64 delta, length = rl->length; in ntfs_mapping_pairs_build() local
1349 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_mapping_pairs_build()
1358 length = s1 - rl->vcn; in ntfs_mapping_pairs_build()
1364 length - delta); in ntfs_mapping_pairs_build()
1398 for (; rl->length && !the_end; rl++) { in ntfs_mapping_pairs_build()
1399 s64 length = rl->length; in ntfs_mapping_pairs_build() local
1401 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_mapping_pairs_build()
1410 length = s1 - rl->vcn; in ntfs_mapping_pairs_build()
1415 length); in ntfs_mapping_pairs_build()
1514 rl[1].length = rl->vcn = 0; in ntfs_rl_truncate_nolock()
1516 rl[1].vcn = rl->length = new_length; in ntfs_rl_truncate_nolock()
1522 while (likely(rl->length && new_length >= rl[1].vcn)) in ntfs_rl_truncate_nolock()
1528 if (rl->length) { in ntfs_rl_truncate_nolock()
1535 while (likely(trl->length)) in ntfs_rl_truncate_nolock()
1539 rl->length = new_length - rl->vcn; in ntfs_rl_truncate_nolock()
1545 if (rl->length) { in ntfs_rl_truncate_nolock()
1547 if (!rl->length) in ntfs_rl_truncate_nolock()
1550 rl->length = 0; in ntfs_rl_truncate_nolock()
1574 (rl - 1)->length = new_length - (rl - 1)->vcn; in ntfs_rl_truncate_nolock()
1594 rl->length = new_length - rl->vcn; in ntfs_rl_truncate_nolock()
1597 rl->length = 0; in ntfs_rl_truncate_nolock()
1631 const VCN start, const s64 length) in ntfs_rl_punch_nolock() argument
1633 const VCN end = start + length; in ntfs_rl_punch_nolock()
1640 (long long)start, (long long)length); in ntfs_rl_punch_nolock()
1643 BUG_ON(length < 0); in ntfs_rl_punch_nolock()
1647 if (likely(!start && !length)) in ntfs_rl_punch_nolock()
1652 while (likely(rl->length && start >= rl[1].vcn)) in ntfs_rl_punch_nolock()
1656 while (likely(rl_end->length && end >= rl_end[1].vcn)) { in ntfs_rl_punch_nolock()
1663 if (unlikely(rl_end->length && rl_end->lcn < LCN_HOLE)) in ntfs_rl_punch_nolock()
1666 if (!rl_end->length && end > rl_end->vcn) in ntfs_rl_punch_nolock()
1668 if (!length) in ntfs_rl_punch_nolock()
1670 if (!rl->length) in ntfs_rl_punch_nolock()
1674 while (likely(rl_real_end->length)) in ntfs_rl_punch_nolock()
1689 rl->length = end - rl->vcn; in ntfs_rl_punch_nolock()
1693 rl->length = rl_end->vcn - rl->vcn; in ntfs_rl_punch_nolock()
1705 rl->length -= delta; in ntfs_rl_punch_nolock()
1773 rl->length = length; in ntfs_rl_punch_nolock()
1775 rl->vcn += length; in ntfs_rl_punch_nolock()
1778 rl->lcn += length; in ntfs_rl_punch_nolock()
1779 rl->length -= length; in ntfs_rl_punch_nolock()
1793 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1801 rl->length = rl[1].vcn - start; in ntfs_rl_punch_nolock()
1820 if (rl[1].length && end >= rl[2].vcn) { in ntfs_rl_punch_nolock()
1822 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1839 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1853 rl->length += delta; in ntfs_rl_punch_nolock()
1876 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1880 rl->length = length; in ntfs_rl_punch_nolock()
1885 rl->length -= delta; in ntfs_rl_punch_nolock()