Lines Matching defs:mft_no
52 index = (u64)ni->mft_no << vol->mft_record_size_bits >>
54 ofs = (ni->mft_no << vol->mft_record_size_bits) & ~PAGE_MASK;
68 "driver.", ni->mft_no);
83 "Run chkdsk.", ni->mft_no);
148 ntfs_debug("Entering for mft_no 0x%lx.", ni->mft_no);
208 ntfs_debug("Entering for mft_no 0x%lx.", ni->mft_no);
242 unsigned long mft_no = MREF(mref);
247 mft_no, base_ni->mft_no);
259 if (mft_no != extent_nis[i]->mft_no)
293 ni = ntfs_new_extent_inode(base_ni->vol->sb, mft_no);
388 ntfs_debug("Entering for inode 0x%lx.", ni->mft_no);
408 * @mft_no: mft record number of mft record to synchronize
412 * number @mft_no to the mft mirror ($MFTMirr) of the ntfs volume @vol,
428 const unsigned long mft_no, MFT_RECORD *m)
439 * @mft_no: mft record number of mft record to synchronize
444 * number @mft_no to the mft mirror ($MFTMirr) of the ntfs volume @vol.
454 int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no,
468 ntfs_debug("Entering for inode 0x%lx.", mft_no);
474 err = ntfs_sync_mft_mirror_umount(vol, mft_no, m);
480 page = ntfs_map_page(vol->mftmirr_ino->i_mapping, mft_no >>
491 page_ofs = (mft_no << vol->mft_record_size_bits) & ~PAGE_MASK;
531 vcn = ((VCN)mft_no << vol->mft_record_size_bits) +
562 "%lli).", mft_no,
618 "record 0x%lx!", mft_no);
673 ntfs_debug("Entering for inode 0x%lx.", ni->mft_no);
724 vcn = ((VCN)ni->mft_no << vol->mft_record_size_bits) +
750 ni->mft_no, (long long)lcn);
786 if (!sync && ni->mft_no < vol->mftmirr_size)
787 ntfs_sync_mft_mirror(vol, ni->mft_no, m, sync);
804 if (sync && ni->mft_no < vol->mftmirr_size)
805 ntfs_sync_mft_mirror(vol, ni->mft_no, m, sync);
814 ni->mft_no);
844 * @mft_no: [IN] mft record number of the mft record to check
849 * @mft_no belonging to the ntfs volume @vol may be written out. If necessary
920 bool ntfs_may_write_mft_record(ntfs_volume *vol, const unsigned long mft_no,
930 ntfs_debug("Entering for inode 0x%lx.", mft_no);
940 ntfs_debug("Looking for inode 0x%lx in icache.", mft_no);
941 na.mft_no = mft_no;
949 if (!mft_no) {
961 vi = ilookup5_nowait(sb, mft_no, ntfs_test_inode, &na);
964 ntfs_debug("Base inode 0x%lx is in icache.", mft_no);
972 mft_no);
977 ntfs_debug("Inode 0x%lx is not dirty.", mft_no);
981 "not write it.", mft_no);
987 mft_no);
995 ntfs_debug("Inode 0x%lx is not in icache.", mft_no);
1000 mft_no);
1006 mft_no);
1014 na.mft_no = MREF_LE(m->base_mft_record);
1016 "inode 0x%lx in icache.", mft_no, na.mft_no);
1017 if (!na.mft_no) {
1022 vi = ilookup5_nowait(sb, na.mft_no, ntfs_test_inode,
1030 "extent record.", na.mft_no);
1033 ntfs_debug("Base inode 0x%lx is in icache.", na.mft_no);
1048 "write the extent record.", na.mft_no);
1054 if (mft_no == extent_nis[i]->mft_no) {
1072 mft_no, na.mft_no);
1076 mft_no, na.mft_no);
1088 "not write it.", mft_no);
1092 mft_no);
1095 mft_no);
1157 data_pos = base_ni->mft_no + 1;
1999 * @mft_no: mft reference specifying the mft record number
2002 * Layout an empty, unused mft record with the mft record number @mft_no into
2009 static int ntfs_mft_record_layout(const ntfs_volume *vol, const s64 mft_no,
2014 ntfs_debug("Entering for mft record 0x%llx.", (long long)mft_no);
2015 if (mft_no >= (1ll << 32)) {
2017 "maximum of 2^32.", (long long)mft_no);
2032 m->mft_record_number = cpu_to_le32((u32)mft_no);
2080 * @mft_no: mft record number to format
2082 * Format the mft record @mft_no in $MFT/$DATA, i.e. lay out an empty, unused
2088 static int ntfs_mft_record_format(const ntfs_volume *vol, const s64 mft_no)
2098 ntfs_debug("Entering for mft record 0x%llx.", (long long)mft_no);
2103 index = mft_no << vol->mft_record_size_bits >> PAGE_SHIFT;
2104 ofs = (mft_no << vol->mft_record_size_bits) & ~PAGE_MASK;
2112 "record 0x%llx.", (long long)mft_no);
2120 "to format 0x%llx.", (long long)mft_no);
2127 err = ntfs_mft_record_layout(vol, mft_no, m);
2130 (long long)mft_no);
2260 (long long)base_ni->mft_no);
2435 s64 new_initialized_size, mft_no;
2439 mft_no = mft_ni->initialized_size >> vol->mft_record_size_bits;
2444 (long long)mft_no);
2445 err = ntfs_mft_record_format(vol, mft_no);
2583 m->base_mft_record = MK_LE_MREF(base_ni->mft_no,
2776 unsigned long mft_no = ni->mft_no;
2794 mft_no, base_ni->mft_no);
2801 "not freeing.", base_ni->mft_no);
2824 "its base inode 0x%lx.", mft_no,
2825 base_ni->mft_no);
2855 "freeing.", mft_no);
2865 err = ntfs_bitmap_clear_bit(vol->mftbmp_ino, mft_no);