Lines Matching refs:vol

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