From: Eric Biggers <ebiggers@kernel.org>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: Daniel Rosenberg <drosen@google.com>,
Theodore Ts'o <tytso@mit.edu>,
linux-ext4@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
Chao Yu <chao@kernel.org>,
linux-f2fs-devel@lists.sourceforge.net,
linux-fscrypt@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andreas Dilger <adilger.kernel@dilger.ca>,
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
Date: Mon, 21 Sep 2020 11:29:48 -0700 [thread overview]
Message-ID: <20200921182948.GA885472@gmail.com> (raw)
In-Reply-To: <87lfh4djdq.fsf@collabora.com>
On Sun, Sep 20, 2020 at 09:10:57PM -0400, Gabriel Krisman Bertazi wrote:
> Daniel Rosenberg <drosen@google.com> 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 <drosen@google.com>
> > Reviewed-by: Eric Biggers <ebiggers@google.com>
> >
> > #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 <krisman@collabora.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
Daniel Rosenberg <drosen@google.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-fscrypt@vger.kernel.org,
Andreas Dilger <adilger.kernel@dilger.ca>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
linux-ext4@vger.kernel.org, kernel-team@android.com
Subject: Re: [f2fs-dev] [PATCH v12 4/4] ext4: Use generic casefolding support
Date: Mon, 21 Sep 2020 11:29:48 -0700 [thread overview]
Message-ID: <20200921182948.GA885472@gmail.com> (raw)
In-Reply-To: <87lfh4djdq.fsf@collabora.com>
On Sun, Sep 20, 2020 at 09:10:57PM -0400, Gabriel Krisman Bertazi wrote:
> Daniel Rosenberg <drosen@google.com> 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 <drosen@google.com>
> > Reviewed-by: Eric Biggers <ebiggers@google.com>
> >
> > #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 <krisman@collabora.com>
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
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2020-09-21 18:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 9:12 [PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches Daniel Rosenberg
2020-07-08 9:12 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-07-08 9:12 ` [PATCH v12 1/4] unicode: Add utf8_casefold_hash Daniel Rosenberg
2020-07-08 9:12 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-07-08 9:12 ` [PATCH v12 2/4] fs: Add standard casefolding support Daniel Rosenberg
2020-07-08 9:12 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-07-08 15:49 ` Eric Biggers
2020-07-08 15:49 ` [f2fs-dev] " Eric Biggers
2020-07-08 9:12 ` [PATCH v12 3/4] f2fs: Use generic " Daniel Rosenberg
2020-07-08 9:12 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-07-08 17:08 ` Jaegeuk Kim
2020-07-08 17:08 ` [f2fs-dev] " Jaegeuk Kim
2020-07-08 9:12 ` [PATCH v12 4/4] ext4: " Daniel Rosenberg
2020-07-08 9:12 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-09-21 1:10 ` Gabriel Krisman Bertazi
2020-09-21 1:10 ` [f2fs-dev] " Gabriel Krisman Bertazi
2020-09-21 18:29 ` Eric Biggers [this message]
2020-09-21 18:29 ` Eric Biggers
2020-09-22 6:18 ` Daniel Rosenberg
2020-09-22 6:18 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-07-20 17:09 ` [PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches Eric Biggers
2020-07-20 17:09 ` [f2fs-dev] " Eric Biggers
2020-07-27 16:45 ` Eric Biggers
2020-07-27 16:45 ` [f2fs-dev] " Eric Biggers
2020-08-24 23:00 ` Eric Biggers
2020-08-24 23:00 ` [f2fs-dev] " Eric Biggers
2020-08-24 23:32 ` Jaegeuk Kim
2020-08-24 23:32 ` [f2fs-dev] " Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200921182948.GA885472@gmail.com \
--to=ebiggers@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=chao@kernel.org \
--cc=drosen@google.com \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@android.com \
--cc=krisman@collabora.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.