[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D35BB94C-7466-42BF-8E63-E974E70A7C2D@dilger.ca>
Date: Fri, 4 May 2018 03:03:35 -0600
From: Andreas Dilger <adilger@...ger.ca>
To: Artem Blagodarenko <artem.blagodarenko@...il.com>
Cc: Ext4 Developers List <linux-ext4@...r.kernel.org>,
Zhenyu Xu <bobijam.xu@...el.com>,
Manisha Salve <msalve@....com>,
Pravin Shelar <pravin@...sterfs.com>
Subject: Re: [PATCH v4 1/7] e2fsck: add support for dirdata feature
On May 4, 2018, at 1:09 AM, c17828 <artem.blagodarenko@...il.com> wrote:
>
> From: Andreas Dilger <andreas.dilger@...el.com>
>
> Add support for the INCOMPAT_DIRDATA feature, which allows
> storing extra data in the directory entry beyond the name.
> This allows the Lustre File IDentifier to be accessed in
> an efficient manner, and would be useful for expanding a
> filesystem to allow more than 2^32 inodes in the future.
>
> Lustre-bug: https://jira.hpdd.intel.com/browse/LU-4677
> Signed-off-by: Pravin Shelar <pravin@...sterfs.com>
> Signed-off-by: Andreas Dilger <andreas.dilger@...el.com>
> Signed-off-by: Artem Blagodarenko <artem.blagodarenko@...il.com>
> ---
>
> +/*
> + * check for dirent data in ext3 dirent.
> + * return 0 if dirent data is ok.
> + * return 1 if dirent data does not exist.
> + * return 2 if dirent was modified due to error.
> + */
> +int e2fsck_check_dirent_data(e2fsck_t ctx, struct ext2_dir_entry *de,
> + unsigned int offset, struct problem_context *pctx)
> +{
> + if (!(ctx->fs->super->s_feature_incompat &
> + EXT4_FEATURE_INCOMPAT_DIRDATA)) {
This should use:
if (ext2fs_has_feature_incompat_dirdata(ctx->fs->super)) {
but it wasn't in the original patch since those macros didn't exist back then.
However, it looks like the EXT4_FEATURE_INCOMPAT_FUNCS(dirdata, 4, DIRDATA)
macro already exists in both e2fsprogs and the kernel, so it doesn't need to
be added.
> #endif /* _LINUX_EXT2_FS_H */
> diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
> index 6774e32c..fbe4398f 100644
> --- a/lib/ext2fs/ext2fs.h
> +++ b/lib/ext2fs/ext2fs.h
>
> +_INLINE_ struct ext2_dx_root_info *get_ext2_dx_root_info(ext2_filsys fs,
> + char *buf)
> +{
> + struct ext2_dir_entry *de = (struct ext2_dir_entry *)buf;
> +
> + if (!(fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_DIRDATA))
Similarly, this should use the proper macro:
if (!ext2fs_has_feature_incompat_dirdata(fs->super))
Cheers, Andreas
Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)
Powered by blists - more mailing lists