Lines Matching refs:vol
109 ni->vol->cluster_size_bits; in ntfs_map_runlist_nolock()
173 rl = ntfs_mapping_pairs_decompress(ni->vol, a, ni->runlist.rl); in ntfs_map_runlist_nolock()
388 ntfs_error(ni->vol->sb, "Failed with error code %lli.", in ntfs_attr_vcn_to_lcn_nolock()
514 ntfs_error(ni->vol->sb, "Failed with error code %i.", err); in ntfs_attr_find_vcn_nolock()
580 ntfs_volume *vol = ctx->ntfs_ino->vol; in ntfs_attr_find() local
581 ntfschar *upcase = vol->upcase; in ntfs_attr_find()
582 u32 upcase_len = vol->upcase_len; in ntfs_attr_find()
675 ntfs_error(vol->sb, "Inode is corrupt. Run chkdsk."); in ntfs_attr_find()
676 NVolSetErrors(vol); in ntfs_attr_find()
696 int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start, in load_attribute_list() argument
711 if (!vol || !runlist || !al || size <= 0 || initialized_size < 0 || in load_attribute_list()
718 sb = vol->sb; in load_attribute_list()
740 block = lcn << vol->cluster_size_bits >> block_size_bits; in load_attribute_list()
742 max_block = block + (rl->length << vol->cluster_size_bits >> in load_attribute_list()
849 ntfs_volume *vol; in ntfs_external_attr_find() local
870 vol = base_ni->vol; in ntfs_external_attr_find()
915 name_len, ic, vol->upcase, vol->upcase_len)) { in ntfs_external_attr_find()
920 vol->upcase, vol->upcase_len); in ntfs_external_attr_find()
940 vol->upcase, vol->upcase_len); in ntfs_external_attr_find()
965 vol->upcase, vol->upcase_len)) in ntfs_external_attr_find()
969 ntfs_error(vol->sb, "Found stale mft " in ntfs_external_attr_find()
991 ntfs_error(vol->sb, "Failed to map " in ntfs_external_attr_find()
1050 vol->upcase, vol->upcase_len)) in ntfs_external_attr_find()
1071 ntfs_error(vol->sb, "Base inode 0x%lx contains corrupt " in ntfs_external_attr_find()
1084 NVolSetErrors(vol); in ntfs_external_attr_find()
1292 static ATTR_DEF *ntfs_attr_find_in_attrdef(const ntfs_volume *vol, in ntfs_attr_find_in_attrdef() argument
1297 BUG_ON(!vol->attrdef); in ntfs_attr_find_in_attrdef()
1299 for (ad = vol->attrdef; (u8*)ad - (u8*)vol->attrdef < in ntfs_attr_find_in_attrdef()
1300 vol->attrdef_size && ad->type; ++ad) { in ntfs_attr_find_in_attrdef()
1328 int ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPE type, in ntfs_attr_size_bounds_check() argument
1341 ad = ntfs_attr_find_in_attrdef(vol, type); in ntfs_attr_size_bounds_check()
1364 int ntfs_attr_can_be_non_resident(const ntfs_volume *vol, const ATTR_TYPE type) in ntfs_attr_can_be_non_resident() argument
1369 ad = ntfs_attr_find_in_attrdef(vol, type); in ntfs_attr_can_be_non_resident()
1396 int ntfs_attr_can_be_resident(const ntfs_volume *vol, const ATTR_TYPE type) in ntfs_attr_can_be_resident() argument
1525 ntfs_volume *vol = ni->vol; in ntfs_attr_make_non_resident() local
1539 err = ntfs_attr_can_be_non_resident(vol, ni->type); in ntfs_attr_make_non_resident()
1559 new_size = (data_size + vol->cluster_size - 1) & in ntfs_attr_make_non_resident()
1560 ~(vol->cluster_size - 1); in ntfs_attr_make_non_resident()
1571 rl = ntfs_cluster_alloc(vol, 0, new_size >> in ntfs_attr_make_non_resident()
1572 vol->cluster_size_bits, -1, DATA_ZONE, true); in ntfs_attr_make_non_resident()
1577 vol->cluster_size_bits) > 1 ? "s" : "", in ntfs_attr_make_non_resident()
1586 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl, 0, -1); in ntfs_attr_make_non_resident()
1673 vol->cluster_size_bits); in ntfs_attr_make_non_resident()
1683 if (NInoCompressed(ni) || vol->major_ver < 3) in ntfs_attr_make_non_resident()
1690 err = ntfs_mapping_pairs_build(vol, (u8*)a + mp_ofs, in ntfs_attr_make_non_resident()
1706 vol->cluster_size_bits); in ntfs_attr_make_non_resident()
1768 ntfs_error(vol->sb, "Failed to undo partial resident " in ntfs_attr_make_non_resident()
1814 if (ntfs_cluster_free_from_rl(vol, rl) < 0) { in ntfs_attr_make_non_resident()
1815 ntfs_error(vol->sb, "Failed to release allocated " in ntfs_attr_make_non_resident()
1819 NVolSetErrors(vol); in ntfs_attr_make_non_resident()
1896 ntfs_volume *vol = ni->vol; in ntfs_attr_extend_allocation() local
1928 start &= ~(s64)vol->cluster_size_mask; in ntfs_attr_extend_allocation()
1929 new_alloc_size = (new_alloc_size + vol->cluster_size - 1) & in ntfs_attr_extend_allocation()
1930 ~(s64)vol->cluster_size_mask; in ntfs_attr_extend_allocation()
1934 err = ntfs_attr_size_bounds_check(vol, ni->type, new_alloc_size); in ntfs_attr_extend_allocation()
1942 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
1951 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
1997 vcn = NInoNonResident(ni) ? allocated_size >> vol->cluster_size_bits : in ntfs_attr_extend_allocation()
2036 if (new_alloc_size < vol->mft_record_size && in ntfs_attr_extend_allocation()
2081 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2097 ntfs_error(vol->sb, "Not enough space in the mft " in ntfs_attr_extend_allocation()
2102 ntfs_error(vol->sb, "This attribute type may not be " in ntfs_attr_extend_allocation()
2151 !NVolSparseEnabled(vol) || NInoSparseDisabled(ni)) in ntfs_attr_extend_allocation()
2170 rl = ntfs_mapping_pairs_decompress(vol, a, ni->runlist.rl); in ntfs_attr_extend_allocation()
2174 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
2205 rl2 = ntfs_cluster_alloc(vol, allocated_size >> vol->cluster_size_bits, in ntfs_attr_extend_allocation()
2207 vol->cluster_size_bits, (rl && (rl->lcn >= 0)) ? in ntfs_attr_extend_allocation()
2212 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2225 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2232 if (ntfs_cluster_free_from_rl(vol, rl2)) { in ntfs_attr_extend_allocation()
2233 ntfs_error(vol->sb, "Failed to release allocated " in ntfs_attr_extend_allocation()
2237 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2244 allocated_size) >> vol->cluster_size_bits); in ntfs_attr_extend_allocation()
2253 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll, -1); in ntfs_attr_extend_allocation()
2257 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2279 ntfs_error(vol->sb, "Not enough space in the mft " in ntfs_attr_extend_allocation()
2288 err = ntfs_mapping_pairs_build(vol, (u8*)a + in ntfs_attr_extend_allocation()
2293 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2303 vol->cluster_size_bits) - 1); in ntfs_attr_extend_allocation()
2363 ntfs_error(vol->sb, "Cannot complete extension of allocation " in ntfs_attr_extend_allocation()
2372 allocated_size >> vol->cluster_size_bits, NULL, 0, in ntfs_attr_extend_allocation()
2374 ntfs_error(vol->sb, "Failed to find last attribute extent of " in ntfs_attr_extend_allocation()
2398 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2402 (allocated_size >> vol->cluster_size_bits) - 1); in ntfs_attr_extend_allocation()
2404 ll = allocated_size >> vol->cluster_size_bits; in ntfs_attr_extend_allocation()
2406 ntfs_error(vol->sb, "Failed to release allocated cluster(s) " in ntfs_attr_extend_allocation()
2409 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2419 if (ntfs_rl_truncate_nolock(vol, &ni->runlist, ll) || IS_ERR(m)) { in ntfs_attr_extend_allocation()
2420 ntfs_error(vol->sb, "Failed to %s in error code path. Run " in ntfs_attr_extend_allocation()
2424 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2427 ntfs_error(vol->sb, "Failed to restore attribute " in ntfs_attr_extend_allocation()
2430 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2432 if (ntfs_mapping_pairs_build(vol, (u8*)a + le16_to_cpu( in ntfs_attr_extend_allocation()
2438 ntfs_error(vol->sb, "Failed to restore " in ntfs_attr_extend_allocation()
2442 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2481 ntfs_volume *vol = ni->vol; in ntfs_attr_set() local
2509 ntfs_error(vol->sb, "Request exceeds end of attribute."); in ntfs_attr_set()
2517 ntfs_error(vol->sb, "Failed to read first partial " in ntfs_attr_set()
2545 ntfs_error(vol->sb, "Insufficient memory to grab " in ntfs_attr_set()
2582 ntfs_error(vol->sb, "Failed to read last partial page " in ntfs_attr_set()