Whamcloud - gitweb
LU-12137 osd-ldiskfs: have scrub code handle NULL dentry inode 80/35580/5
authorJames Simmons <jsimmons@infradead.org>
Sat, 3 Aug 2019 13:46:31 +0000 (09:46 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Aug 2019 07:54:37 +0000 (07:54 +0000)
commitc2134f1e55150c6f7add284d8bf3c32a445ab235
treedd8882b6712fa35d376b371cee7fb4991e52443d
parenta0ed8ac61e199993afe28f58801fa0182e69a2f8
LU-12137 osd-ldiskfs: have scrub code handle NULL dentry inode

With the goal of making what is currently osd_ios_lookup_one_len()
used outside of the scrub code move the special handling of the
inode of the dentry being NULL out of the function. This leads to
making the scrub code more clear.

Most calls to osd_ios_lookup_one_len() are followed by a call to
osd_ios_scan_one() passing child->d_inode as the 4th arg.
To handle those cases, osd_ios_scan_one() is changed to
return -ENOENT when the fourth arg is NULL.  The remaining
cases require
    child->d_inode==NULL
to be handled explicitly.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: Ib52d7e5ee9b1e88af830cd85f8c8841b2e7ac16f
Reviewed-on: https://review.whamcloud.com/35580
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_scrub.c