Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ntfs: use ->mft_no instead of ->i_ino in prints

This improves log accuracy for NTFS debugging and removes unnecessary
reliance on the VFS i_ino field ahead of the core VFS type change.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>

+40 -41
+2 -2
fs/ntfs/attrib.c
··· 1908 1908 err2 = attr_size; 1909 1909 attr_size = arec_size - mp_ofs; 1910 1910 ntfs_error(vol->sb, 1911 - "Failed to undo partial resident to non-resident attribute conversion. Truncating inode 0x%lx, attribute type 0x%x from %i bytes to %i bytes to maintain metadata consistency. THIS MEANS YOU ARE LOSING %i BYTES DATA FROM THIS %s.", 1912 - vi->i_ino, 1911 + "Failed to undo partial resident to non-resident attribute conversion. Truncating inode 0x%llx, attribute type 0x%x from %i bytes to %i bytes to maintain metadata consistency. THIS MEANS YOU ARE LOSING %i BYTES DATA FROM THIS %s.", 1912 + ni->mft_no, 1913 1913 (unsigned int)le32_to_cpu(ni->type), 1914 1914 err2, attr_size, err2 - attr_size, 1915 1915 ((ni->type == AT_DATA) &&
+2 -2
fs/ntfs/bitmap.c
··· 130 130 struct ntfs_inode *ni = NTFS_I(vi); 131 131 struct ntfs_volume *vol = ni->vol; 132 132 133 - ntfs_debug("Entering for i_ino 0x%lx, start_bit 0x%llx, count 0x%llx, value %u.%s", 134 - vi->i_ino, (unsigned long long)start_bit, 133 + ntfs_debug("Entering for i_ino 0x%llx, start_bit 0x%llx, count 0x%llx, value %u.%s", 134 + ni->mft_no, (unsigned long long)start_bit, 135 135 (unsigned long long)cnt, (unsigned int)value, 136 136 is_rollback ? " (rollback)" : ""); 137 137
+5 -5
fs/ntfs/dir.c
··· 767 767 struct rb_root ra_root = RB_ROOT; 768 768 struct file_ra_state *ra; 769 769 770 - ntfs_debug("Entering for inode 0x%lx, fpos 0x%llx.", 771 - vdir->i_ino, actor->pos); 770 + ntfs_debug("Entering for inode 0x%llx, fpos 0x%llx.", 771 + ndir->mft_no, actor->pos); 772 772 773 773 if (file->private_data) { 774 774 private = file->private_data; ··· 1148 1148 int err, ret; 1149 1149 struct ntfs_attr na; 1150 1150 1151 - ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); 1151 + ntfs_debug("Entering for inode 0x%llx.", ni->mft_no); 1152 1152 1153 1153 if (NVolShutdown(vol)) 1154 1154 return -EIO; ··· 1215 1215 ntfs_debug("Done."); 1216 1216 else 1217 1217 ntfs_warning(vi->i_sb, 1218 - "Failed to f%ssync inode 0x%lx. Error %u.", 1219 - datasync ? "data" : "", vi->i_ino, -ret); 1218 + "Failed to f%ssync inode 0x%llx. Error %u.", 1219 + datasync ? "data" : "", ni->mft_no, -ret); 1220 1220 inode_unlock(vi); 1221 1221 return ret; 1222 1222 }
+3 -3
fs/ntfs/file.c
··· 163 163 struct inode *parent_vi, *ia_vi; 164 164 struct ntfs_attr_search_ctx *ctx; 165 165 166 - ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); 166 + ntfs_debug("Entering for inode 0x%llx.", ni->mft_no); 167 167 168 168 if (NVolShutdown(vol)) 169 169 return -EIO; ··· 242 242 ntfs_debug("Done."); 243 243 else 244 244 ntfs_warning(vi->i_sb, 245 - "Failed to f%ssync inode 0x%lx. Error %u.", 246 - datasync ? "data" : "", vi->i_ino, -ret); 245 + "Failed to f%ssync inode 0x%llx. Error %u.", 246 + datasync ? "data" : "", ni->mft_no, -ret); 247 247 if (!ret) 248 248 blkdev_issue_flush(vi->i_sb->s_bdev); 249 249 return ret;
+21 -22
fs/ntfs/inode.c
··· 670 670 static int ntfs_read_locked_inode(struct inode *vi) 671 671 { 672 672 struct ntfs_volume *vol = NTFS_SB(vi->i_sb); 673 - struct ntfs_inode *ni; 673 + struct ntfs_inode *ni = NTFS_I(vi); 674 674 struct mft_record *m; 675 675 struct attr_record *a; 676 676 struct standard_information *si; ··· 682 682 dev_t dev = 0; 683 683 bool vol_err = true; 684 684 685 - ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); 685 + ntfs_debug("Entering for i_ino 0x%llx.", ni->mft_no); 686 686 687 687 if (uid_valid(vol->uid)) { 688 688 vi->i_uid = vol->uid; ··· 704 704 */ 705 705 if (vi->i_ino != FILE_MFT) 706 706 ntfs_init_big_inode(vi); 707 - ni = NTFS_I(vi); 708 707 709 708 m = map_mft_record(ni); 710 709 if (IS_ERR(m)) { ··· 803 804 } else { 804 805 if (vi->i_ino == FILE_MFT) 805 806 goto skip_attr_list_load; 806 - ntfs_debug("Attribute list found in inode 0x%lx.", vi->i_ino); 807 + ntfs_debug("Attribute list found in inode 0x%llx.", ni->mft_no); 807 808 NInoSetAttrList(ni); 808 809 a = ctx->attr; 809 810 if (a->flags & ATTR_COMPRESSION_MASK) { ··· 819 820 goto unm_err_out; 820 821 } 821 822 ntfs_warning(vi->i_sb, 822 - "Resident attribute list attribute in inode 0x%lx is marked encrypted/sparse which is not true. However, Windows allows this and chkdsk does not detect or correct it so we will just ignore the invalid flags and pretend they are not set.", 823 - vi->i_ino); 823 + "Resident attribute list attribute in inode 0x%llx is marked encrypted/sparse which is not true. However, Windows allows this and chkdsk does not detect or correct it so we will just ignore the invalid flags and pretend they are not set.", 824 + ni->mft_no); 824 825 } 825 826 /* Now allocate memory for the attribute list. */ 826 827 ni->attr_list_size = (u32)ntfs_attr_size(a); ··· 1224 1225 err_out: 1225 1226 if (err != -EOPNOTSUPP && err != -ENOMEM && vol_err == true) { 1226 1227 ntfs_error(vol->sb, 1227 - "Failed with error code %i. Marking corrupt inode 0x%lx as bad. Run chkdsk.", 1228 - err, vi->i_ino); 1228 + "Failed with error code %i. Marking corrupt inode 0x%llx as bad. Run chkdsk.", 1229 + err, ni->mft_no); 1229 1230 NVolSetErrors(vol); 1230 1231 } 1231 1232 return err; ··· 1261 1262 struct ntfs_attr_search_ctx *ctx; 1262 1263 int err = 0; 1263 1264 1264 - ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); 1265 + ntfs_debug("Entering for i_ino 0x%llx.", ni->mft_no); 1265 1266 1266 1267 ntfs_init_big_inode(vi); 1267 1268 ··· 1503 1504 u8 *ir_end, *index_end; 1504 1505 int err = 0; 1505 1506 1506 - ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); 1507 + ntfs_debug("Entering for i_ino 0x%llx.", ni->mft_no); 1507 1508 lockdep_assert_held(&base_ni->mrec_lock); 1508 1509 1509 1510 ntfs_init_big_inode(vi); ··· 2311 2312 ntfs_commit_inode(vi); 2312 2313 2313 2314 if (NInoDirty(ni)) { 2314 - ntfs_debug("Failed to commit dirty inode 0x%lx. Losing data!", 2315 - vi->i_ino); 2315 + ntfs_debug("Failed to commit dirty inode 0x%llx. Losing data!", 2316 + ni->mft_no); 2316 2317 NInoClearAttrListDirty(ni); 2317 2318 NInoClearDirty(ni); 2318 2319 } ··· 2499 2500 /* Update the creation times if they have changed. */ 2500 2501 nt = utc2ntfs(ni->i_crtime); 2501 2502 if (si->creation_time != nt) { 2502 - ntfs_debug("Updating creation time for inode 0x%lx: old = 0x%llx, new = 0x%llx", 2503 - vi->i_ino, le64_to_cpu(si->creation_time), 2503 + ntfs_debug("Updating creation time for inode 0x%llx: old = 0x%llx, new = 0x%llx", 2504 + ni->mft_no, le64_to_cpu(si->creation_time), 2504 2505 le64_to_cpu(nt)); 2505 2506 si->creation_time = nt; 2506 2507 modified = true; ··· 2509 2510 /* Update the access times if they have changed. */ 2510 2511 nt = utc2ntfs(inode_get_mtime(vi)); 2511 2512 if (si->last_data_change_time != nt) { 2512 - ntfs_debug("Updating mtime for inode 0x%lx: old = 0x%llx, new = 0x%llx", 2513 - vi->i_ino, le64_to_cpu(si->last_data_change_time), 2513 + ntfs_debug("Updating mtime for inode 0x%llx: old = 0x%llx, new = 0x%llx", 2514 + ni->mft_no, le64_to_cpu(si->last_data_change_time), 2514 2515 le64_to_cpu(nt)); 2515 2516 si->last_data_change_time = nt; 2516 2517 modified = true; ··· 2518 2519 2519 2520 nt = utc2ntfs(inode_get_ctime(vi)); 2520 2521 if (si->last_mft_change_time != nt) { 2521 - ntfs_debug("Updating ctime for inode 0x%lx: old = 0x%llx, new = 0x%llx", 2522 - vi->i_ino, le64_to_cpu(si->last_mft_change_time), 2522 + ntfs_debug("Updating ctime for inode 0x%llx: old = 0x%llx, new = 0x%llx", 2523 + ni->mft_no, le64_to_cpu(si->last_mft_change_time), 2523 2524 le64_to_cpu(nt)); 2524 2525 si->last_mft_change_time = nt; 2525 2526 modified = true; 2526 2527 } 2527 2528 nt = utc2ntfs(inode_get_atime(vi)); 2528 2529 if (si->last_access_time != nt) { 2529 - ntfs_debug("Updating atime for inode 0x%lx: old = 0x%llx, new = 0x%llx", 2530 - vi->i_ino, 2530 + ntfs_debug("Updating atime for inode 0x%llx: old = 0x%llx, new = 0x%llx", 2531 + ni->mft_no, 2531 2532 le64_to_cpu(si->last_access_time), 2532 2533 le64_to_cpu(nt)); 2533 2534 si->last_access_time = nt; ··· 2742 2743 int err = 0; 2743 2744 bool need_iput = false; 2744 2745 2745 - ntfs_debug("Entering for %sinode 0x%lx.", NInoAttr(ni) ? "attr " : "", 2746 - vi->i_ino); 2746 + ntfs_debug("Entering for %sinode 0x%llx.", NInoAttr(ni) ? "attr " : "", 2747 + ni->mft_no); 2747 2748 2748 2749 if (NVolShutdown(ni->vol)) 2749 2750 return -EIO;
+2 -2
fs/ntfs/mft.c
··· 2717 2717 struct runlist_element *rl; 2718 2718 loff_t i_size = i_size_read(vi); 2719 2719 2720 - ntfs_debug("Entering for inode 0x%lx, attribute type 0x%x, folio index 0x%lx.", 2721 - vi->i_ino, ni->type, folio->index); 2720 + ntfs_debug("Entering for inode 0x%llx, attribute type 0x%x, folio index 0x%lx.", 2721 + ni->mft_no, ni->type, folio->index); 2722 2722 2723 2723 if (!locked_nis || !ref_inos) 2724 2724 return -ENOMEM;
+5 -5
fs/ntfs/namei.c
··· 178 178 unsigned long dent_ino; 179 179 int uname_len; 180 180 181 - ntfs_debug("Looking up %pd in directory inode 0x%lx.", 182 - dent, dir_ino->i_ino); 181 + ntfs_debug("Looking up %pd in directory inode 0x%llx.", 182 + dent, NTFS_I(dir_ino)->mft_no); 183 183 /* Convert the name of the dentry to Unicode. */ 184 184 uname_len = ntfs_nlstoucs(vol, dent->d_name.name, dent->d_name.len, 185 185 &uname, NTFS_MAX_NAME_LEN); ··· 1611 1611 unsigned long parent_ino; 1612 1612 int err; 1613 1613 1614 - ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); 1614 + ntfs_debug("Entering for inode 0x%llx.", ni->mft_no); 1615 1615 /* Get the mft record of the inode belonging to the child dentry. */ 1616 1616 mrec = map_mft_record(ni); 1617 1617 if (IS_ERR(mrec)) ··· 1630 1630 unmap_mft_record(ni); 1631 1631 if (err == -ENOENT) 1632 1632 ntfs_error(vi->i_sb, 1633 - "Inode 0x%lx does not have a file name attribute. Run chkdsk.", 1634 - vi->i_ino); 1633 + "Inode 0x%llx does not have a file name attribute. Run chkdsk.", 1634 + ni->mft_no); 1635 1635 return ERR_PTR(err); 1636 1636 } 1637 1637 attr = ctx->attr;