From: Alex Zhuravlev Date: Mon, 28 Nov 2022 09:17:25 +0000 (+0300) Subject: LU-16345 ofd: ofd_commitrw_read() with non-existing object X-Git-Tag: 2.15.54~53 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F49255%2F6;p=fs%2Flustre-release.git LU-16345 ofd: ofd_commitrw_read() with non-existing object a client can get evicted during OST_READ's bulk so it's LDLM lock is cancelled and OST_DESTOY can remove the object. ofd_commitrw_read() still needs to release the buffers and ignore the object doesn't exist. Signed-off-by: Alex Zhuravlev Change-Id: Ibe9413de41c23b1b4f6d52e9b17a06590b3c0726 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49255 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- diff --git a/lustre/ofd/ofd_io.c b/lustre/ofd/ofd_io.c index ac6d56c..dbf6a22 100644 --- a/lustre/ofd/ofd_io.c +++ b/lustre/ofd/ofd_io.c @@ -991,7 +991,11 @@ ofd_commitrw_read(const struct lu_env *env, struct ofd_device *ofd, fo = ofd_info(env)->fti_obj; LASSERT(fo != NULL); - LASSERT(ofd_object_exists(fo)); + /* + * there is no guarantee the object still exists as the client + * behind this RPC could have been evicted allowing concurrent + * OST_DESTROY to remove the object. + */ dt_bufs_put(env, ofd_object_child(fo), lnb, niocount); ofd_object_put(env, fo);