NTFS: Report unrepresentable inodes during ntfs_readdir() as KERN_WARNING
authorAnton Altaparmakov <aia21@cantab.net>
Thu, 8 Sep 2005 16:04:11 +0000 (17:04 +0100)
committerAnton Altaparmakov <aia21@cantab.net>
Thu, 8 Sep 2005 16:04:11 +0000 (17:04 +0100)
      messages and include the inode number.  Thanks to Yura Pakhuchiy for
      pointing this out.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
fs/ntfs/ChangeLog
fs/ntfs/dir.c
fs/ntfs/unistr.c

index 8fe38c801166d33a9ea062ab7c3013b5023d3bd1..45f806fc45f9146655f3031a283adf7878a5fc2c 100644 (file)
@@ -48,6 +48,9 @@ ToDo/Notes:
        - Remove two bogus BUG_ON()s from fs/ntfs/mft.c.
        - Fix handling of valid but empty mapping pairs array in
          fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress().
+       - Report unrepresentable inodes during ntfs_readdir() as KERN_WARNING
+         messages and include the inode number.  Thanks to Yura Pakhuchiy for
+         pointing this out.
 
 2.1.23 - Implement extension of resident files and make writing safe as well as
         many bug fixes, cleanups, and enhancements...
index 46779471c542ee70bf73e7df0e4914b6a3b1e6bc..795c3d1930f5f38a265bc530a2e1dd8733341915 100644 (file)
@@ -1051,7 +1051,8 @@ static inline int ntfs_filldir(ntfs_volume *vol, loff_t fpos,
                        ie->key.file_name.file_name_length, &name,
                        NTFS_MAX_NAME_LEN * NLS_MAX_CHARSET_SIZE + 1);
        if (name_len <= 0) {
-               ntfs_debug("Skipping unrepresentable file.");
+               ntfs_warning(vol->sb, "Skipping unrepresentable inode 0x%llx.",
+                               (long long)MREF_LE(ie->data.dir.indexed_file));
                return 0;
        }
        if (ie->key.file_name.file_attributes &
index 19c42e231b4411ca270d48e2b6b3fac927190554..a389a5a16c84af96be71d6c399b3d7f9b1e52d17 100644 (file)
@@ -372,7 +372,8 @@ retry:                      wc = nls->uni2char(le16_to_cpu(ins[i]), ns + o,
        return -EINVAL;
 conversion_err:
        ntfs_error(vol->sb, "Unicode name contains characters that cannot be "
-                       "converted to character set %s.", nls->charset);
+                       "converted to character set %s.  You might want to "
+                       "try to use the mount option nls=utf8.", nls->charset);
        if (ns != *outs)
                kfree(ns);
        if (wc != -ENAMETOOLONG)