Patch "dlm: improve plock logging if interrupted" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dlm: improve plock logging if interrupted

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dlm-improve-plock-logging-if-interrupted.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8a0cb36eefb56a043af051d31ddfd5ff8be023fd
Author: Alexander Aring <aahringo@xxxxxxxxxx>
Date:   Mon Apr 4 16:06:34 2022 -0400

    dlm: improve plock logging if interrupted
    
    [ Upstream commit bcfad4265cedf3adcac355e994ef9771b78407bd ]
    
    This patch changes the log level if a plock is removed when interrupted
    from debug to info. Additional it signals now that the plock entity was
    removed to let the user know what's happening.
    
    If on a dev_write() a pending plock cannot be find it will signal that
    it might have been removed because wait interruption.
    
    Before this patch there might be a "dev_write no op ..." info message
    and the users can only guess that the plock was removed before because
    the wait interruption. To be sure that is the case we log both messages
    on the same log level.
    
    Let both message be logged on info layer because it should not happened
    a lot and if it happens it should be clear why the op was not found.
    
    Signed-off-by: Alexander Aring <aahringo@xxxxxxxxxx>
    Signed-off-by: David Teigland <teigland@xxxxxxxxxx>
    Stable-dep-of: 57e2c2f2d94c ("fs: dlm: fix mismatch of plock results from userspace")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index f3482e936cc25..f74d5a28ad27c 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -161,11 +161,12 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
 
 	rv = wait_event_killable(recv_wq, (op->done != 0));
 	if (rv == -ERESTARTSYS) {
-		log_debug(ls, "%s: wait killed %llx", __func__,
-			  (unsigned long long)number);
 		spin_lock(&ops_lock);
 		list_del(&op->list);
 		spin_unlock(&ops_lock);
+		log_print("%s: wait interrupted %x %llx, op removed",
+			  __func__, ls->ls_global_id,
+			  (unsigned long long)number);
 		dlm_release_plock_op(op);
 		do_unlock_close(ls, number, file, fl);
 		goto out;
@@ -469,8 +470,8 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,
 		else
 			wake_up(&recv_wq);
 	} else
-		log_print("dev_write no op %x %llx", info.fsid,
-			  (unsigned long long)info.number);
+		log_print("%s: no op %x %llx - may got interrupted?", __func__,
+			  info.fsid, (unsigned long long)info.number);
 	return count;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux