Lines Matching refs:vol

123 				ni->vol->cluster_size_bits;  in ntfs_map_runlist_nolock()
187 rl = ntfs_mapping_pairs_decompress(ni->vol, a, ni->runlist.rl); in ntfs_map_runlist_nolock()
402 ntfs_error(ni->vol->sb, "Failed with error code %lli.", in ntfs_attr_vcn_to_lcn_nolock()
528 ntfs_error(ni->vol->sb, "Failed with error code %i.", err); in ntfs_attr_find_vcn_nolock()
594 ntfs_volume *vol = ctx->ntfs_ino->vol; in ntfs_attr_find() local
595 ntfschar *upcase = vol->upcase; in ntfs_attr_find()
596 u32 upcase_len = vol->upcase_len; in ntfs_attr_find()
689 ntfs_error(vol->sb, "Inode is corrupt. Run chkdsk."); in ntfs_attr_find()
690 NVolSetErrors(vol); in ntfs_attr_find()
710 int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start, in load_attribute_list() argument
725 if (!vol || !runlist || !al || size <= 0 || initialized_size < 0 || in load_attribute_list()
732 sb = vol->sb; in load_attribute_list()
754 block = lcn << vol->cluster_size_bits >> block_size_bits; in load_attribute_list()
756 max_block = block + (rl->length << vol->cluster_size_bits >> in load_attribute_list()
863 ntfs_volume *vol; in ntfs_external_attr_find() local
884 vol = base_ni->vol; in ntfs_external_attr_find()
929 name_len, ic, vol->upcase, vol->upcase_len)) { in ntfs_external_attr_find()
934 vol->upcase, vol->upcase_len); in ntfs_external_attr_find()
954 vol->upcase, vol->upcase_len); in ntfs_external_attr_find()
979 vol->upcase, vol->upcase_len)) in ntfs_external_attr_find()
983 ntfs_error(vol->sb, "Found stale mft " in ntfs_external_attr_find()
1005 ntfs_error(vol->sb, "Failed to map " in ntfs_external_attr_find()
1064 vol->upcase, vol->upcase_len)) in ntfs_external_attr_find()
1085 ntfs_error(vol->sb, "Base inode 0x%lx contains corrupt " in ntfs_external_attr_find()
1098 NVolSetErrors(vol); in ntfs_external_attr_find()
1306 static ATTR_DEF *ntfs_attr_find_in_attrdef(const ntfs_volume *vol, in ntfs_attr_find_in_attrdef() argument
1311 BUG_ON(!vol->attrdef); in ntfs_attr_find_in_attrdef()
1313 for (ad = vol->attrdef; (u8*)ad - (u8*)vol->attrdef < in ntfs_attr_find_in_attrdef()
1314 vol->attrdef_size && ad->type; ++ad) { in ntfs_attr_find_in_attrdef()
1342 int ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPE type, in ntfs_attr_size_bounds_check() argument
1355 ad = ntfs_attr_find_in_attrdef(vol, type); in ntfs_attr_size_bounds_check()
1378 int ntfs_attr_can_be_non_resident(const ntfs_volume *vol, const ATTR_TYPE type) in ntfs_attr_can_be_non_resident() argument
1383 ad = ntfs_attr_find_in_attrdef(vol, type); in ntfs_attr_can_be_non_resident()
1410 int ntfs_attr_can_be_resident(const ntfs_volume *vol, const ATTR_TYPE type) in ntfs_attr_can_be_resident() argument
1539 ntfs_volume *vol = ni->vol; in ntfs_attr_make_non_resident() local
1553 err = ntfs_attr_can_be_non_resident(vol, ni->type); in ntfs_attr_make_non_resident()
1573 new_size = (data_size + vol->cluster_size - 1) & in ntfs_attr_make_non_resident()
1574 ~(vol->cluster_size - 1); in ntfs_attr_make_non_resident()
1585 rl = ntfs_cluster_alloc(vol, 0, new_size >> in ntfs_attr_make_non_resident()
1586 vol->cluster_size_bits, -1, DATA_ZONE, true); in ntfs_attr_make_non_resident()
1591 vol->cluster_size_bits) > 1 ? "s" : "", in ntfs_attr_make_non_resident()
1600 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl, 0, -1); in ntfs_attr_make_non_resident()
1687 vol->cluster_size_bits); in ntfs_attr_make_non_resident()
1697 if (NInoCompressed(ni) || vol->major_ver < 3) in ntfs_attr_make_non_resident()
1704 err = ntfs_mapping_pairs_build(vol, (u8*)a + mp_ofs, in ntfs_attr_make_non_resident()
1720 vol->cluster_size_bits); in ntfs_attr_make_non_resident()
1782 ntfs_error(vol->sb, "Failed to undo partial resident " in ntfs_attr_make_non_resident()
1828 if (ntfs_cluster_free_from_rl(vol, rl) < 0) { in ntfs_attr_make_non_resident()
1829 ntfs_error(vol->sb, "Failed to release allocated " in ntfs_attr_make_non_resident()
1833 NVolSetErrors(vol); in ntfs_attr_make_non_resident()
1910 ntfs_volume *vol = ni->vol; in ntfs_attr_extend_allocation() local
1942 start &= ~(s64)vol->cluster_size_mask; in ntfs_attr_extend_allocation()
1943 new_alloc_size = (new_alloc_size + vol->cluster_size - 1) & in ntfs_attr_extend_allocation()
1944 ~(s64)vol->cluster_size_mask; in ntfs_attr_extend_allocation()
1948 err = ntfs_attr_size_bounds_check(vol, ni->type, new_alloc_size); in ntfs_attr_extend_allocation()
1956 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
1965 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
2011 vcn = NInoNonResident(ni) ? allocated_size >> vol->cluster_size_bits : in ntfs_attr_extend_allocation()
2050 if (new_alloc_size < vol->mft_record_size && in ntfs_attr_extend_allocation()
2095 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2111 ntfs_error(vol->sb, "Not enough space in the mft " in ntfs_attr_extend_allocation()
2116 ntfs_error(vol->sb, "This attribute type may not be " in ntfs_attr_extend_allocation()
2165 !NVolSparseEnabled(vol) || NInoSparseDisabled(ni)) in ntfs_attr_extend_allocation()
2184 rl = ntfs_mapping_pairs_decompress(vol, a, ni->runlist.rl); in ntfs_attr_extend_allocation()
2188 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
2219 rl2 = ntfs_cluster_alloc(vol, allocated_size >> vol->cluster_size_bits, in ntfs_attr_extend_allocation()
2221 vol->cluster_size_bits, (rl && (rl->lcn >= 0)) ? in ntfs_attr_extend_allocation()
2226 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2239 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2246 if (ntfs_cluster_free_from_rl(vol, rl2)) { in ntfs_attr_extend_allocation()
2247 ntfs_error(vol->sb, "Failed to release allocated " in ntfs_attr_extend_allocation()
2251 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2258 allocated_size) >> vol->cluster_size_bits); in ntfs_attr_extend_allocation()
2267 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll, -1); in ntfs_attr_extend_allocation()
2271 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2293 ntfs_error(vol->sb, "Not enough space in the mft " in ntfs_attr_extend_allocation()
2302 err = ntfs_mapping_pairs_build(vol, (u8*)a + in ntfs_attr_extend_allocation()
2307 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2317 vol->cluster_size_bits) - 1); in ntfs_attr_extend_allocation()
2377 ntfs_error(vol->sb, "Cannot complete extension of allocation " in ntfs_attr_extend_allocation()
2386 allocated_size >> vol->cluster_size_bits, NULL, 0, in ntfs_attr_extend_allocation()
2388 ntfs_error(vol->sb, "Failed to find last attribute extent of " in ntfs_attr_extend_allocation()
2412 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2416 (allocated_size >> vol->cluster_size_bits) - 1); in ntfs_attr_extend_allocation()
2418 ll = allocated_size >> vol->cluster_size_bits; in ntfs_attr_extend_allocation()
2420 ntfs_error(vol->sb, "Failed to release allocated cluster(s) " in ntfs_attr_extend_allocation()
2423 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2433 if (ntfs_rl_truncate_nolock(vol, &ni->runlist, ll) || IS_ERR(m)) { in ntfs_attr_extend_allocation()
2434 ntfs_error(vol->sb, "Failed to %s in error code path. Run " in ntfs_attr_extend_allocation()
2438 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2441 ntfs_error(vol->sb, "Failed to restore attribute " in ntfs_attr_extend_allocation()
2444 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2446 if (ntfs_mapping_pairs_build(vol, (u8*)a + le16_to_cpu( in ntfs_attr_extend_allocation()
2452 ntfs_error(vol->sb, "Failed to restore " in ntfs_attr_extend_allocation()
2456 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2495 ntfs_volume *vol = ni->vol; in ntfs_attr_set() local
2523 ntfs_error(vol->sb, "Request exceeds end of attribute."); in ntfs_attr_set()
2531 ntfs_error(vol->sb, "Failed to read first partial " in ntfs_attr_set()
2559 ntfs_error(vol->sb, "Insufficient memory to grab " in ntfs_attr_set()
2596 ntfs_error(vol->sb, "Failed to read last partial page " in ntfs_attr_set()