After the change
commit
c2b6d621c4ffe9936adf7a55c8b1c769672c306f
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Thu Jun 28 15:53:17 2018 -0400 new primitive: discard_new_inode()
find_inode_fast() returns -ESTALE, but iget_locked() replaces
it to the NULL and finally ldiskfs_inode_attach_jinode()
returns -ENOMEM.
So this check in osd_iit_iget() doesn't work.
if (rc == -ENOENT || rc == -ESTALE)
RETURN(SCRUB_NEXT_CONTINUE);
As a solution we can skip an inode if -ENOMEM returned
Hpe-bug-id: LUS-10833
Change-Id: Icb30610e46e2ab899a512761b63aea248c4f2ada
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Reviewed-on: https://review.whamcloud.com/47079
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if (IS_ERR(inode)) {
rc = PTR_ERR(inode);
/* The inode may be removed after bitmap searching, or the
- * file is new created without inode initialized yet. */
- if (rc == -ENOENT || rc == -ESTALE)
+ * file is new created without inode initialized yet.
+ * LU-15754: After "new primitive: discard_new_inode()" change
+ * in the kernel find_inode_fast() returns -ESTALE, but
+ * iget_locked replaces it to the NULL and finally
+ * ldiskfs_inode_attach_jinode() returns -ENOMEM
+ * Let's skip an inode if -ENOMEM returned.
+ */
+ if (rc == -ENOENT || rc == -ESTALE || rc == -ENOMEM)
RETURN(SCRUB_NEXT_CONTINUE);
CDEBUG(D_LFSCK, "%s: fail to read inode, ino# = %u: "