Lines Matching refs:mft_na
86 if (!vol || !vol->mft_na || !b || count < 0) {
94 if (m + count > vol->mft_na->initialized_size >>
99 (long long)vol->mft_na->initialized_size >>
103 br = ntfs_attr_mst_pread(vol->mft_na, m << vol->mft_record_size_bits,
148 if (!vol || !vol->mft_na || vol->mftmirr_size <= 0 || !b || count < 0) {
154 if (m + count > vol->mft_na->initialized_size >>
159 (long long)vol->mft_na->initialized_size >>
176 bw = ntfs_attr_mst_pwrite(vol->mft_na, m << vol->mft_record_size_bits,
491 pass_end = vol->mft_na->allocated_size >> vol->mft_record_size_bits;
967 ntfs_attr *mft_na;
980 mft_na = vol->mft_na;
986 rl = ntfs_attr_find_vcn(mft_na,
987 (mft_na->allocated_size - 1) >> vol->cluster_size_bits);
1030 rl = ntfs_runlists_merge(mft_na->rl, rl2);
1042 mft_na->rl = rl;
1048 ctx = ntfs_attr_get_search_ctx(mft_na->ni, NULL);
1052 if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0,
1061 rl2 = ntfs_attr_find_vcn(mft_na, ll);
1080 ret = ntfs_mft_attr_extend(vol->mft_na);
1116 if (ntfs_attr_lookup(mft_na->type, mft_na->name,
1117 mft_na->name_len, 0, 0, NULL, 0, ctx)) {
1125 mft_na->allocated_size += nr << vol->cluster_size_bits;
1126 a->allocated_size = cpu_to_sle64(mft_na->allocated_size);
1138 if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0,
1143 mft_na->allocated_size += nr << vol->cluster_size_bits;
1158 if (ntfs_cluster_free(vol, mft_na, old_last_vcn, -1) < 0)
1161 if (ntfs_rl_truncate(&mft_na->rl, old_last_vcn))
1177 if (ntfs_attr_update_mapping_pairs(vol->mft_na, 0))
1190 ntfs_attr *mft_na, *mftbmp_na;
1196 /* NOTE: Caller must sanity check vol, vol->mft_na and vol->mftbmp_na */
1198 mft_na = vol->mft_na;
1210 (long long)mft_na->allocated_size,
1211 (long long)mft_na->data_size,
1212 (long long)mft_na->initialized_size);
1213 while (size > mft_na->allocated_size) {
1219 (long long)mft_na->allocated_size,
1220 (long long)mft_na->data_size,
1221 (long long)mft_na->initialized_size);
1224 old_data_initialized = mft_na->initialized_size;
1225 old_data_size = mft_na->data_size;
1234 while (size > mft_na->initialized_size) {
1235 s64 ll2 = mft_na->initialized_size >> vol->mft_record_size_bits;
1236 mft_na->initialized_size += vol->mft_record_size;
1237 if (mft_na->initialized_size > mft_na->data_size)
1238 mft_na->data_size = mft_na->initialized_size;
1247 ctx = ntfs_attr_get_search_ctx(mft_na->ni, NULL);
1251 if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0,
1258 ctx->attr->initialized_size = cpu_to_sle64(mft_na->initialized_size);
1259 ctx->attr->data_size = cpu_to_sle64(mft_na->data_size);
1260 ctx->attr->allocated_size = cpu_to_sle64(mft_na->allocated_size);
1268 (long long)mft_na->allocated_size,
1269 (long long)mft_na->data_size,
1270 (long long)mft_na->initialized_size);
1273 if (mft_na->data_size > mft_na->allocated_size ||
1274 mft_na->initialized_size > mft_na->data_size)
1275 NTFS_BUG("mft_na sanity checks failed");
1278 if (ntfs_inode_sync(mft_na->ni))
1287 mft_na->initialized_size = old_data_initialized;
1288 mft_na->data_size = old_data_size;
1295 ntfs_attr *mft_na, *mftbmp_na;
1301 mft_na = vol->mft_na;
1304 if (size > mft_na->allocated_size || size > mft_na->initialized_size) {
1310 (long long)mft_na->allocated_size,
1311 (long long)mft_na->data_size,
1312 (long long)mft_na->initialized_size);
1316 old_data_initialized = mft_na->initialized_size;
1317 old_data_size = mft_na->data_size;
1320 ctx = ntfs_attr_get_search_ctx(mft_na->ni, NULL);
1324 if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0,
1331 ctx->attr->initialized_size = cpu_to_sle64(mft_na->initialized_size);
1332 ctx->attr->data_size = cpu_to_sle64(mft_na->data_size);
1341 if (mft_na->data_size > mft_na->allocated_size ||
1342 mft_na->initialized_size > mft_na->data_size)
1343 NTFS_BUG("mft_na sanity checks failed");
1349 mft_na->initialized_size = old_data_initialized;
1350 mft_na->data_size = old_data_size;
1357 ntfs_attr *mft_na, *mftbmp_na;
1366 mft_na = vol->mft_na;
1369 base_ni = mft_na->ni;
1390 if (ll > mft_na->initialized_size)
1587 ntfs_attr *mft_na, *mftbmp_na;
1599 if (!vol || !vol->mft_na || !vol->mftbmp_na) {
1609 mft_na = vol->mft_na;
1628 ll = mft_na->initialized_size >> vol->mft_record_size_bits;
1691 if (ll > mft_na->initialized_size)