Lines Matching refs:length
165 if ((dst->vcn + dst->length) != src->vcn) in ntfs_are_rl_mergeable()
169 ((dst->lcn + dst->length) == src->lcn)) in ntfs_are_rl_mergeable()
191 dst->length += src->length; in __ntfs_rl_merge()
252 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_append()
256 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_append()
306 merged_length = dst[loc - 1].length; in ntfs_rl_insert()
308 merged_length += src->length; in ntfs_rl_insert()
339 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_insert()
342 dst[marker].length = dst[marker + 1].vcn - dst[marker].vcn; in ntfs_rl_insert()
347 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length; in ntfs_rl_insert()
348 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_insert()
351 dst[loc].length = dst[loc + 1].vcn; in ntfs_rl_insert()
442 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_replace()
490 dst[loc].length = dst[loc+1].vcn - dst[loc].vcn; in ntfs_rl_split()
491 dst[loc+ssize+1].vcn = dst[loc+ssize].vcn + dst[loc+ssize].length; in ntfs_rl_split()
492 dst[loc+ssize+1].length = dst[loc+ssize+2].vcn - dst[loc+ssize+1].vcn; in ntfs_rl_split()
562 for (dend = 0; likely(drl[dend].length); dend++) in ntfs_runlists_merge()
572 drl[0].length = drl[1].vcn; in ntfs_runlists_merge()
580 while (srl[si].length && srl[si].lcn < LCN_HOLE) in ntfs_runlists_merge()
584 BUG_ON(!srl[si].length); in ntfs_runlists_merge()
594 for (; drl[di].length; di++) { in ntfs_runlists_merge()
595 if (drl[di].vcn + drl[di].length > srl[sstart].vcn) in ntfs_runlists_merge()
608 for (send = si; srl[send].length; send++) in ntfs_runlists_merge()
610 for (dend = di; drl[dend].length; dend++) in ntfs_runlists_merge()
631 ((drl[dins].vcn + drl[dins].length) <= /* End of hole */ in ntfs_runlists_merge()
632 (srl[send - 1].vcn + srl[send - 1].length))); in ntfs_runlists_merge()
635 if (finish && !drl[dins].length) in ntfs_runlists_merge()
637 if (marker && (drl[dins].vcn + drl[dins].length > srl[send - 1].vcn)) in ntfs_runlists_merge()
663 for (ds = dend; drl[ds].length; ds++) in ntfs_runlists_merge()
697 drl[ds - 1].length; in ntfs_runlists_merge()
702 drl[ds].length = marker_vcn - drl[ds].vcn; in ntfs_runlists_merge()
709 drl[ds].length = (s64)0; in ntfs_runlists_merge()
777 attr_end = (u8*)attr + le32_to_cpu(attr->length); in ntfs_mapping_pairs_decompress()
795 rl->length = vcn; in ntfs_mapping_pairs_decompress()
850 rl[rlpos].length = deltaxcn; in ntfs_mapping_pairs_decompress()
939 vcn += rl[rlpos].length = max_cluster - in ntfs_mapping_pairs_decompress()
959 rl[rlpos].length = (s64)0; in ntfs_mapping_pairs_decompress()
1021 for (i = 0; likely(rl[i].length); i++) { in ntfs_rl_vcn_to_lcn()
1058 while (likely(rl->length)) { in ntfs_rl_find_vcn_nolock()
1148 while (rl->length && first_vcn >= rl[1].vcn) in ntfs_get_size_for_mapping_pairs()
1150 if (unlikely((!rl->length && first_vcn > rl->vcn) || in ntfs_get_size_for_mapping_pairs()
1158 s64 delta, length = rl->length; in ntfs_get_size_for_mapping_pairs() local
1161 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_get_size_for_mapping_pairs()
1170 length = s1 - rl->vcn; in ntfs_get_size_for_mapping_pairs()
1175 rls += 1 + ntfs_get_nr_significant_bytes(length - delta); in ntfs_get_size_for_mapping_pairs()
1194 for (; rl->length && !the_end; rl++) { in ntfs_get_size_for_mapping_pairs()
1195 s64 length = rl->length; in ntfs_get_size_for_mapping_pairs() local
1197 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_get_size_for_mapping_pairs()
1206 length = s1 - rl->vcn; in ntfs_get_size_for_mapping_pairs()
1210 rls += 1 + ntfs_get_nr_significant_bytes(length); in ntfs_get_size_for_mapping_pairs()
1347 while (rl->length && first_vcn >= rl[1].vcn) in ntfs_mapping_pairs_build()
1349 if (unlikely((!rl->length && first_vcn > rl->vcn) || in ntfs_mapping_pairs_build()
1360 s64 delta, length = rl->length; in ntfs_mapping_pairs_build() local
1363 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_mapping_pairs_build()
1372 length = s1 - rl->vcn; in ntfs_mapping_pairs_build()
1378 length - delta); in ntfs_mapping_pairs_build()
1412 for (; rl->length && !the_end; rl++) { in ntfs_mapping_pairs_build()
1413 s64 length = rl->length; in ntfs_mapping_pairs_build() local
1415 if (unlikely(length < 0 || rl->lcn < LCN_HOLE)) in ntfs_mapping_pairs_build()
1424 length = s1 - rl->vcn; in ntfs_mapping_pairs_build()
1429 length); in ntfs_mapping_pairs_build()
1528 rl[1].length = rl->vcn = 0; in ntfs_rl_truncate_nolock()
1530 rl[1].vcn = rl->length = new_length; in ntfs_rl_truncate_nolock()
1536 while (likely(rl->length && new_length >= rl[1].vcn)) in ntfs_rl_truncate_nolock()
1542 if (rl->length) { in ntfs_rl_truncate_nolock()
1549 while (likely(trl->length)) in ntfs_rl_truncate_nolock()
1553 rl->length = new_length - rl->vcn; in ntfs_rl_truncate_nolock()
1559 if (rl->length) { in ntfs_rl_truncate_nolock()
1561 if (!rl->length) in ntfs_rl_truncate_nolock()
1564 rl->length = 0; in ntfs_rl_truncate_nolock()
1588 (rl - 1)->length = new_length - (rl - 1)->vcn; in ntfs_rl_truncate_nolock()
1608 rl->length = new_length - rl->vcn; in ntfs_rl_truncate_nolock()
1611 rl->length = 0; in ntfs_rl_truncate_nolock()
1645 const VCN start, const s64 length) in ntfs_rl_punch_nolock() argument
1647 const VCN end = start + length; in ntfs_rl_punch_nolock()
1654 (long long)start, (long long)length); in ntfs_rl_punch_nolock()
1657 BUG_ON(length < 0); in ntfs_rl_punch_nolock()
1661 if (likely(!start && !length)) in ntfs_rl_punch_nolock()
1666 while (likely(rl->length && start >= rl[1].vcn)) in ntfs_rl_punch_nolock()
1670 while (likely(rl_end->length && end >= rl_end[1].vcn)) { in ntfs_rl_punch_nolock()
1677 if (unlikely(rl_end->length && rl_end->lcn < LCN_HOLE)) in ntfs_rl_punch_nolock()
1680 if (!rl_end->length && end > rl_end->vcn) in ntfs_rl_punch_nolock()
1682 if (!length) in ntfs_rl_punch_nolock()
1684 if (!rl->length) in ntfs_rl_punch_nolock()
1688 while (likely(rl_real_end->length)) in ntfs_rl_punch_nolock()
1703 rl->length = end - rl->vcn; in ntfs_rl_punch_nolock()
1707 rl->length = rl_end->vcn - rl->vcn; in ntfs_rl_punch_nolock()
1719 rl->length -= delta; in ntfs_rl_punch_nolock()
1787 rl->length = length; in ntfs_rl_punch_nolock()
1789 rl->vcn += length; in ntfs_rl_punch_nolock()
1792 rl->lcn += length; in ntfs_rl_punch_nolock()
1793 rl->length -= length; in ntfs_rl_punch_nolock()
1807 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1815 rl->length = rl[1].vcn - start; in ntfs_rl_punch_nolock()
1834 if (rl[1].length && end >= rl[2].vcn) { in ntfs_rl_punch_nolock()
1836 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1853 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1867 rl->length += delta; in ntfs_rl_punch_nolock()
1890 rl->length = start - rl->vcn; in ntfs_rl_punch_nolock()
1894 rl->length = length; in ntfs_rl_punch_nolock()
1899 rl->length -= delta; in ntfs_rl_punch_nolock()