diff mbox series

[24/27] lustre: llite: Improve sync_io comments

Message ID 20250321130711.3257092-25-jsimmons@infradead.org (mailing list archive)
State New
Headers show
Series lustre: sync to OpenSFS tree July 27, 2023 | expand

Commit Message

James Simmons March 21, 2025, 1:07 p.m. UTC
From: Patrick Farrell <pfarrell@whamcloud.com>

Correct and improve comments on cl_sync_io_wait_recycle.

WC-bug-id: https://jira.whamcloud.com/browse/LU-13805
Lustre-commit: 8fa28e42ce38cb3b6 ("LU-13805 llite: Improve sync_io comments")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50167
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/obdclass/cl_io.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/obdclass/cl_io.c b/fs/lustre/obdclass/cl_io.c
index 99672510aa5a..6132f42b77e5 100644
--- a/fs/lustre/obdclass/cl_io.c
+++ b/fs/lustre/obdclass/cl_io.c
@@ -1259,6 +1259,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)
 {
@@ -1271,10 +1275,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);
 	/**