Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2882825pxt; Mon, 9 Aug 2021 11:03:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqsEyZuPHQUdlkMZZDfV1ohDwoWgdqGn/esOhZX2U6lvEf6aJ9vJ2qE1H8GFH6grWKy1Uo X-Received: by 2002:a02:6983:: with SMTP id e125mr23327872jac.112.1628532219758; Mon, 09 Aug 2021 11:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628532219; cv=none; d=google.com; s=arc-20160816; b=OOaMMOpzm+7LNBJAmb94+nLzHC3RNAHKQER5WlQKdhACBj5+4r+3SiZ8z/BwWiEGty U5cGJPDRrgtv+wTdAKldefxqVvyaFkcuMV8+udlqjFhF9Z04UCs1uln246Kwww0PGrDe WLGnSTYZUCKiNo5FEeAxp2rcWeZNghctul7dloV0d2KfpalpfpXW/3UXGD+of/dVfWmx 4t8O1DB/swwomjfg9dHW9Dvgdt68SefClJsQcRQj/RQ4DkZxK4PV+StFXxkrszgpCL4N Kugl3xcIqMpMb5xQklohKX41nO7IvSsuxhV88kLy3XTJei7RYRacr4OPZFqiMRRfJK71 89wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=AAhrsJC66Dx61Rd+R0En9xSeyn+Y7a3fdKNMwl3SmV8=; b=BIWqUAygaf1DfNUZcAIu7IS3r4hW9boriCzt6dGQeShDZJtFWl2OLr9ci/CeriHrLJ LejMlcxBYYYsEBNuLuDI2BS1frHNCuNRd/maKMreAY3OtyrlUSrO6vJmIe4SaLFAMErX F7NoqOdmtprlMxiF9AlR3EJ7QJ/a4LCy84uxb9efnXg3GcI/1C7COJk/ankBv2lTjcxd dpxJuD/NTQkc8BRGgBxMZlMtgcXByTQ9r7gDNq+TTSootsVfqGn67uYCNs06Jalhsatd JDabHu8zoGpa0eaM8Gad5DVNuPDUO+s+sUh5UC/69j8y1DR/Abv1UyiibDoXZpmcYsmY ln0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dubeyko-com.20150623.gappssmtp.com header.s=20150623 header.b=C0z7fOVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si5271412ios.94.2021.08.09.11.03.26; Mon, 09 Aug 2021 11:03:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dubeyko-com.20150623.gappssmtp.com header.s=20150623 header.b=C0z7fOVt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234962AbhHISBE (ORCPT + 99 others); Mon, 9 Aug 2021 14:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232642AbhHISA4 (ORCPT ); Mon, 9 Aug 2021 14:00:56 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE89AC06179F for ; Mon, 9 Aug 2021 11:00:34 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id l24so13205778qtj.4 for ; Mon, 09 Aug 2021 11:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dubeyko-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AAhrsJC66Dx61Rd+R0En9xSeyn+Y7a3fdKNMwl3SmV8=; b=C0z7fOVtv7xwyNq2ULxDTWBgiDiksaU5+3HrkSSE0+YAMfOwDGb3z2QxgMzpBwRhPv IJIv8Jcn2zdkSUNM5svDTPmzFJom/BDy2o4AuFQLhDPHTF6I15WVw/dSxJoqsVOSZ1Cb W4oQq3okSZ+c6t9/tXu1mtxGEjfyOfLs5PO3JPTOAzr1aESarTGuxT4PlJIfCs78j5tf EJr6/POmRH4eknj1regIdXrAR5fCHCeWaaDHnTNfXNqLroOKMPWZWQrn4b1SAFksBLPj 3ozwqoWMzQNUQaaWHVTFNsV2eGVzErWUtSvwp7srUzrIDAjM/UP1OEZMwfJ6NvEMbgyW 6e0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AAhrsJC66Dx61Rd+R0En9xSeyn+Y7a3fdKNMwl3SmV8=; b=WoZ5qGmildwr/2zlJsoZVRAFJQL3dnrYjVcpxWdTUSgnN8+C3CLCgG0Ykjlf6fE/Hm egTJGx/kxge0Gfdn+zavlHTDlLnzGsLDX2CUZWPX9VFqLAdeqWUuLGmCx5lmO/Qu8QHV 03QKsjPWm+tc2bbhr4jEuSBTNAGQsrHmjX1JpJ7FVSYJSFhUeU/Wq3YVNumTFtgcEseM uqfhm/v/ocB6yNCnGTncTZHWCWK0xlGGkKBmdBCYF0crSeLb+hrLd1WBtB7M3PoCrj0Q RMVD6LXGjomquL5t1jz2KYqcSfJzNtBxqm1a/Ezs1jaiz+FCwaz1lx6eFAbC/0pOxCSK InvA== X-Gm-Message-State: AOAM531ZUHHdw8ENkMtaB4h907OvZJC6ljX3ic1kms6MuIS1JRE1IV8y pYGOBxud4JY0/H6tKgyE25fEwQ== X-Received: by 2002:a05:622a:243:: with SMTP id c3mr10162127qtx.61.1628532033991; Mon, 09 Aug 2021 11:00:33 -0700 (PDT) Received: from smtpclient.apple ([2600:1700:42f0:6600:615b:6e84:29a:3bc6]) by smtp.gmail.com with ESMTPSA id m188sm9658536qkc.99.2021.08.09.11.00.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Aug 2021 11:00:33 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: [RFC PATCH 11/20] hfs: Explicitly set hsb->nls_disk when hsb->nls_io is set From: Viacheslav Dubeyko In-Reply-To: Date: Mon, 9 Aug 2021 11:00:29 -0700 Cc: =?utf-8?Q?Pali_Roh=C3=A1r?= , Linux FS Devel , linux-ntfs-dev@lists.sourceforge.net, linux-cifs@vger.kernel.org, jfs-discussion@lists.sourceforge.net, LKML , Alexander Viro , Jan Kara , OGAWA Hirofumi , "Theodore Y . Ts'o" , Luis de Bethencourt , Salah Triki , Andrew Morton , Dave Kleikamp , Anton Altaparmakov , Pavel Machek , =?utf-8?Q?Marek_Beh=C3=BAn?= , Christoph Hellwig Content-Transfer-Encoding: quoted-printable Message-Id: References: <20210808162453.1653-1-pali@kernel.org> <20210808162453.1653-12-pali@kernel.org> To: Matthew Wilcox X-Mailer: Apple Mail (2.3654.120.0.1.13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Aug 9, 2021, at 10:37 AM, Matthew Wilcox = wrote: >=20 > On Mon, Aug 09, 2021 at 10:31:55AM -0700, Viacheslav Dubeyko wrote: >>> On Aug 8, 2021, at 9:24 AM, Pali Roh=C3=A1r wrote: >>>=20 >>> It does not make any sense to set hsb->nls_io (NLS iocharset used = between >>> VFS and hfs driver) when hsb->nls_disk (NLS codepage used between = hfs >>> driver and disk) is not set. >>>=20 >>> Reverse engineering driver code shown what is doing in this special = case: >>>=20 >>> When codepage was not defined but iocharset was then >>> hfs driver copied 8bit character from disk directly to >>> 16bit unicode wchar_t type. Which means it did conversion >>> from Latin1 (ISO-8859-1) to Unicode because first 256 >>> Unicode code points matches 8bit ISO-8859-1 codepage table. >>> So when iocharset was specified and codepage not, then >>> codepage used implicit value "iso8859-1". >>>=20 >>> So when hsb->nls_disk is not set and hsb->nls_io is then explicitly = set >>> hsb->nls_disk to "iso8859-1". >>>=20 >>> Such setup is obviously incompatible with Mac OS systems as they do = not >>> support iso8859-1 encoding for hfs. So print warning into dmesg = about this >>> fact. >>>=20 >>> After this change hsb->nls_disk is always set, so remove code paths = for >>> case when hsb->nls_disk was not set as they are not needed anymore. >>=20 >>=20 >> Sounds reasonable. But it will be great to know that the change has = been tested reasonably well. >=20 > I don't think it's reasonable to ask Pali to test every single = filesystem. > That's something the maintainer should do, as you're more likely to = have > the infrastructure already set up to do testing of your filesystem and > be aware of fun corner cases and use cases than someone who's working > across all filesystems. I see the point. But the whole approach needs to be tested as minimum = for one particular file system. :) And it could be any favorite one. Thanks, Slava.