From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yura Pakhuchiy Subject: Print inode number if name can not be represented in the local charset Date: Fri, 01 Jul 2005 05:03:56 +0300 Message-ID: <1120183436.2758.2.camel@chaos.void> Reply-To: Yura Pakhuchiy Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-ggO4su8mEncoAnfeXhLu" Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from mail.iptel.by ([80.94.225.5]:32671 "EHLO iptel.by") by vger.kernel.org with ESMTP id S263173AbVGACDi (ORCPT ); Thu, 30 Jun 2005 22:03:38 -0400 To: Anton Altaparmakov Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org --=-ggO4su8mEncoAnfeXhLu Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Anton, This patch changes message type from ntfs_error to ntfs_debug in the unistr.c when unicode filename contains characters that can not be converted into the local charset, because it's not useful for user and actually it's not a error. Instead of this print warning in dir.c, this warning includes inode number for further investigation (e.g. with ntfsinfo). Signed-off-by: Yura Pakhuchiy -- Best regards, Yura --=-ggO4su8mEncoAnfeXhLu Content-Disposition: attachment; filename=ntfs-print-inode-during-name-conversion-error.diff Content-Type: text/x-patch; name=ntfs-print-inode-during-name-conversion-error.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit This patch changes message type from ntfs_error to ntfs_debug in the unistr.c when unicode filename contains characters that can not be converted into the local charset, because it's not useful for user and actually it's not a error. Instead of this print warning in dir.c, this warning includes inode number for further investigation (e.g. with ntfsinfo). Signed-off-by: Yura Pakhuchiy diff -ruNp -X kernel.ignore ntfs-2.6-devel/fs/ntfs/dir.c ntfs-2.6-yura/fs/ntfs/dir.c --- ntfs-2.6-devel/fs/ntfs/dir.c 2005-07-01 00:38:49.000000000 +0300 +++ ntfs-2.6-yura/fs/ntfs/dir.c 2005-07-01 04:37:20.000000000 +0300 @@ -1051,7 +1051,9 @@ static inline int ntfs_filldir(ntfs_volu 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 file " + "(inode %lu).", MREF_LE( + ie->data.dir.indexed_file)); return 0; } if (ie->key.file_name.file_attributes & diff -ruNp -X kernel.ignore ntfs-2.6-devel/fs/ntfs/unistr.c ntfs-2.6-yura/fs/ntfs/unistr.c --- ntfs-2.6-devel/fs/ntfs/unistr.c 2005-07-01 00:38:49.000000000 +0300 +++ ntfs-2.6-yura/fs/ntfs/unistr.c 2005-07-01 04:27:21.000000000 +0300 @@ -371,7 +371,7 @@ retry: wc = nls->uni2char(le16_to_cpu( ntfs_error(vol->sb, "Received NULL pointer."); return -EINVAL; conversion_err: - ntfs_error(vol->sb, "Unicode name contains characters that cannot be " + ntfs_debug("Unicode name contains characters that cannot be " "converted to character set %s.", nls->charset); if (ns != *outs) kfree(ns); --=-ggO4su8mEncoAnfeXhLu--