Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp296159ybt; Tue, 23 Jun 2020 22:43:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0l8oQjIHC0R5RayqrsjFhDhB0Vtn7wX7Riluxop9+yXR1/+90FxFKnOXEnNAbO3hCHPNV X-Received: by 2002:a17:906:9244:: with SMTP id c4mr16505692ejx.60.1592977437242; Tue, 23 Jun 2020 22:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592977437; cv=none; d=google.com; s=arc-20160816; b=fFKHpNQwH6eMb/A2S5EvQtf9Xay3NRc/xlY1Lhete5S7F2/XBg5ZmpU5UQm6o1/dZe hG+xDSQMyDrENuYduNhn7a1IdNX3jvftXF2AQx93G1QXmhas8hD+Cm8Gryv0q5XQ0qY0 EluS96OgsmEvTFpVanyvtQGxk6lalnoSlhAxhtI38OOv1izbtf0OuiB0OkAPRepc7jA/ Qqts9tbuBBmWe1nz8+huUeDIVVwjPl5ztj5loYJQvukHUgFb/xszFeOI63fNjxG2cAZl VSnHZx76DTP8Qg/os3pQtThTySY6v95vRhEreuhYwKEzMTUKBghjV3OsSaASGw75DuLa Mjnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:subject:cc:to:from; bh=xB+6J0O4jzl4NVJI8LmAon6D5LOR+VQ3DLNB2klpNMw=; b=Z9uoWX4LIH1kmx2dt/xSlLL/Z6uj+qDXezdIuL8QuTjiKdM2O603M0SMBKtrqi70e1 UPps87KJ1XpU1A4YHuVDhSFStwDWddUW6lc7IvAFBPeFtSxCc5Uwvj/XwmRuRDeGBU9X x8rjLG+e+N4A81ZD0SfjTS51+Hm0OfZg3dwtHbx7h5yDADFdG7oanaMXWbkNS9UrcXxR CvgUnu6uHsW1H9uT5O5QtXh707cro5Zi97ZHWPor9RxtdEAaBPqLvDb3YQ+C8O8jPYFJ JEGMpR21vcY4rp2XjyFvvkuWZTRF/ft3c+KAwftPEDjUS/ruHym94BE98wwjhV1ei6Br RQ9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h23si6756836edv.18.2020.06.23.22.43.34; Tue, 23 Jun 2020 22:43:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388307AbgFXFn2 (ORCPT + 99 others); Wed, 24 Jun 2020 01:43:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbgFXFn2 (ORCPT ); Wed, 24 Jun 2020 01:43:28 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6886C061573; Tue, 23 Jun 2020 22:43:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 640412A4015 From: Gabriel Krisman Bertazi To: Daniel Rosenberg Cc: "Theodore Ts'o" , linux-ext4@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, Eric Biggers , linux-fscrypt@vger.kernel.org, Alexander Viro , Richard Weinberger , linux-mtd@lists.infradead.org, Andreas Dilger , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v9 4/4] ext4: Use generic casefolding support Organization: Collabora References: <20200624043341.33364-1-drosen@google.com> <20200624043341.33364-5-drosen@google.com> Date: Wed, 24 Jun 2020 01:43:22 -0400 In-Reply-To: <20200624043341.33364-5-drosen@google.com> (Daniel Rosenberg's message of "Tue, 23 Jun 2020 21:33:41 -0700") Message-ID: <877dvxggsl.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Daniel Rosenberg writes: > - > const struct dentry_operations ext4_dentry_ops = { > - .d_hash = ext4_d_hash, > - .d_compare = ext4_d_compare, > + .d_hash = generic_ci_d_hash, > + .d_compare = generic_ci_d_compare, > }; > #endif Can you make the structure generic since it is the same for f2fs and ext4, which let you drop the code guards? Unless that becomes a problem for d_revalidate with fscrypt, it is fine like this. > #ifdef CONFIG_UNICODE > - sbi = EXT4_SB(sb); > - if (ext4_has_strict_mode(sbi) && IS_CASEFOLDED(dir) && > - sbi->s_encoding && utf8_validate(sbi->s_encoding, &dentry->d_name)) > + if (sb_has_enc_strict_mode(sb) && IS_CASEFOLDED(dir) && I keep reading the 'enc' in sb_has_enc_strict_mode() as 'encryption'. What do you think about renaming it to sb_has_strict_encoding()? These comments apply equally to patches 3 and 4. Other than that, Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi