Whamcloud - gitweb
LU-15754 lfsck: skip an inode if iget() returns -ENOMEM 79/47079/2
authorArtem Blagodarenko <artem.blagodarenko@gmail.com>
Wed, 13 Apr 2022 20:01:58 +0000 (16:01 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 6 Jun 2022 06:27:39 +0000 (06:27 +0000)
commit9523e99046b9d03ab1e5b75622e1f80e02fcc8e9
tree2d9d0c1bd77d99ec93894c1c69aa87beae786fb8
parentaa6250b7412e7baf6760fe4010a81f4f22187127
LU-15754 lfsck: skip an inode if iget() returns -ENOMEM

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>
lustre/osd-ldiskfs/osd_scrub.c