From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0FE1C433E0 for ; Wed, 24 Jun 2020 05:43:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAAAA20768 for ; Wed, 24 Jun 2020 05:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388470AbgFXFn2 (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B55C3C433E0 for ; Wed, 24 Jun 2020 05:43:37 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8757A20768 for ; Wed, 24 Jun 2020 05:43:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="dRfIhpOD"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="bduxOYUD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8757A20768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jnyC9-0008Sq-7S; Wed, 24 Jun 2020 05:43:37 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnyC8-0008Sj-6Q for linux-f2fs-devel@lists.sourceforge.net; Wed, 24 Jun 2020 05:43:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To: Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xB+6J0O4jzl4NVJI8LmAon6D5LOR+VQ3DLNB2klpNMw=; b=dRfIhpODzevqDr0IYU5BPSc+Ye ORjlCAc8dQROhpR6MtndfAXvgVEaFlISd4NntK/ziUXeFI2pQu/4ZJaC/6yUBnaMTTihvuN1QCqEy Y4eAKuFKx/cjkwdox/ey9jISp3zP4Kdtmuw9k7aGmY8vpjEydEQoDvYiwBseuqolxW1c=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject: Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xB+6J0O4jzl4NVJI8LmAon6D5LOR+VQ3DLNB2klpNMw=; b=bduxOYUDJKvy0tCzWNUSLitecL aXmRV5Dq+kKj3DH3OReGH8wM1FCuJJNZPjRVmNxDVvUcW0vMmX1/0gvLk0E5kXTcPYFhdwFhIn6Uq m22T0wmN3L7omauPC0B7T3PRQ8UT8mKH9YU+BC7L3TaN4gThagSVozKRXz+87g3DxCUE=; Received: from bhuna.collabora.co.uk ([46.235.227.227]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jnyC6-00GBva-NC for linux-f2fs-devel@lists.sourceforge.net; Wed, 24 Jun 2020 05:43:36 +0000 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 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 X-Headers-End: 1jnyC6-00GBva-NC Subject: Re: [f2fs-dev] [PATCH v9 4/4] ext4: Use generic casefolding support X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Theodore Ts'o , Jonathan Corbet , Richard Weinberger , Andreas Dilger , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Eric Biggers , linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org, Alexander Viro , linux-fsdevel@vger.kernel.org, Jaegeuk Kim , linux-ext4@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FA52C433DF for ; Wed, 24 Jun 2020 05:44:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E1D320768 for ; Wed, 24 Jun 2020 05:44:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jsAWZ4/s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E1D320768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PuB4mrZEe9KOGYcDXf3WLZT6TiwOujfEX/zU6jei1ec=; b=jsAWZ4/sM9ThgpRjdgvX5HPD3 Z+if9G0DX2MVyXcto1AqVdDFWCxpVHlxZZJRChevS7uXP576uokJhLlLNfMokQxn10QXfboLFMXOJ Nsuvop2L6+htydyZFDU3vD+w4uxpxGDR1CIhdc5Es6I8S7GZDgH+imdG2pGJPcwRjBl58ChcjDxS3 l0jJVRnoYFoKtxgO27wEmftmugjn84FbbvBXseHrg6rmap+mq7Chc2cxO6FWbJ+3Vl+5pgSE89qMh JxJ0TJOe2GP88V7dPHuoxwAGiPJSJpNcrlDEBc4e9LvxITJB4XfGSb7gfS2OMtqJFlUMNoHHGtmS9 j2Z3eeqpw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnyC7-0001Rk-3v; Wed, 24 Jun 2020 05:43:35 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnyC4-0001P2-1W for linux-mtd@lists.infradead.org; Wed, 24 Jun 2020 05:43:32 +0000 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 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 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Theodore Ts'o , Jonathan Corbet , Richard Weinberger , Andreas Dilger , Chao Yu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Eric Biggers , linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org, Alexander Viro , linux-fsdevel@vger.kernel.org, Jaegeuk Kim , linux-ext4@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/