Whamcloud - gitweb
LU-16345 ofd: ofd_commitrw_read() with non-existing object
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 28 Nov 2022 09:17:25 +0000 (12:17 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 30 Jan 2023 23:46:00 +0000 (23:46 +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.

Lustre-change: https://review.whamcloud.com/49255
Lustre-commit: 5efc4c1cb4f2d0680992188d587f583e7a567a09

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibe9413de41c23b1b4f6d52e9b17a06590b3c0726
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49809
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ofd/ofd_io.c

index a61ae8b..1fb4dd5 100644 (file)
@@ -975,7 +975,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);