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=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 BB0EEC43468 for ; Mon, 21 Sep 2020 01:11:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FAE4207EA for ; Mon, 21 Sep 2020 01:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbgIUBLF (ORCPT ); Sun, 20 Sep 2020 21:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726253AbgIUBLE (ORCPT ); Sun, 20 Sep 2020 21:11:04 -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 98606C061755; Sun, 20 Sep 2020 18:11:04 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id CA5D628BA5A 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 , Andreas Dilger , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@android.com, Eric Biggers Subject: Re: [PATCH v12 4/4] ext4: Use generic casefolding support Organization: Collabora References: <20200708091237.3922153-1-drosen@google.com> <20200708091237.3922153-5-drosen@google.com> Date: Sun, 20 Sep 2020 21:10:57 -0400 In-Reply-To: <20200708091237.3922153-5-drosen@google.com> (Daniel Rosenberg's message of "Wed, 8 Jul 2020 02:12:37 -0700") Message-ID: <87lfh4djdq.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Daniel Rosenberg writes: > This switches ext4 over to the generic support provided in > the previous patch. > > Since casefolded dentries behave the same in ext4 and f2fs, we decrease > the maintenance burden by unifying them, and any optimizations will > immediately apply to both. > > Signed-off-by: Daniel Rosenberg > Reviewed-by: Eric Biggers > > #ifdef CONFIG_UNICODE > - if (EXT4_SB(parent->i_sb)->s_encoding && IS_CASEFOLDED(parent)) { > + if (parent->i_sb->s_encoding && IS_CASEFOLDED(parent)) { > if (fname->cf_name.name) { > struct qstr cf = {.name = fname->cf_name.name, > .len = fname->cf_name.len}; > @@ -2171,9 +2171,6 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry, > struct buffer_head *bh = NULL; > struct ext4_dir_entry_2 *de; > struct super_block *sb; > -#ifdef CONFIG_UNICODE > - struct ext4_sb_info *sbi; > -#endif > struct ext4_filename fname; > int retval; > int dx_fallback=0; > @@ -2190,9 +2187,8 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry, > return -EINVAL; > > #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_strict_encoding(sb) && IS_CASEFOLDED(dir) && > + sb->s_encoding && utf8_validate(sb->s_encoding, &dentry->d_name)) > return -EINVAL; hm, just noticed the sb->s_encoding check here is superfluous, since the has_strict_mode() cannot be true if !s_encoding. Not related to this patch though. Daniel, are you still working on getting this upstream? The fscrypt support would be very useful for us. :) In the hope this will get upstream, as its been flying for a while and looks correct. 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=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 C5B99C43465 for ; Mon, 21 Sep 2020 01:11:30 +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 3E6F4207EA for ; Mon, 21 Sep 2020 01:11:30 +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="f5/je+Hz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="L3ptdFcx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E6F4207EA 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-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kKAMZ-0001uP-Ss; Mon, 21 Sep 2020 01:11:27 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKAMY-0001uH-4q for linux-f2fs-devel@lists.sourceforge.net; Mon, 21 Sep 2020 01:11:26 +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=9hx8NHoxrgAmUHDrDlml2tjQ7eVsFxqE7uamyQPaNuo=; b=f5/je+Hz7Lv/qWs48lHBzDzxJy GEXsByaEU0+pWOET8F7pXT59aRUiSLsTNpW4ae1dGJGN1t1jKFTHA7PTiLVWq2PltYzYfHOtHZ+QL f4ZghxU1rpv9bMbIOW0vKmwfw6pl07QSUhy8FQ1djpnYwAdS1ZnSDCxycunRg7DJ84FM=; 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=9hx8NHoxrgAmUHDrDlml2tjQ7eVsFxqE7uamyQPaNuo=; b=L3ptdFcxJEPVBJi/qeKVQn0V0F 9lFAiUJP/Be7oTxRWSwf2xAq61M5YLstIu12s3HbzUhJtoEurp2rKEryMMtBgHImNo7gw3ILx6re3 3Q7+hKpH7pEGEe8DVIdegrziR5uQiQyqR4FoRlX3kDlXUGUPzB/3KVFq/c/Rx4TA7JyA=; 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 1kKAMS-001Aks-VC for linux-f2fs-devel@lists.sourceforge.net; Mon, 21 Sep 2020 01:11:26 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id CA5D628BA5A From: Gabriel Krisman Bertazi To: Daniel Rosenberg Organization: Collabora References: <20200708091237.3922153-1-drosen@google.com> <20200708091237.3922153-5-drosen@google.com> Date: Sun, 20 Sep 2020 21:10:57 -0400 In-Reply-To: <20200708091237.3922153-5-drosen@google.com> (Daniel Rosenberg's message of "Wed, 8 Jul 2020 02:12:37 -0700") Message-ID: <87lfh4djdq.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Headers-End: 1kKAMS-001Aks-VC Subject: Re: [f2fs-dev] [PATCH v12 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 , Eric Biggers , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Eric Biggers , linux-fscrypt@vger.kernel.org, Andreas Dilger , 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: > This switches ext4 over to the generic support provided in > the previous patch. > > Since casefolded dentries behave the same in ext4 and f2fs, we decrease > the maintenance burden by unifying them, and any optimizations will > immediately apply to both. > > Signed-off-by: Daniel Rosenberg > Reviewed-by: Eric Biggers > > #ifdef CONFIG_UNICODE > - if (EXT4_SB(parent->i_sb)->s_encoding && IS_CASEFOLDED(parent)) { > + if (parent->i_sb->s_encoding && IS_CASEFOLDED(parent)) { > if (fname->cf_name.name) { > struct qstr cf = {.name = fname->cf_name.name, > .len = fname->cf_name.len}; > @@ -2171,9 +2171,6 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry, > struct buffer_head *bh = NULL; > struct ext4_dir_entry_2 *de; > struct super_block *sb; > -#ifdef CONFIG_UNICODE > - struct ext4_sb_info *sbi; > -#endif > struct ext4_filename fname; > int retval; > int dx_fallback=0; > @@ -2190,9 +2187,8 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry, > return -EINVAL; > > #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_strict_encoding(sb) && IS_CASEFOLDED(dir) && > + sb->s_encoding && utf8_validate(sb->s_encoding, &dentry->d_name)) > return -EINVAL; hm, just noticed the sb->s_encoding check here is superfluous, since the has_strict_mode() cannot be true if !s_encoding. Not related to this patch though. Daniel, are you still working on getting this upstream? The fscrypt support would be very useful for us. :) In the hope this will get upstream, as its been flying for a while and looks correct. 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