Whamcloud - gitweb
LU-16345 ofd: ofd_commitrw_read() with non-existing object 55/49255/6
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 28 Nov 2022 09:17:25 +0000 (12:17 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 27 Jan 2023 00:34:38 +0000 (00:34 +0000)
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 <bzzz@whamcloud.com>
Change-Id: Ibe9413de41c23b1b4f6d52e9b17a06590b3c0726
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49255
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ofd/ofd_io.c

index ac6d56c..dbf6a22 100644 (file)
@@ -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);