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()
699 ntfs_error(vol->sb, "Inode is corrupt. Run chkdsk."); in ntfs_attr_find()
700 NVolSetErrors(vol); in ntfs_attr_find()
720 int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start, in load_attribute_list() argument
735 if (!vol || !runlist || !al || size <= 0 || initialized_size < 0 || in load_attribute_list()
742 sb = vol->sb; in load_attribute_list()
764 block = lcn << vol->cluster_size_bits >> block_size_bits; in load_attribute_list()
766 max_block = block + (rl->length << vol->cluster_size_bits >> in load_attribute_list()
873 ntfs_volume *vol; in ntfs_external_attr_find() local
894 vol = base_ni->vol; in ntfs_external_attr_find()
939 name_len, ic, vol->upcase, vol->upcase_len)) { in ntfs_external_attr_find()
944 vol->upcase, vol->upcase_len); in ntfs_external_attr_find()
964 vol->upcase, vol->upcase_len); in ntfs_external_attr_find()
989 vol->upcase, vol->upcase_len)) in ntfs_external_attr_find()
993 ntfs_error(vol->sb, "Found stale mft " in ntfs_external_attr_find()
1015 ntfs_error(vol->sb, "Failed to map " in ntfs_external_attr_find()
1074 vol->upcase, vol->upcase_len)) in ntfs_external_attr_find()
1095 ntfs_error(vol->sb, "Base inode 0x%lx contains corrupt " in ntfs_external_attr_find()
1108 NVolSetErrors(vol); in ntfs_external_attr_find()
1316 static ATTR_DEF *ntfs_attr_find_in_attrdef(const ntfs_volume *vol, in ntfs_attr_find_in_attrdef() argument
1321 BUG_ON(!vol->attrdef); in ntfs_attr_find_in_attrdef()
1323 for (ad = vol->attrdef; (u8*)ad - (u8*)vol->attrdef < in ntfs_attr_find_in_attrdef()
1324 vol->attrdef_size && ad->type; ++ad) { in ntfs_attr_find_in_attrdef()
1352 int ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPE type, in ntfs_attr_size_bounds_check() argument
1365 ad = ntfs_attr_find_in_attrdef(vol, type); in ntfs_attr_size_bounds_check()
1388 int ntfs_attr_can_be_non_resident(const ntfs_volume *vol, const ATTR_TYPE type) in ntfs_attr_can_be_non_resident() argument
1393 ad = ntfs_attr_find_in_attrdef(vol, type); in ntfs_attr_can_be_non_resident()
1420 int ntfs_attr_can_be_resident(const ntfs_volume *vol, const ATTR_TYPE type) in ntfs_attr_can_be_resident() argument
1549 ntfs_volume *vol = ni->vol; in ntfs_attr_make_non_resident() local
1563 err = ntfs_attr_can_be_non_resident(vol, ni->type); in ntfs_attr_make_non_resident()
1583 new_size = (data_size + vol->cluster_size - 1) & in ntfs_attr_make_non_resident()
1584 ~(vol->cluster_size - 1); in ntfs_attr_make_non_resident()
1595 rl = ntfs_cluster_alloc(vol, 0, new_size >> in ntfs_attr_make_non_resident()
1596 vol->cluster_size_bits, -1, DATA_ZONE, true); in ntfs_attr_make_non_resident()
1601 vol->cluster_size_bits) > 1 ? "s" : "", in ntfs_attr_make_non_resident()
1610 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl, 0, -1); in ntfs_attr_make_non_resident()
1697 vol->cluster_size_bits); in ntfs_attr_make_non_resident()
1707 if (NInoCompressed(ni) || vol->major_ver < 3) in ntfs_attr_make_non_resident()
1714 err = ntfs_mapping_pairs_build(vol, (u8*)a + mp_ofs, in ntfs_attr_make_non_resident()
1730 vol->cluster_size_bits); in ntfs_attr_make_non_resident()
1792 ntfs_error(vol->sb, "Failed to undo partial resident " in ntfs_attr_make_non_resident()
1838 if (ntfs_cluster_free_from_rl(vol, rl) < 0) { in ntfs_attr_make_non_resident()
1839 ntfs_error(vol->sb, "Failed to release allocated " in ntfs_attr_make_non_resident()
1843 NVolSetErrors(vol); in ntfs_attr_make_non_resident()
1920 ntfs_volume *vol = ni->vol; in ntfs_attr_extend_allocation() local
1952 start &= ~(s64)vol->cluster_size_mask; in ntfs_attr_extend_allocation()
1953 new_alloc_size = (new_alloc_size + vol->cluster_size - 1) & in ntfs_attr_extend_allocation()
1954 ~(s64)vol->cluster_size_mask; in ntfs_attr_extend_allocation()
1958 err = ntfs_attr_size_bounds_check(vol, ni->type, new_alloc_size); in ntfs_attr_extend_allocation()
1966 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
1975 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
2021 vcn = NInoNonResident(ni) ? allocated_size >> vol->cluster_size_bits : in ntfs_attr_extend_allocation()
2060 if (new_alloc_size < vol->mft_record_size && in ntfs_attr_extend_allocation()
2105 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2121 ntfs_error(vol->sb, "Not enough space in the mft " in ntfs_attr_extend_allocation()
2126 ntfs_error(vol->sb, "This attribute type may not be " in ntfs_attr_extend_allocation()
2175 !NVolSparseEnabled(vol) || NInoSparseDisabled(ni)) in ntfs_attr_extend_allocation()
2194 rl = ntfs_mapping_pairs_decompress(vol, a, ni->runlist.rl); in ntfs_attr_extend_allocation()
2198 ntfs_error(vol->sb, "Cannot extend allocation " in ntfs_attr_extend_allocation()
2229 rl2 = ntfs_cluster_alloc(vol, allocated_size >> vol->cluster_size_bits, in ntfs_attr_extend_allocation()
2231 vol->cluster_size_bits, (rl && (rl->lcn >= 0)) ? in ntfs_attr_extend_allocation()
2236 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2249 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2256 if (ntfs_cluster_free_from_rl(vol, rl2)) { in ntfs_attr_extend_allocation()
2257 ntfs_error(vol->sb, "Failed to release allocated " in ntfs_attr_extend_allocation()
2261 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2268 allocated_size) >> vol->cluster_size_bits); in ntfs_attr_extend_allocation()
2277 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll, -1); in ntfs_attr_extend_allocation()
2281 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2303 ntfs_error(vol->sb, "Not enough space in the mft " in ntfs_attr_extend_allocation()
2312 err = ntfs_mapping_pairs_build(vol, (u8*)a + in ntfs_attr_extend_allocation()
2317 ntfs_error(vol->sb, "Cannot extend allocation of " in ntfs_attr_extend_allocation()
2327 vol->cluster_size_bits) - 1); in ntfs_attr_extend_allocation()
2387 ntfs_error(vol->sb, "Cannot complete extension of allocation " in ntfs_attr_extend_allocation()
2396 allocated_size >> vol->cluster_size_bits, NULL, 0, in ntfs_attr_extend_allocation()
2398 ntfs_error(vol->sb, "Failed to find last attribute extent of " in ntfs_attr_extend_allocation()
2422 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2426 (allocated_size >> vol->cluster_size_bits) - 1); in ntfs_attr_extend_allocation()
2428 ll = allocated_size >> vol->cluster_size_bits; in ntfs_attr_extend_allocation()
2430 ntfs_error(vol->sb, "Failed to release allocated cluster(s) " in ntfs_attr_extend_allocation()
2433 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2443 if (ntfs_rl_truncate_nolock(vol, &ni->runlist, ll) || IS_ERR(m)) { in ntfs_attr_extend_allocation()
2444 ntfs_error(vol->sb, "Failed to %s in error code path. Run " in ntfs_attr_extend_allocation()
2448 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2451 ntfs_error(vol->sb, "Failed to restore attribute " in ntfs_attr_extend_allocation()
2454 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2456 if (ntfs_mapping_pairs_build(vol, (u8*)a + le16_to_cpu( in ntfs_attr_extend_allocation()
2462 ntfs_error(vol->sb, "Failed to restore " in ntfs_attr_extend_allocation()
2466 NVolSetErrors(vol); in ntfs_attr_extend_allocation()
2505 ntfs_volume *vol = ni->vol; in ntfs_attr_set() local
2533 ntfs_error(vol->sb, "Request exceeds end of attribute."); in ntfs_attr_set()
2541 ntfs_error(vol->sb, "Failed to read first partial " in ntfs_attr_set()
2569 ntfs_error(vol->sb, "Insufficient memory to grab " in ntfs_attr_set()
2606 ntfs_error(vol->sb, "Failed to read last partial page " in ntfs_attr_set()