2017-07-12 04:05:26

by Liu, Emoly

[permalink] [raw]
Subject: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache

For Lustre, if ea_inode fails in hash validation but passes parent
inode and generation checks, it won't be added to the cache as well
as the error "-EFSCORRUPTED" should be cleared, otherwise it will
cause "Structure needs cleaning" when running getfattr command.

Signed-off-by: Emoly Liu <[email protected]>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723
---
fs/ext4/xattr.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index cff4f41..de217a0 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -451,6 +451,7 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
}
/* Do not add ea_inode to the cache. */
ea_inode_cache = NULL;
+ err = 0;
} else if (err)
goto out;

--
1.8.3.1


2017-07-12 04:37:18

by Tahsin Erdogan

[permalink] [raw]
Subject: Re: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache

Reviewed-by: [email protected]

On Tue, Jul 11, 2017 at 8:56 PM, Emoly Liu <[email protected]> wrote:
> For Lustre, if ea_inode fails in hash validation but passes parent
> inode and generation checks, it won't be added to the cache as well
> as the error "-EFSCORRUPTED" should be cleared, otherwise it will
> cause "Structure needs cleaning" when running getfattr command.
>
> Signed-off-by: Emoly Liu <[email protected]>
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723
> ---
> fs/ext4/xattr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
> index cff4f41..de217a0 100644
> --- a/fs/ext4/xattr.c
> +++ b/fs/ext4/xattr.c
> @@ -451,6 +451,7 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
> }
> /* Do not add ea_inode to the cache. */
> ea_inode_cache = NULL;
> + err = 0;
> } else if (err)
> goto out;
>
> --
> 1.8.3.1
>

2017-07-13 05:17:58

by Andreas Dilger

[permalink] [raw]
Subject: Re: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache

On Jul 11, 2017, at 9:37 PM, Tahsin Erdogan <[email protected]> wrote:
>
> Reviewed-by: [email protected]
>
> On Tue, Jul 11, 2017 at 8:56 PM, Emoly Liu <[email protected]> wrote:
>> For Lustre, if ea_inode fails in hash validation but passes parent
>> inode and generation checks, it won't be added to the cache as well
>> as the error "-EFSCORRUPTED" should be cleared, otherwise it will
>> cause "Structure needs cleaning" when running getfattr command.
>>
>> Signed-off-by: Emoly Liu <[email protected]>

Reviewed-by: Andreas Dilger <[email protected]>

This could also include:

Fixes: dec214d00e0d78a08b947d7dccdfdb84407a9f4d

unless this fix is merged into the original patch.

>> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723
>> ---
>> fs/ext4/xattr.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
>> index cff4f41..de217a0 100644
>> --- a/fs/ext4/xattr.c
>> +++ b/fs/ext4/xattr.c
>> @@ -451,6 +451,7 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
>> }
>> /* Do not add ea_inode to the cache. */
>> ea_inode_cache = NULL;
>> + err = 0;
>> } else if (err)
>> goto out;




Cheers, Andreas






Attachments:
signature.asc (195.00 B)
Message signed with OpenPGP

2017-07-17 02:12:38

by Liu, Emoly

[permalink] [raw]
Subject: RE: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache

Hi,

This patch needs to be included into the release along with the ea_inode feature to maintain proper feature compatibility with Lustre.
Could it be landed as soon as possible?

Thanks,
Emoly

-----Original Message-----
From: Emoly Liu [mailto:[email protected]]
Sent: Wednesday, July 12, 2017 11:57 AM
To: [email protected]
Cc: [email protected]; Liu, Emoly <[email protected]>
Subject: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache

For Lustre, if ea_inode fails in hash validation but passes parent inode and generation checks, it won't be added to the cache as well as the error "-EFSCORRUPTED" should be cleared, otherwise it will cause "Structure needs cleaning" when running getfattr command.

Signed-off-by: Emoly Liu <[email protected]>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723
---
fs/ext4/xattr.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index cff4f41..de217a0 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -451,6 +451,7 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
}
/* Do not add ea_inode to the cache. */
ea_inode_cache = NULL;
+ err = 0;
} else if (err)
goto out;

--
1.8.3.1

2017-07-31 04:43:27

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache

On Mon, Jul 17, 2017 at 02:12:34AM +0000, Liu, Emoly wrote:
> Hi,
>
> This patch needs to be included into the release along with the ea_inode feature to maintain proper feature compatibility with Lustre.
> Could it be landed as soon as possible?

Thanks, applied. It will be pushed to Linus before 4.13 is released.

- Ted