Whamcloud - gitweb
LU-15994 llite: use fatal_signal_pending in range_lock 06/48106/1
authorQian Yingjin <qian@ddn.com>
Tue, 2 Aug 2022 09:14:48 +0000 (05:14 -0400)
committerQian Yingjin <qian@ddn.com>
Tue, 2 Aug 2022 09:31:53 +0000 (05:31 -0400)
FIO io_uring failed with one file shared by two FIO processes
under Unubtu 2204 kernel.
After analyzed, we found that range_lock() function return
-ERESTARTSYS when there pending signal on current process in
Lustre I/O. This causes -EINTR returned to the application.

we solve this bug by replacing @signal_pending(current) with
@fatal_signal_pending(current) in range_lock(). The range_lock()
function only returns -ERESTARTSYS when the current process has
fatal pending signal such as SIGKILL.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I0a0be8fa3b4ba5c89f7866286b2bdc6595f18026

lustre/obdclass/range_lock.c

index ae3ed9a..86a8fb5 100644 (file)
@@ -166,7 +166,7 @@ int range_lock(struct range_lock_tree *tree, struct range_lock *lock)
                spin_unlock(&tree->rlt_lock);
                schedule();
 
-               if (signal_pending(current)) {
+               if (fatal_signal_pending(current)) {
                        range_unlock(tree, lock);
                        GOTO(out, rc = -ERESTARTSYS);
                }