public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache
@ 2017-07-12  3:56 Emoly Liu
  2017-07-12  4:37 ` Tahsin Erdogan
  2017-07-17  2:12 ` Liu, Emoly
  0 siblings, 2 replies; 5+ messages in thread
From: Emoly Liu @ 2017-07-12  3:56 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4, Emoly Liu

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 <emoly.liu@intel.com>
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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache
  2017-07-12  3:56 [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache Emoly Liu
@ 2017-07-12  4:37 ` Tahsin Erdogan
  2017-07-13  5:17   ` Andreas Dilger
  2017-07-17  2:12 ` Liu, Emoly
  1 sibling, 1 reply; 5+ messages in thread
From: Tahsin Erdogan @ 2017-07-12  4:37 UTC (permalink / raw)
  To: Emoly Liu; +Cc: Theodore Ts'o, Ext4 Developers List

Reviewed-by: tahsin@google.com

On Tue, Jul 11, 2017 at 8:56 PM, Emoly Liu <emoly.liu@intel.com> 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 <emoly.liu@intel.com>
> 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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache
  2017-07-12  4:37 ` Tahsin Erdogan
@ 2017-07-13  5:17   ` Andreas Dilger
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Dilger @ 2017-07-13  5:17 UTC (permalink / raw)
  To: Tahsin Erdogan; +Cc: Emoly Liu, Theodore Ts'o, Ext4 Developers List

[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]

On Jul 11, 2017, at 9:37 PM, Tahsin Erdogan <tahsin@google.com> wrote:
> 
> Reviewed-by: tahsin@google.com
> 
> On Tue, Jul 11, 2017 at 8:56 PM, Emoly Liu <emoly.liu@intel.com> 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 <emoly.liu@intel.com>

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

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






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache
  2017-07-12  3:56 [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache Emoly Liu
  2017-07-12  4:37 ` Tahsin Erdogan
@ 2017-07-17  2:12 ` Liu, Emoly
  2017-07-31  4:43   ` Theodore Ts'o
  1 sibling, 1 reply; 5+ messages in thread
From: Liu, Emoly @ 2017-07-17  2:12 UTC (permalink / raw)
  To: tytso@mit.edu; +Cc: linux-ext4@vger.kernel.org

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:emoly.liu@intel.com] 
Sent: Wednesday, July 12, 2017 11:57 AM
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org; Liu, Emoly <emoly.liu@intel.com>
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 <emoly.liu@intel.com>
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache
  2017-07-17  2:12 ` Liu, Emoly
@ 2017-07-31  4:43   ` Theodore Ts'o
  0 siblings, 0 replies; 5+ messages in thread
From: Theodore Ts'o @ 2017-07-31  4:43 UTC (permalink / raw)
  To: Liu, Emoly; +Cc: linux-ext4@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-31  4:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12  3:56 [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache Emoly Liu
2017-07-12  4:37 ` Tahsin Erdogan
2017-07-13  5:17   ` Andreas Dilger
2017-07-17  2:12 ` Liu, Emoly
2017-07-31  4:43   ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox