From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Daniel Rosenberg <drosen@google.com>
Cc: "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,
Eric Biggers <ebiggers@kernel.org>,
linux-fscrypt@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org,
Andreas Dilger <adilger.kernel@dilger.ca>,
Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH v6 1/5] unicode: Add standard casefolded d_ops
Date: Sun, 02 Feb 2020 20:45:59 -0500 [thread overview]
Message-ID: <85sgjsxx2g.fsf@collabora.com> (raw)
In-Reply-To: <20200128230328.183524-2-drosen@google.com> (Daniel Rosenberg's message of "Tue, 28 Jan 2020 15:03:24 -0800")
Daniel Rosenberg <drosen@google.com> writes:
> diff --git a/include/linux/unicode.h b/include/linux/unicode.h
> index 990aa97d80496..5de313abeaf98 100644
> --- a/include/linux/unicode.h
> +++ b/include/linux/unicode.h
> @@ -4,6 +4,8 @@
>
> #include <linux/init.h>
> #include <linux/dcache.h>
> +#include <linux/fscrypt.h>
> +#include <linux/fs.h>
>
> struct unicode_map {
> const char *charset;
> @@ -30,4 +32,19 @@ int utf8_casefold(const struct unicode_map *um, const struct qstr *str,
> struct unicode_map *utf8_load(const char *version);
> void utf8_unload(struct unicode_map *um);
>
> +int utf8_ci_d_hash(const struct dentry *dentry, struct qstr *str);
> +int utf8_ci_d_compare(const struct dentry *dentry, unsigned int len,
> + const char *str, const struct qstr *name);
I don't think fs/unicode is the right place for these very specific
filesystem functions, just because they happen to use unicode. It is an
encoding library, it doesn't care about dentries, nor should know how to
handle them. It exposes a simple api to manipulate and convert utf8 strings.
I saw change was after the desire to not have these functions polluting
the VFS hot path, but that has nothing to do with placing them here.
Would libfs be better? or a casefolding library in fs/casefold.c?
--
Gabriel Krisman Bertazi
WARNING: multiple messages have this Message-ID (diff)
From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Daniel Rosenberg <drosen@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Jonathan Corbet <corbet@lwn.net>,
Richard Weinberger <richard@nod.at>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Eric Biggers <ebiggers@kernel.org>,
linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,
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 v6 1/5] unicode: Add standard casefolded d_ops
Date: Sun, 02 Feb 2020 20:45:59 -0500 [thread overview]
Message-ID: <85sgjsxx2g.fsf@collabora.com> (raw)
In-Reply-To: <20200128230328.183524-2-drosen@google.com> (Daniel Rosenberg's message of "Tue, 28 Jan 2020 15:03:24 -0800")
Daniel Rosenberg <drosen@google.com> writes:
> diff --git a/include/linux/unicode.h b/include/linux/unicode.h
> index 990aa97d80496..5de313abeaf98 100644
> --- a/include/linux/unicode.h
> +++ b/include/linux/unicode.h
> @@ -4,6 +4,8 @@
>
> #include <linux/init.h>
> #include <linux/dcache.h>
> +#include <linux/fscrypt.h>
> +#include <linux/fs.h>
>
> struct unicode_map {
> const char *charset;
> @@ -30,4 +32,19 @@ int utf8_casefold(const struct unicode_map *um, const struct qstr *str,
> struct unicode_map *utf8_load(const char *version);
> void utf8_unload(struct unicode_map *um);
>
> +int utf8_ci_d_hash(const struct dentry *dentry, struct qstr *str);
> +int utf8_ci_d_compare(const struct dentry *dentry, unsigned int len,
> + const char *str, const struct qstr *name);
I don't think fs/unicode is the right place for these very specific
filesystem functions, just because they happen to use unicode. It is an
encoding library, it doesn't care about dentries, nor should know how to
handle them. It exposes a simple api to manipulate and convert utf8 strings.
I saw change was after the desire to not have these functions polluting
the VFS hot path, but that has nothing to do with placing them here.
Would libfs be better? or a casefolding library in fs/casefold.c?
--
Gabriel Krisman Bertazi
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Daniel Rosenberg <drosen@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Jonathan Corbet <corbet@lwn.net>,
Richard Weinberger <richard@nod.at>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Chao Yu <chao@kernel.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Eric Biggers <ebiggers@kernel.org>,
linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,
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: [PATCH v6 1/5] unicode: Add standard casefolded d_ops
Date: Sun, 02 Feb 2020 20:45:59 -0500 [thread overview]
Message-ID: <85sgjsxx2g.fsf@collabora.com> (raw)
In-Reply-To: <20200128230328.183524-2-drosen@google.com> (Daniel Rosenberg's message of "Tue, 28 Jan 2020 15:03:24 -0800")
Daniel Rosenberg <drosen@google.com> writes:
> diff --git a/include/linux/unicode.h b/include/linux/unicode.h
> index 990aa97d80496..5de313abeaf98 100644
> --- a/include/linux/unicode.h
> +++ b/include/linux/unicode.h
> @@ -4,6 +4,8 @@
>
> #include <linux/init.h>
> #include <linux/dcache.h>
> +#include <linux/fscrypt.h>
> +#include <linux/fs.h>
>
> struct unicode_map {
> const char *charset;
> @@ -30,4 +32,19 @@ int utf8_casefold(const struct unicode_map *um, const struct qstr *str,
> struct unicode_map *utf8_load(const char *version);
> void utf8_unload(struct unicode_map *um);
>
> +int utf8_ci_d_hash(const struct dentry *dentry, struct qstr *str);
> +int utf8_ci_d_compare(const struct dentry *dentry, unsigned int len,
> + const char *str, const struct qstr *name);
I don't think fs/unicode is the right place for these very specific
filesystem functions, just because they happen to use unicode. It is an
encoding library, it doesn't care about dentries, nor should know how to
handle them. It exposes a simple api to manipulate and convert utf8 strings.
I saw change was after the desire to not have these functions polluting
the VFS hot path, but that has nothing to do with placing them here.
Would libfs be better? or a casefolding library in fs/casefold.c?
--
Gabriel Krisman Bertazi
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-02-03 1:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 23:03 [PATCH v6 0/5] Support fof Casefolding and Encryption Daniel Rosenberg
2020-01-28 23:03 ` Daniel Rosenberg
2020-01-28 23:03 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-01-28 23:03 ` [PATCH v6 1/5] unicode: Add standard casefolded d_ops Daniel Rosenberg
2020-01-28 23:03 ` Daniel Rosenberg
2020-01-28 23:03 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-02-03 1:45 ` Gabriel Krisman Bertazi [this message]
2020-02-03 1:45 ` Gabriel Krisman Bertazi
2020-02-03 1:45 ` [f2fs-dev] " Gabriel Krisman Bertazi
2020-02-05 3:05 ` Daniel Rosenberg
2020-02-05 3:05 ` Daniel Rosenberg
2020-02-05 3:05 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-02-05 4:21 ` Gabriel Krisman Bertazi
2020-02-05 4:21 ` Gabriel Krisman Bertazi
2020-02-05 4:21 ` [f2fs-dev] " Gabriel Krisman Bertazi
2020-02-05 23:40 ` Daniel Rosenberg
2020-02-05 23:40 ` Daniel Rosenberg
2020-02-05 23:40 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-01-28 23:03 ` [PATCH v6 2/5] fscrypt: Have filesystems handle their d_ops Daniel Rosenberg
2020-01-28 23:03 ` Daniel Rosenberg
2020-01-28 23:03 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-01-28 23:03 ` [PATCH v6 3/5] f2fs: Handle casefolding with Encryption Daniel Rosenberg
2020-01-28 23:03 ` Daniel Rosenberg
2020-01-28 23:03 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-01-28 23:03 ` [PATCH v6 4/5] ext4: Hande casefolding with encryption Daniel Rosenberg
2020-01-28 23:03 ` Daniel Rosenberg
2020-01-28 23:03 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-01-28 23:03 ` [PATCH v6 5/5] ext4: Optimize match for casefolded encrypted dirs Daniel Rosenberg
2020-01-28 23:03 ` Daniel Rosenberg
2020-01-28 23:03 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
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=85sgjsxx2g.fsf@collabora.com \
--to=krisman@collabora.com \
--cc=adilger.kernel@dilger.ca \
--cc=chao@kernel.org \
--cc=corbet@lwn.net \
--cc=drosen@google.com \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@android.com \
--cc=linux-doc@vger.kernel.org \
--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=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--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.