Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3358521pxk; Mon, 21 Sep 2020 11:30:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymoJrS1CyRtgvUrtflN/sRPpQPnWG9twCJU66RlAdOx6PmJBJSJc//G8cKkvWsY0ChGjzk X-Received: by 2002:a50:fa94:: with SMTP id w20mr258359edr.206.1600713032159; Mon, 21 Sep 2020 11:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600713032; cv=none; d=google.com; s=arc-20160816; b=rXRNDjCGE7gMR3miDKiZB0yprUN9ULqqy2HVc4vsZu8ZNFbWij78xhSA3ctWGIAaRO IFo2rElGOi1oD0f3vK+qmQN9YnNtT3eKJtnVoiyD2j2B92tiujtBH+RHkp9Hr5bxMoc+ 7lGY4CHJ9fLXZwy5Y/vZUxQBy2oQExjiIXES3jvab0Uy4vUs7oVAst4sRlDYagZUnWhu 66TH1cBAgSgcK64Nckg2vAJl29UmWGdo28FaqYSqqxTG55GbHbtVmt3QmddVKXUeyfsS i8mUQHazeQXXNOydYApiNM3ElRpSZym6MnqAyBJFBBcM4FCZycrsleGCUdDKBNZSIn0V kl+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+3oLhdr8w+XAMAcjdV9Rr25rnzs8e4/4Eqnd3yjHUug=; b=lLMgF3+1yEidln884U2mOBMqtHhIHtCSQKojyAczbJAOU60s+Yh8hyYYt36LgVqpR2 9kwrVV3amCjtSS9OJpFIiaetFTuh3m1y8W1J0Vo4meck6+AEeE8jeaGNyFsA5aYfIhoP 4pRhWGd/h0Jjgn38ynCmrmJClmZQCrfZ1WumP7I/0A9YgV7q5oDM5ZxYIUGaqEaIt8qH oWGZBOKpKt69l6RhJmPRI7xi0/3Vu9FAfXtnaiaTf1/iF13NfRrM8en0Ssa/OPptXGFy pKt+JLF16xwxn1R4HvNqdoCmNqFbgbhstIZW+G2gVKfUxL+Nq64tY8+rQ05stXvn+zd9 W1Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eeL3T5WA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si8868583ejy.39.2020.09.21.11.29.55; Mon, 21 Sep 2020 11:30:32 -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; dkim=pass header.i=@kernel.org header.s=default header.b=eeL3T5WA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727348AbgIUS3u (ORCPT + 99 others); Mon, 21 Sep 2020 14:29:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:35026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbgIUS3u (ORCPT ); Mon, 21 Sep 2020 14:29:50 -0400 Received: from gmail.com (unknown [104.132.1.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DC2A220758; Mon, 21 Sep 2020 18:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600712990; bh=xfKd1sWDGNhVdepPEKC1RdDT0tu6IQ/iGDe1bIAhKWE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eeL3T5WAha4l7IADwnyUubjJZSCetFw5JMJ+kxtH/TvUthibhmb+DvBnGmWcChcbt iE30z75SNSivfly/Ae3pYKjc5xglPEaExNgz/vjPN/BEKGQ2BYDU8wDgNsNkKBn1Cm QSWUJ0N/kinYBsYwIrCEsanyApVuhkGpI+Dtzz9Y= Date: Mon, 21 Sep 2020 11:29:48 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: Daniel Rosenberg , Theodore Ts'o , linux-ext4@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, Alexander Viro , Andreas Dilger , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v12 4/4] ext4: Use generic casefolding support Message-ID: <20200921182948.GA885472@gmail.com> References: <20200708091237.3922153-1-drosen@google.com> <20200708091237.3922153-5-drosen@google.com> <87lfh4djdq.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lfh4djdq.fsf@collabora.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sun, Sep 20, 2020 at 09:10:57PM -0400, Gabriel Krisman Bertazi wrote: > 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 We couldn't get a response from Ted, so instead Jaegeuk has applied patches 1-3 to f2fs/dev for 5.10. Hopefully Ted will take the ext4 patch for 5.11. I believe that Daniel is planning to resend the actual encryption+casefolding support soon, but initially only for f2fs since that will be ready first. - Eric