Re: [PATCH v4 06/31] ntfs: report required system file and volume metadata errors

From: liubaolin

Date: Tue Oct 27 2026 - 02:20:07 EST




在 2026/10/27 13:50, Hyunchul Lee 写道:
@@ -1685,23 +1718,29 @@ static int load_and_check_badclus(struct ntfs_volume *vol)
size_t i;
int err;
- base_ino = ntfs_iget(sb, FILE_BadClus);
+ base_ino = ntfs_system_iget(vol, FILE_BadClus);
if (IS_ERR(base_ino))
return PTR_ERR(base_ino);
if (!S_ISREG(base_ino->i_mode)) {
- err = -EIO;
+ err = -EFSCORRUPTED;
+ ntfs_report_metadata_error(vol, -EFSCORRUPTED);

ntfs_report_*_metadata_error() calls seem to be repeated across serveral
functions. Would it be possible to move and call them right before
returing from the fucntion? Also, could you apply the same change to the
other patches as well?

Hi Hyunchul,
Agreed. In v5, I'll consolidate repeated reporting at common error exits where appropriate, including in the other patches.

Thanks,
Baolin.


goto iput_base;
}