From: Alexander Boyko Date: Thu, 30 Jul 2020 12:04:27 +0000 (-0400) Subject: LU-13608 out: don't return einprogress error X-Git-Tag: 2.12.7-RC1~78 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=7817acc39ee1d6859c2737f75619748dc8e37f95;p=fs%2Flustre-release.git LU-13608 out: don't return einprogress error When out_handle proccess an update request it could happened that file doesn't exist, osd_fid_lookup triggers scrub and returns EINPROGRESS. Remote MDT would process EINPROGRESS at ptlrpc layer and resend a request in loop, and MDT recovery would be blocked. The fix adds fid to OI for ENOENT, like it was before the LU-7782. So the second attempt with the same fid will return ENOENT. Lustre-change: https://review.whamcloud.com/39538 Lustre-commit: 865aa3f692bccdd9cf7ff6cafeee350e06bb8d76 Signed-off-by: Alexander Boyko HPE-bug-id: LUS-9062 Change-Id: Ib9a1753234ccc773e9b9529195ebfa6e5a8c101c Reviewed-by: Andreas Dilger Reviewed-by: Andriy Skulysh Reviewed-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/41183 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 6d802a2..ffec5c7 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -1268,13 +1268,15 @@ trigger: if (scrub->os_partial_scan && !scrub->os_in_join) goto join; - if (IS_ERR_OR_NULL(inode) || result) + osd_add_oi_cache(info, dev, id, fid); + if (IS_ERR_OR_NULL(inode) || result) { + osd_oii_insert(dev, oic, result == -ENOENT); GOTO(out, result = -EINPROGRESS); + } LASSERT(remote); LASSERT(obj->oo_inode == inode); - osd_add_oi_cache(info, dev, id, fid); osd_oii_insert(dev, oic, true); goto found; } @@ -1297,13 +1299,15 @@ join: if (rc1 && rc1 != -EALREADY) GOTO(out, result = -EREMCHG); - if (IS_ERR_OR_NULL(inode) || result) + osd_add_oi_cache(info, dev, id, fid); + if (IS_ERR_OR_NULL(inode) || result) { + osd_oii_insert(dev, oic, result == -ENOENT); GOTO(out, result = -EINPROGRESS); + } LASSERT(remote); LASSERT(obj->oo_inode == inode); - osd_add_oi_cache(info, dev, id, fid); osd_oii_insert(dev, oic, true); goto found;