Lines Matching refs:mft

304 		u64 t64 = sbi->mft.lbo;  in ntfs_loadlog_and_replay()
306 sbi->mft.lbo = sbi->mft.lbo2; in ntfs_loadlog_and_replay()
308 sbi->mft.lbo = t64; in ntfs_loadlog_and_replay()
319 sbi->mft.ni = ntfs_i(inode); in ntfs_loadlog_and_replay()
322 err = ni_load_all_mi(sbi->mft.ni); in ntfs_loadlog_and_replay()
327 sbi->mft.ni = NULL; in ntfs_loadlog_and_replay()
468 wnd = &sbi->mft.bitmap; in ntfs_check_for_free_space()
501 struct ntfs_inode *ni = sbi->mft.ni; in ntfs_extend_mft()
505 struct wnd_bitmap *wnd = &sbi->mft.bitmap; in ntfs_extend_mft()
527 err = attr_set_size(ni, ATTR_BITMAP, NULL, 0, &sbi->mft.bitmap.run, in ntfs_extend_mft()
546 ntfs_clear_mft_tail(sbi, sbi->mft.used, new_mft_total); in ntfs_extend_mft()
556 int ntfs_look_free_mft(struct ntfs_sb_info *sbi, CLST *rno, bool mft, in ntfs_look_free_mft() argument
564 struct wnd_bitmap *wnd = &sbi->mft.bitmap; in ntfs_look_free_mft()
567 static_assert(sizeof(sbi->mft.reserved_bitmap) * 8 >= in ntfs_look_free_mft()
570 if (!mft) in ntfs_look_free_mft()
577 if (mft) { in ntfs_look_free_mft()
596 if (!mft || MFT_REC_FREE == sbi->mft.next_reserved) in ntfs_look_free_mft()
606 if (!sbi->mft.reserved_bitmap) { in ntfs_look_free_mft()
608 sbi->mft.reserved_bitmap = 0xFF; in ntfs_look_free_mft()
651 &sbi->mft.reserved_bitmap); in ntfs_look_free_mft()
656 zbit = find_next_zero_bit(&sbi->mft.reserved_bitmap, in ntfs_look_free_mft()
659 sbi->mft.next_reserved = MFT_REC_FREE; in ntfs_look_free_mft()
664 sbi->mft.next_reserved = zbit; in ntfs_look_free_mft()
675 from = sbi->mft.used; in ntfs_look_free_mft()
681 sbi->mft.used = to; in ntfs_look_free_mft()
685 if (mft) { in ntfs_look_free_mft()
694 if (!mft) { in ntfs_look_free_mft()
696 if (sbi->mft.next_free < MFT_REC_USER) in ntfs_look_free_mft()
697 sbi->mft.next_free = MFT_REC_USER; in ntfs_look_free_mft()
700 if (sbi->mft.next_free >= sbi->mft.bitmap.nbits) { in ntfs_look_free_mft()
702 sbi->mft.next_free = sbi->mft.bitmap.nbits; in ntfs_look_free_mft()
705 sbi->mft.next_free = *rno + 1; in ntfs_look_free_mft()
723 else if (*rno >= MFT_REC_RESERVED && sbi->mft.reserved_bitmap_inited) in ntfs_look_free_mft()
724 __set_bit(*rno - MFT_REC_RESERVED, &sbi->mft.reserved_bitmap); in ntfs_look_free_mft()
727 if (!mft) in ntfs_look_free_mft()
739 struct wnd_bitmap *wnd = &sbi->mft.bitmap; in ntfs_mark_rec_free()
751 } else if (rno >= MFT_REC_RESERVED && sbi->mft.reserved_bitmap_inited) { in ntfs_mark_rec_free()
752 __clear_bit(rno - MFT_REC_RESERVED, &sbi->mft.reserved_bitmap); in ntfs_mark_rec_free()
757 else if (rno < sbi->mft.next_free && rno >= MFT_REC_USER) in ntfs_mark_rec_free()
758 sbi->mft.next_free = rno; in ntfs_mark_rec_free()
782 ni = sbi->mft.ni; in ntfs_clear_mft_tail()
801 sbi->mft.used = from; in ntfs_clear_mft_tail()
818 struct ntfs_inode *ni = sbi->mft.ni; in ntfs_refresh_zone()
825 (u64)sbi->mft.bitmap.nbits << sbi->record_bits); in ntfs_refresh_zone()
861 bytes = sbi->mft.recs_mirr << sbi->record_bits; in ntfs_update_mftmirr()
862 block1 = sbi->mft.lbo >> sb->s_blocksize_bits; in ntfs_update_mftmirr()
863 block2 = sbi->mft.lbo2 >> sb->s_blocksize_bits; in ntfs_update_mftmirr()
1214 lbo = vbo + sbi->mft.lbo; in ntfs_read_run_nb()