[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YL6wHViJbCKVGx4K@gmail.com>
Date: Mon, 7 Jun 2021 16:47:41 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Chao Yu <chao@...nel.org>
Cc: jaegeuk@...nel.org, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: introduce cf_name_slab cache
On Tue, Jun 08, 2021 at 07:27:15AM +0800, Chao Yu wrote:
> From: Chao Yu <yuchao0@...wei.com>
>
> Add a slab cache: "f2fs_casefold_name_entry" for memory allocation
> of casefold name.
>
> Signed-off-by: Chao Yu <yuchao0@...wei.com>
> ---
> fs/f2fs/dir.c | 16 ++++++++++------
> fs/f2fs/recovery.c | 6 +++++-
> fs/f2fs/super.c | 24 ++++++++++++++++++++++++
> 3 files changed, 39 insertions(+), 7 deletions(-)
Looks good, but "f2fs_casefolded_name" would be a better name for this cache.
"f2fs_casefold_name_entry" makes it sounds like it contains some bookkeeping
information and not the actual casefolded filenames.
>
> diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
> index 96dcc4aca639..ee400562157d 100644
> --- a/fs/f2fs/dir.c
> +++ b/fs/f2fs/dir.c
> @@ -16,6 +16,10 @@
> #include "xattr.h"
> #include <trace/events/f2fs.h>
>
> +#ifdef CONFIG_UNICODE
> +extern struct kmem_cache *cf_name_slab;
> +#endif
Also this variable needs to be prefixed with "f2fs_". Otherwise this will cause
a build error if/when ext4 adds the same thing.
- Eric
Powered by blists - more mailing lists