/fs/ntfs/ |
D | runlist.c | 165 if ((dst->vcn + dst->length) != src->vcn) in ntfs_are_rl_mergeable() 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() 300 disc = (src[0].vcn > 0); in ntfs_rl_insert() 310 disc = (src[0].vcn > dst[loc - 1].vcn + merged_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() 350 dst[loc].vcn = 0; in ntfs_rl_insert() [all …]
|
D | index.c | 122 VCN vcn, old_vcn; in ntfs_index_lookup() local 262 vcn = sle64_to_cpup((sle64*)((u8*)ie + le16_to_cpu(ie->length) - 8)); in ntfs_index_lookup() 278 page = ntfs_map_page(ia_mapping, vcn << in ntfs_index_lookup() 290 ia = (INDEX_ALLOCATION*)(kaddr + ((vcn << in ntfs_index_lookup() 302 (long long)vcn, idx_ni->mft_no); in ntfs_index_lookup() 305 if (sle64_to_cpu(ia->index_block_vcn) != vcn) { in ntfs_index_lookup() 311 (unsigned long long)vcn, idx_ni->mft_no); in ntfs_index_lookup() 319 "driver bug.", (unsigned long long)vcn, in ntfs_index_lookup() 330 "driver.", (unsigned long long)vcn, in ntfs_index_lookup() 338 (unsigned long long)vcn, idx_ni->mft_no); in ntfs_index_lookup() [all …]
|
D | dir.c | 93 VCN vcn, old_vcn; in ntfs_lookup_inode_by_name() local 305 vcn = sle64_to_cpup((sle64*)((u8*)ie + le16_to_cpu(ie->length) - 8)); in ntfs_lookup_inode_by_name() 321 page = ntfs_map_page(ia_mapping, vcn << in ntfs_lookup_inode_by_name() 333 ia = (INDEX_ALLOCATION*)(kaddr + ((vcn << in ntfs_lookup_inode_by_name() 345 (unsigned long long)vcn, dir_ni->mft_no); in ntfs_lookup_inode_by_name() 348 if (sle64_to_cpu(ia->index_block_vcn) != vcn) { in ntfs_lookup_inode_by_name() 354 (unsigned long long)vcn, dir_ni->mft_no); in ntfs_lookup_inode_by_name() 363 (unsigned long long)vcn, dir_ni->mft_no, in ntfs_lookup_inode_by_name() 373 "driver.", (unsigned long long)vcn, in ntfs_lookup_inode_by_name() 381 (unsigned long long)vcn, dir_ni->mft_no); in ntfs_lookup_inode_by_name() [all …]
|
D | logfile.c | 728 VCN vcn, end_vcn; in ntfs_empty_logfile() local 752 vcn = 0; in ntfs_empty_logfile() 760 if (unlikely(!rl || vcn < rl->vcn || !rl->length)) { in ntfs_empty_logfile() 762 err = ntfs_map_runlist_nolock(log_ni, vcn, NULL); in ntfs_empty_logfile() 769 BUG_ON(!rl || vcn < rl->vcn || !rl->length); in ntfs_empty_logfile() 772 while (rl->length && vcn >= rl[1].vcn) in ntfs_empty_logfile() 785 vcn = rl->vcn; in ntfs_empty_logfile() 796 if (rl[1].vcn > end_vcn) in ntfs_empty_logfile() 797 len = end_vcn - rl->vcn; in ntfs_empty_logfile() 833 } while ((++rl)->vcn < end_vcn); in ntfs_empty_logfile()
|
D | aops.c | 188 VCN vcn; in ntfs_read_block() local 263 vcn = (VCN)iblock << blocksize_bits >> in ntfs_read_block() 274 while (rl->length && rl[1].vcn <= vcn) in ntfs_read_block() 276 lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_read_block() 304 err = ntfs_map_runlist(ni, vcn); in ntfs_read_block() 329 ni->type, (unsigned long long)vcn, in ntfs_read_block() 553 VCN vcn; in ntfs_write_block() local 720 vcn = (VCN)block << blocksize_bits; in ntfs_write_block() 721 vcn_ofs = vcn & vol->cluster_size_mask; in ntfs_write_block() 722 vcn >>= vol->cluster_size_bits; in ntfs_write_block() [all …]
|
D | attrib.c | 84 int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx) in ntfs_map_runlist_nolock() argument 98 (unsigned long long)vcn); in ntfs_map_runlist_nolock() 134 if (vcn >= allocated_size_vcn || (a->type == ni->type && in ntfs_map_runlist_nolock() 139 <= vcn && end_vcn >= vcn)) in ntfs_map_runlist_nolock() 167 CASE_SENSITIVE, vcn, NULL, 0, ctx); in ntfs_map_runlist_nolock() 183 if (unlikely(vcn && vcn >= end_vcn)) { in ntfs_map_runlist_nolock() 298 int ntfs_map_runlist(ntfs_inode *ni, VCN vcn) in ntfs_map_runlist() argument 304 if (likely(ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn) <= in ntfs_map_runlist() 306 err = ntfs_map_runlist_nolock(ni, vcn, NULL); in ntfs_map_runlist() 341 LCN ntfs_attr_vcn_to_lcn_nolock(ntfs_inode *ni, const VCN vcn, in ntfs_attr_vcn_to_lcn_nolock() argument [all …]
|
D | attrib.h | 63 extern int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, 65 extern int ntfs_map_runlist(ntfs_inode *ni, VCN vcn); 67 extern LCN ntfs_attr_vcn_to_lcn_nolock(ntfs_inode *ni, const VCN vcn, 71 const VCN vcn, ntfs_attr_search_ctx *ctx);
|
D | compress.c | 498 VCN vcn; in ntfs_read_compressed_block() local 612 for (vcn = start_vcn, start_vcn += cb_clusters; vcn < start_vcn; in ntfs_read_compressed_block() 613 vcn++) { in ntfs_read_compressed_block() 623 while (rl->length && rl[1].vcn <= vcn) in ntfs_read_compressed_block() 625 lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_read_compressed_block() 629 (unsigned long long)vcn, in ntfs_read_compressed_block() 646 if (!ntfs_map_runlist(ni, vcn)) in ntfs_read_compressed_block() 746 if (vcn == start_vcn - cb_clusters) { in ntfs_read_compressed_block() 794 } else if (vcn == start_vcn) { in ntfs_read_compressed_block()
|
D | runlist.h | 43 VCN vcn; /* vcn = Starting virtual cluster number. */ member 79 extern LCN ntfs_rl_vcn_to_lcn(const runlist_element *rl, const VCN vcn); 84 const VCN vcn);
|
D | lcnalloc.c | 402 rl[rlpos].vcn = rl[rlpos - 1].vcn + in ntfs_cluster_alloc() 407 rl[rlpos].vcn = start_vcn; in ntfs_cluster_alloc() 740 rl[rlpos].vcn = rl[rlpos - 1].vcn + rl[rlpos - 1].length; in ntfs_cluster_alloc() 897 delta = start_vcn - rl->vcn; in __ntfs_cluster_free() 930 VCN vcn; in __ntfs_cluster_free() local 933 vcn = rl->vcn; in __ntfs_cluster_free() 934 rl = ntfs_attr_find_vcn_nolock(ni, vcn, ctx); in __ntfs_cluster_free()
|
D | mft.c | 534 VCN vcn; in ntfs_sync_mft_mirror() local 540 vcn = ((VCN)mft_no << vol->mft_record_size_bits) + in ntfs_sync_mft_mirror() 542 vcn_ofs = vcn & vol->cluster_size_mask; in ntfs_sync_mft_mirror() 543 vcn >>= vol->cluster_size_bits; in ntfs_sync_mft_mirror() 555 while (rl->length && rl[1].vcn <= vcn) in ntfs_sync_mft_mirror() 557 lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_sync_mft_mirror() 723 VCN vcn; in write_mft_record_nolock() local 729 vcn = ((VCN)ni->mft_no << vol->mft_record_size_bits) + in write_mft_record_nolock() 731 vcn_ofs = vcn & vol->cluster_size_mask; in write_mft_record_nolock() 732 vcn >>= vol->cluster_size_bits; in write_mft_record_nolock() [all …]
|
D | file.c | 484 VCN vcn, highest_vcn = 0, cpos, cend, bh_cpos, bh_cend; in ntfs_prepare_pages_for_non_resident_write() local 539 vcn = lcn = -1; in ntfs_prepare_pages_for_non_resident_write() 617 cdelta = bh_cpos - vcn; in ntfs_prepare_pages_for_non_resident_write() 748 while (rl->length && rl[1].vcn <= bh_cpos) in ntfs_prepare_pages_for_non_resident_write() 757 vcn = bh_cpos; in ntfs_prepare_pages_for_non_resident_write() 758 vcn_len = rl[1].vcn - vcn; in ntfs_prepare_pages_for_non_resident_write() 769 if (likely(vcn + vcn_len >= cend)) { in ntfs_prepare_pages_for_non_resident_write() 954 vcn = sle64_to_cpu(a->data.non_resident.lowest_vcn); in ntfs_prepare_pages_for_non_resident_write() 955 rl2 = ntfs_rl_find_vcn_nolock(rl, vcn); in ntfs_prepare_pages_for_non_resident_write() 972 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, vcn, in ntfs_prepare_pages_for_non_resident_write() [all …]
|
D | debug.c | 167 (long long)(rl + i)->vcn, lcn_str[index], in ntfs_debug_dump_runlist() 173 (long long)(rl + i)->vcn, in ntfs_debug_dump_runlist()
|
D | super.c | 1179 rl2[0].vcn = 0; in check_mft_mirror() 1183 rl2[1].vcn = rl2[0].length; in check_mft_mirror() 1196 if (rl2[i].vcn != rl[i].vcn || rl2[i].lcn != rl[i].lcn || in check_mft_mirror()
|