From patchwork Wed Mar 21 03:39:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10298493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79A8F60349 for ; Wed, 21 Mar 2018 03:40:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 685F6295F1 for ; Wed, 21 Mar 2018 03:40:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B0FF29621; Wed, 21 Mar 2018 03:40:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 023A0295F1 for ; Wed, 21 Mar 2018 03:40:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752043AbeCUDkD (ORCPT ); Tue, 20 Mar 2018 23:40:03 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:54934 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751970AbeCUDkC (ORCPT ); Tue, 20 Mar 2018 23:40:02 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2L3aCjQ175377; Wed, 21 Mar 2018 03:40:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=tsLirgMUGc4Y7V37AyQK1uMjX22QFlsz2PHJmgG4ltI=; b=hs9b034Y+bjv74rI9dPd4yUl/R8RWAmGRcn/eSe6JHszeh9PsZsvLqGOYQyZYzEqDOUc +DRgCXLcC96iEOdRNIb7uxd5odp5VQ5iQxHraE6RcbOOBGh1Ukue3bPd6WLfqHCjNyx1 vTQTazF7tPudK+0vH/SIDZGfHv3gL2CR2f87v/xM0b3agXm//dKrOrsOl0eqyoBjDTLL nxU+wInjK3nXbppfHCUom02u5AyjfiJzjgR4D0nsPw1Q92tHO8UCDbN3nE4gTHid/Ndq 6OXAWkLCjGcLwAKHM/RUuzxiRtBDfA6mYEAaIDR1MgbBjxk4uhJ7Kwp06/4gv41oLOcJ 6Q== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2gufmk007t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Mar 2018 03:40:00 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2L3dxOC022791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Mar 2018 03:40:00 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2L3dx02018405; Wed, 21 Mar 2018 03:39:59 GMT Received: from localhost (/10.159.242.221) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Mar 2018 20:39:59 -0700 Subject: [PATCH 03/14] xfs_scrub: don't complain about different normalization From: "Darrick J. Wong" To: sandeen@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Tue, 20 Mar 2018 20:39:58 -0700 Message-ID: <152160359862.8288.13397778165305364775.stgit@magnolia> In-Reply-To: <152160358015.8288.2700156777231657519.stgit@magnolia> References: <152160358015.8288.2700156777231657519.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8838 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803200127 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Since there are different ways to normalize utf8 names, don't complain when we find a name that is normalized in a different way than the NFKC that we use to find duplicate names. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- scrub/unicrash.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scrub/unicrash.c b/scrub/unicrash.c index 0b5d1fa..10d7c14 100644 --- a/scrub/unicrash.c +++ b/scrub/unicrash.c @@ -256,7 +256,6 @@ unicrash_complain( struct unicrash *uc, const char *descr, const char *what, - bool normal, bool unique, const char *name, uint8_t *uniname) @@ -267,10 +266,6 @@ unicrash_complain( bad1 = string_escape(name); bad2 = string_escape((char *)uniname); - if (!normal && should_warn_about_name(uc->ctx)) - str_info(uc->ctx, descr, -_("Unicode name \"%s\" in %s should be normalized as \"%s\"."), - bad1, what, bad2); if (!unique) str_warn(uc->ctx, descr, _("Duplicate normalized Unicode name \"%s\" found in %s."), @@ -342,20 +337,18 @@ __unicrash_check_name( { uint8_t uniname[(NAME_MAX * 2) + 1]; bool moveon; - bool normal; bool unique; memset(uniname, 0, (NAME_MAX * 2) + 1); - normal = unicrash_normalize(name, uniname, NAME_MAX * 2); + unicrash_normalize(name, uniname, NAME_MAX * 2); moveon = unicrash_add(uc, uniname, ino, &unique); if (!moveon) return false; - if (normal && unique) + if (unique) return true; - unicrash_complain(uc, descr, namedescr, normal, unique, name, - uniname); + unicrash_complain(uc, descr, namedescr, unique, name, uniname); return true; }