• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/ntfs-3g-2009.3.8/libntfs-3g/

Lines Matching refs:vol

118  * @vol:	
126 s64 ntfs_get_attribute_value(const ntfs_volume *vol,
134 if (!vol || !a || !b) {
176 rl = ntfs_mapping_pairs_decompress(vol, a, NULL);
194 if (total + (rl[i].length << vol->cluster_size_bits) >=
203 * rl[i].length << vol->cluster_size_bits, do the
211 intbuf = ntfs_malloc(rl[i].length << vol->cluster_size_bits);
227 r = ntfs_pread(vol->dev, rl[i].lcn <<
228 vol->cluster_size_bits, rl[i].length <<
229 vol->cluster_size_bits, intbuf);
230 if (r != rl[i].length << vol->cluster_size_bits) {
235 vol->cluster_size_bits) {
263 r = ntfs_pread(vol->dev, rl[i].lcn << vol->cluster_size_bits,
264 rl[i].length << vol->cluster_size_bits,
266 if (r != rl[i].length << vol->cluster_size_bits) {
270 else if (r < rl[i].length << vol->cluster_size_bits) {
346 ntfs_volume *vol = na->ni->vol;
351 vol->cluster_size_bits);
386 if (!ni || !ni->vol || !ni->mrec) {
533 rl = ntfs_mapping_pairs_decompress(na->ni->vol, ctx->attr,
562 ntfs_volume *vol = na->ni->vol;
591 rl = ntfs_mapping_pairs_decompress(na->ni->vol,
609 vol->cluster_size_bits;
786 ntfs_volume *vol;
801 vol = na->ni->vol;
828 (char*)ctx->mrec + vol->mft_record_size) {
849 rl = ntfs_attr_find_vcn(na, pos >> vol->cluster_size_bits);
867 ofs = pos - (rl->vcn << vol->cluster_size_bits);
880 ofs = pos + total - (rl->vcn << vol->cluster_size_bits);
896 vol->cluster_size_bits) - ofs);
905 to_read = min(count, (rl->length << vol->cluster_size_bits) -
911 br = ntfs_pread(vol->dev, (rl->lcn << vol->cluster_size_bits) +
963 if (!na || !na->ni || !na->ni->vol || !b || pos < 0 || count < 0) {
1001 written = ntfs_rl_pwrite(na->ni->vol, na->rl, pos, size, buf);
1020 ntfs_volume *vol = na->ni->vol;
1026 to_write = min(count, ((*rl)->length << vol->cluster_size_bits) - *ofs);
1029 from_vcn = (*rl)->vcn + (*ofs >> vol->cluster_size_bits);
1071 rlc = ntfs_cluster_alloc(vol, from_vcn,
1072 ((*ofs + to_write - 1) >> vol->cluster_size_bits)
1082 if (ntfs_cluster_free_from_rl(vol, rlc)) {
1115 if (ntfs_attr_fill_zero(na, cur_vcn << vol->cluster_size_bits,
1124 *ofs += (cur_vcn - (*rl)->vcn) << vol->cluster_size_bits;
1130 *ofs -= ((*rl)->vcn - cur_vcn) << vol->cluster_size_bits;
1162 ntfs_volume *vol;
1176 if (!na || !na->ni || !na->ni->vol || !b || pos < 0 || count < 0) {
1181 vol = na->ni->vol;
1226 (char*)ctx->mrec + vol->mft_record_size) {
1232 if (ntfs_mft_record_write(vol, ctx->ntfs_ino->mft_no,
1268 if (ntfs_mft_record_write(vol, ctx->ntfs_ino->mft_no,
1276 ntfs_mft_record_write(vol, ctx->ntfs_ino->mft_no,
1292 rl = ntfs_attr_find_vcn(na, pos >> vol->cluster_size_bits);
1310 ofs = pos - (rl->vcn << vol->cluster_size_bits);
1323 ofs = pos + total - (rl->vcn << vol->cluster_size_bits);
1346 to_write = min(count, (rl->length << vol->cluster_size_bits) - ofs);
1351 if (!NVolReadOnly(vol)) {
1353 s64 wpos = (rl->lcn << vol->cluster_size_bits) + ofs;
1354 s64 wend = (rl->vcn << vol->cluster_size_bits) + ofs + to_write;
1355 u32 bsize = vol->cluster_size;
1366 (wend < (hole_end << vol->cluster_size_bits)))){
1379 written = ntfs_pwrite(vol->dev, wpos, rounding, cb);
1385 written = ntfs_pwrite(vol->dev, wpos, to_write, b);
1452 err = ntfs_mft_record_write(vol,
1686 ntfs_volume *vol;
1693 vol = ctx->ntfs_ino->vol;
1694 upcase = vol->upcase;
1695 upcase_len = vol->upcase_len;
1702 vol = NULL;
1918 ntfs_volume *vol;
1939 vol = base_ni->vol;
2057 name, name_len, ic, vol->upcase,
2058 vol->upcase_len)) {
2063 vol->upcase, vol->upcase_len);
2083 vol->upcase, vol->upcase_len);
2108 vol->upcase, vol->upcase_len))
2175 vol->upcase, vol->upcase_len))
2324 ntfs_volume *vol;
2331 (!ctx->ntfs_ino || !(vol = ctx->ntfs_ino->vol) ||
2332 !vol->upcase || !vol->upcase_len))) {
2477 * @vol: ntfs volume to which the attribute belongs
2487 * EINVAL - Invalid parameters (e.g. @vol is not valid).
2489 ATTR_DEF *ntfs_attr_find_in_attrdef(const ntfs_volume *vol,
2494 if (!vol || !vol->attrdef || !type) {
2499 for (ad = vol->attrdef; (u8*)ad - (u8*)vol->attrdef <
2500 vol->attrdef_len && ad->type; ++ad) {
2517 * @vol: ntfs volume to which the attribute belongs
2522 * ntfs volume @vol. This information is obtained from $AttrDef system file.
2528 * EINVAL - Invalid parameters (e.g. @size is < 0 or @vol is not valid).
2530 int ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPES type,
2553 ad = ntfs_attr_find_in_attrdef(vol, type);
2573 * @vol: ntfs volume to which the attribute belongs
2576 * Check whether the attribute of @type on the ntfs volume @vol is allowed to
2584 * EINVAL - Invalid parameters (e.g. @vol is not valid).
2586 int ntfs_attr_can_be_non_resident(const ntfs_volume *vol, const ATTR_TYPES type)
2591 ad = ntfs_attr_find_in_attrdef(vol, type);
2605 * @vol: ntfs volume to which the attribute belongs
2608 * Check whether the attribute of @type on the ntfs volume @vol is allowed to
2618 * EINVAL - Invalid parameters (e.g. @vol is not valid).
2625 int ntfs_attr_can_be_resident(const ntfs_volume *vol, const ATTR_TYPES type)
2627 if (!vol || !vol->attrdef || !type) {
2729 if (ntfs_attr_can_be_resident(ni->vol, type)) {
2858 if (ntfs_attr_can_be_non_resident(ni->vol, type)) {
3033 if (ntfs_mft_record_free(ni->vol, ni)) {
3065 al_rl = ntfs_mapping_pairs_decompress(base_ni->vol,
3072 if (ntfs_cluster_free_from_rl(base_ni->vol, al_rl)) {
3144 if (ntfs_attr_size_bounds_check(ni->vol, type, size)) {
3151 if (ntfs_attr_can_be_non_resident(ni->vol, type)) {
3164 if (size > ni->vol->mft_record_size) {
3176 if (!ntfs_attr_can_be_resident(ni->vol, type)) {
3230 attr_ni = ntfs_mft_record_alloc(ni->vol, ni);
3295 if (ntfs_mft_record_free(attr_ni->vol, attr_ni))
3329 if (ntfs_cluster_free(na->ni->vol, na, 0, -1) < 0) {
3630 ni = ntfs_mft_record_alloc(base_ni->vol, base_ni);
3665 ntfs_volume *vol = na->ni->vol;
3682 if (ntfs_attr_can_be_non_resident(vol, na->type))
3685 new_allocated_size = (le32_to_cpu(a->value_length) + vol->cluster_size
3686 - 1) & ~(vol->cluster_size - 1);
3690 rl = ntfs_cluster_alloc(vol, 0, new_allocated_size >>
3691 vol->cluster_size_bits, -1, DATA_ZONE);
3727 mp_size = ntfs_get_size_for_mapping_pairs(vol, rl, 0);
3769 vol->cluster_size_bits);
3781 if (ntfs_mapping_pairs_build(vol, (u8*)a + mp_ofs, arec_size - mp_ofs,
3795 if (rl && ntfs_cluster_free(vol, na, 0, -1) < 0)
3828 ntfs_volume *vol;
3846 vol = na->ni->vol;
3851 if (ntfs_attr_size_bounds_check(vol, na->type, newsize) < 0) {
3863 if (newsize < vol->mft_record_size) {
3994 ni = ntfs_mft_record_alloc(vol, ni);
4059 ntfs_volume *vol = na->ni->vol;
4090 if (ntfs_attr_can_be_resident(vol, na->type))
4158 bytes_read = ntfs_rl_pread(vol, na->rl, 0, na->initialized_size,
4182 if (ntfs_cluster_free(vol, na, 0, -1) < 0) {
4299 new_compr_size = ntfs_rl_get_compressed_size(na->ni->vol, na->rl);
4418 mp_size = ntfs_get_size_for_mapping_pairs(na->ni->vol, na->rl,
4499 if (!ntfs_mapping_pairs_build(na->ni->vol, (u8*)a + le16_to_cpu(
4545 mp_size = ntfs_get_size_for_mapping_pairs(na->ni->vol,
4552 ni = ntfs_mft_record_alloc(na->ni->vol, base_ni);
4576 if (ntfs_mft_record_free(na->ni->vol, ni))
4583 err = ntfs_mapping_pairs_build(na->ni->vol, (u8*)a +
4589 if (ntfs_mft_record_free(na->ni->vol, ni))
4660 ntfs_volume *vol;
4669 vol = na->ni->vol;
4675 if (ntfs_attr_size_bounds_check(vol, na->type, newsize) < 0) {
4685 first_free_vcn = (newsize + vol->cluster_size - 1) >>
4686 vol->cluster_size_bits;
4691 if ((na->allocated_size >> vol->cluster_size_bits) != first_free_vcn) {
4698 nr_freed_clusters = ntfs_cluster_free(vol, na, first_free_vcn,
4719 na->allocated_size = first_free_vcn << vol->cluster_size_bits;
4796 ntfs_volume *vol;
4806 vol = na->ni->vol;
4812 if (ntfs_attr_size_bounds_check(vol, na->type, newsize) < 0) {
4822 first_free_vcn = (newsize + vol->cluster_size - 1) >>
4823 vol->cluster_size_bits;
4828 if ((na->allocated_size >> vol->cluster_size_bits) < first_free_vcn) {
4838 if (na->type == AT_DATA && vol->major_ver >= 3) {
4844 vol->cluster_size_bits);
4847 (na->allocated_size >> vol->cluster_size_bits);
4877 rl = ntfs_cluster_alloc(vol, na->allocated_size >>
4878 vol->cluster_size_bits, first_free_vcn -
4880 vol->cluster_size_bits), lcn_seek_from,
4887 vol->cluster_size_bits));
4898 ntfs_cluster_free_from_rl(vol, rl);
4906 na->allocated_size = first_free_vcn << vol->cluster_size_bits;
4909 vol->cluster_size_bits*/)) {
4954 if (ntfs_cluster_free(vol, na, org_alloc_size >>
4955 vol->cluster_size_bits, -1) < 0) {
4961 vol->cluster_size_bits)) {
4974 vol->cluster_size_bits*/)) {