Whamcloud - gitweb
LU-13805 llite: Improve sync_io comments 67/50167/15
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 1 Mar 2023 15:43:49 +0000 (10:43 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 27 Jul 2023 07:18:04 +0000 (07:18 +0000)
Correct and improve comments on cl_sync_io_wait_recycle.

Test-parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I7784aa75df46831d1b501c823ec1ada48376b227
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50167
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
lustre/obdclass/cl_io.c

index 9a14e69..e288e42 100644 (file)
@@ -1365,6 +1365,10 @@ void cl_sync_io_note(const struct lu_env *env, struct cl_sync_io *anchor,
 }
 EXPORT_SYMBOL(cl_sync_io_note);
 
+/* this function waits for completion of outstanding io and then re-initializes
+ * the anchor used to track it.  This is used to wait to complete DIO before
+ * returning to userspace, and is never called for true AIO
+ */
 int cl_sync_io_wait_recycle(const struct lu_env *env, struct cl_sync_io *anchor,
                            long timeout, int ioret)
 {
@@ -1377,10 +1381,8 @@ int cl_sync_io_wait_recycle(const struct lu_env *env, struct cl_sync_io *anchor,
         * count to be zero.
         */
        cl_sync_io_note(env, anchor, ioret);
-       /* Wait for completion of normal dio.
-        * This replaces the EIOCBQEUED return from the DIO/AIO
-        * path, and this is where AIO and DIO implementations
-        * split.
+       /* Wait for completion of outstanding dio before re-initializing for
+        * possible restart
         */
        rc = cl_sync_io_wait(env, anchor, timeout);
        /**