Lines Matching full:mi

81 	err = run_unpack_ex(run, ni->mi.sbi, ni->mi.rno, svcn, evcn,  in attr_load_runs()
227 struct ATTR_LIST_ENTRY *le, struct mft_inode *mi, in attr_make_nonresident() argument
245 sbi = mi->sbi; in attr_make_nonresident()
246 rec = mi->mrec; in attr_make_nonresident()
313 mi->dirty = true; in attr_make_nonresident()
340 mi->dirty = true; in attr_make_nonresident()
355 struct ATTR_LIST_ENTRY *le, struct mft_inode *mi, in attr_set_size_res() argument
359 struct ntfs_sb_info *sbi = mi->sbi; in attr_set_size_res()
360 struct MFT_REC *rec = mi->mrec; in attr_set_size_res()
373 return attr_make_nonresident(ni, attr, le, mi, new_size, in attr_set_size_res()
387 mi->dirty = true; in attr_set_size_res()
408 struct ntfs_sb_info *sbi = ni->mi.sbi; in attr_set_size()
410 bool is_mft = ni->mi.rno == MFT_REC_MFT && type == ATTR_DATA && in attr_set_size()
415 struct mft_inode *mi, *mi_b; in attr_set_size() local
478 mi = mi_b; in attr_set_size()
485 &mi); in attr_set_size()
497 * attr,mi,le - last attribute segment (containing 'vcn'). in attr_set_size()
501 rec = mi->mrec; in attr_set_size()
519 * - update packed run in 'mi' in attr_set_size()
595 err = mi_pack_runs(mi, attr, run, vcn - svcn); in attr_set_size()
655 attr_b->flags, &attr, &mi, NULL); in attr_set_size()
676 if (ni->mi.rno != MFT_REC_MFT) in attr_set_size()
697 * - update packed run in 'mi' in attr_set_size()
708 err = mi_pack_runs(mi, attr, run, vcn - svcn); in attr_set_size()
721 mi_remove_attr(NULL, mi, attr); in attr_set_size()
731 mi->dirty = true; in attr_set_size()
774 mi = mi_b; in attr_set_size()
786 err = ni_load_mi(ni, le, &mi); in attr_set_size()
790 attr = mi_find_attr(mi, NULL, type, name, name_len, &le->id); in attr_set_size()
838 /* Restore 'attr' and 'mi'. */ in attr_set_size()
846 mi = mi_b; in attr_set_size()
853 &svcn, &mi); in attr_set_size()
859 if (mi_pack_runs(mi, attr, run, evcn - svcn + 1)) in attr_set_size()
894 struct mft_inode *mi, *mi_b; in attr_data_get_block() local
914 sbi = ni->mi.sbi; in attr_data_get_block()
960 mi = mi_b; in attr_data_get_block()
964 &mi); in attr_data_get_block()
1015 fr = (sbi->record_size - le32_to_cpu(mi->mrec->used) + 8) / 3 + 1; in attr_data_get_block()
1035 0, &vcn, &mi); in attr_data_get_block()
1094 err = mi_pack_runs(mi, attr, run, max(end, evcn1) - svcn); in attr_data_get_block()
1129 mi = mi_b; in attr_data_get_block()
1151 attr = ni_find_attr(ni, attr, &le, ATTR_DATA, NULL, 0, &svcn, &mi); in attr_data_get_block()
1166 mi_remove_attr(NULL, mi, attr); in attr_data_get_block()
1179 if (ni_load_mi(ni, le, &mi)) { in attr_data_get_block()
1184 attr = mi_find_attr(mi, NULL, ATTR_DATA, NULL, 0, &le->id); in attr_data_get_block()
1202 err = mi_pack_runs(mi, attr, run, evcn1 - next_svcn); in attr_data_get_block()
1208 mi->dirty = true; in attr_data_get_block()
1215 attr_b->flags, &attr, &mi, NULL); in attr_data_get_block()
1238 mi_pack_runs(mi, attr, run, max(end, evcn1) - svcn)) { in attr_data_get_block()
1274 struct mft_inode *mi; in attr_data_write_resident() local
1278 attr = ni_find_attr(ni, NULL, NULL, ATTR_DATA, NULL, 0, NULL, &mi); in attr_data_write_resident()
1294 mi->dirty = true; in attr_data_write_resident()
1337 err = run_unpack_ex(run, ni->mi.sbi, ni->mi.rno, svcn, evcn, svcn, in attr_load_runs_vcn()
1351 struct ntfs_sb_info *sbi = ni->mi.sbi; in attr_load_runs_range()
1381 struct ntfs_sb_info *sbi = ni->mi.sbi; in attr_wof_frame_info()
1571 alen = bytes_to_cluster(ni->mi.sbi, le64_to_cpu(attr->nres.alloc_size)); in attr_is_frame_compressed()
1635 struct ntfs_sb_info *sbi = ni->mi.sbi; in attr_allocate_frame()
1638 struct mft_inode *mi, *mi_b; in attr_allocate_frame() local
1661 mi = mi_b; in attr_allocate_frame()
1668 &mi); in attr_allocate_frame()
1728 err = mi_pack_runs(mi, attr, run, max(end, evcn1) - svcn); in attr_allocate_frame()
1763 mi = mi_b; in attr_allocate_frame()
1771 attr = ni_find_attr(ni, attr, &le, ATTR_DATA, NULL, 0, &svcn, &mi); in attr_allocate_frame()
1782 mi_remove_attr(NULL, mi, attr); in attr_allocate_frame()
1795 if (ni_load_mi(ni, le, &mi)) { in attr_allocate_frame()
1800 attr = mi_find_attr(mi, NULL, ATTR_DATA, NULL, 0, in attr_allocate_frame()
1819 err = mi_pack_runs(mi, attr, run, evcn1 - next_svcn); in attr_allocate_frame()
1825 mi->dirty = true; in attr_allocate_frame()
1833 attr_b->flags, &attr, &mi, NULL); in attr_allocate_frame()
1861 struct ntfs_sb_info *sbi = ni->mi.sbi; in attr_collapse_range()
1864 struct mft_inode *mi, *mi_b; in attr_collapse_range() local
1935 mi = mi_b; in attr_collapse_range()
1942 &mi); in attr_collapse_range()
1961 mi->dirty = true; in attr_collapse_range()
1991 err = mi_pack_runs(mi, attr, run, evcn1 - svcn - eat); in attr_collapse_range()
2000 &mi, &le); in attr_collapse_range()
2019 run_unpack_ex(RUN_DEALLOCATE, sbi, ni->mi.rno, svcn, in attr_collapse_range()
2024 mi_remove_attr(NULL, mi, attr); in attr_collapse_range()
2039 if (ni_load_mi(ni, le, &mi)) { in attr_collapse_range()
2045 attr = mi_find_attr(mi, NULL, ATTR_DATA, NULL, in attr_collapse_range()
2059 attr = ni_enum_attr_ex(ni, attr, &le, &mi); in attr_collapse_range()
2119 struct ntfs_sb_info *sbi = ni->mi.sbi; in attr_punch_hole()
2122 struct mft_inode *mi, *mi_b; in attr_punch_hole() local
2198 mi = mi_b; in attr_punch_hole()
2205 &mi); in attr_punch_hole()
2249 err = mi_pack_runs(mi, attr, run, evcn1 - svcn); in attr_punch_hole()
2258 &attr, &mi, &le); in attr_punch_hole()
2277 attr = ni_enum_attr_ex(ni, attr, &le, &mi); in attr_punch_hole()
2323 if (mi_pack_runs(mi, attr, &run2, evcn1 - svcn)) in attr_punch_hole()
2337 struct ntfs_sb_info *sbi = ni->mi.sbi; in attr_insert_range()
2340 struct mft_inode *mi, *mi_b; in attr_insert_range() local
2436 mi = mi_b; in attr_insert_range()
2443 &mi); in attr_insert_range()
2464 err = mi_pack_runs(mi, attr, run, evcn1 + len - svcn); in attr_insert_range()
2470 while ((attr = ni_enum_attr_ex(ni, attr, &le, &mi)) && in attr_insert_range()
2478 mi->dirty = true; in attr_insert_range()
2539 mi = mi_b; in attr_insert_range()
2545 &mi); in attr_insert_range()
2560 if (mi_pack_runs(mi, attr, run, evcn1 + len - svcn)) in attr_insert_range()
2563 while ((attr = ni_enum_attr_ex(ni, attr, &le, &mi)) && in attr_insert_range()
2571 mi->dirty = true; in attr_insert_range()
2587 struct mft_inode *mi; in attr_force_nonresident() local
2589 attr = ni_find_attr(ni, NULL, &le, ATTR_DATA, NULL, 0, NULL, &mi); in attr_force_nonresident()
2601 err = attr_make_nonresident(ni, attr, le, mi, in attr_force_nonresident()
2615 struct mft_inode *mi; in attr_set_compress() local
2617 attr = ni_find_attr(ni, NULL, NULL, ATTR_DATA, NULL, 0, NULL, &mi); in attr_set_compress()
2650 if (!mi_resize_attr(mi, attr, compr ? +8 : -8)) { in attr_set_compress()
2675 mi->dirty = true; in attr_set_compress()