All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: teigland@redhat.com
Cc: gfs2@lists.linux.dev
Subject: [PATCH v6.9-rc1 07/10] dlm: move lkb debug information out of callback
Date: Thu, 28 Mar 2024 11:48:39 -0400	[thread overview]
Message-ID: <20240328154842.1099288-7-aahringo@redhat.com> (raw)
In-Reply-To: <20240328154842.1099288-1-aahringo@redhat.com>

This patch removes per lkb callback debug information to the
functionality when we queue the callback. As we need to remove any lkb
reference in the callback handling this functionality will be move to an
earlier point of execution. It is so far only used for debugging and the
exact timing doesn't matter.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
 fs/dlm/ast.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
index dd7cca3c1472..cadbcbe0786b 100644
--- a/fs/dlm/ast.c
+++ b/fs/dlm/ast.c
@@ -105,8 +105,13 @@ int dlm_enqueue_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode,
 
 	list_add_tail(&cb->list, &lkb->lkb_callbacks);
 
-	if (flags & DLM_CB_CAST)
+	if (flags & DLM_CB_BAST) {
+		lkb->lkb_last_bast_time = ktime_get();
+		lkb->lkb_last_bast_mode = cb->mode;
+	} else if (flags & DLM_CB_CAST) {
 		dlm_callback_set_last_ptr(&lkb->lkb_last_cast, cb);
+		lkb->lkb_last_cast_time = ktime_get();
+	}
 
 	dlm_callback_set_last_ptr(&lkb->lkb_last_cb, cb);
 
@@ -194,8 +199,6 @@ void dlm_callback_work(struct work_struct *work)
 			trace_dlm_bast(ls->ls_global_id, lkb->lkb_id,
 				       cb->mode, rsb->res_name,
 				       rsb->res_length);
-			lkb->lkb_last_bast_time = ktime_get();
-			lkb->lkb_last_bast_mode = cb->mode;
 			bastfn(lkb->lkb_astparam, cb->mode);
 		} else if (cb->flags & DLM_CB_CAST) {
 			lkb->lkb_lksb->sb_status = cb->sb_status;
@@ -203,7 +206,6 @@ void dlm_callback_work(struct work_struct *work)
 			trace_dlm_ast(ls->ls_global_id, lkb->lkb_id,
 				      cb->sb_flags, cb->sb_status,
 				      rsb->res_name, rsb->res_length);
-			lkb->lkb_last_cast_time = ktime_get();
 			castfn(lkb->lkb_astparam);
 		}
 
-- 
2.43.0


  parent reply	other threads:[~2024-03-28 15:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 15:48 [PATCH v6.9-rc1 01/10] dlm: fix user space lock decision to copy lvb Alexander Aring
2024-03-28 15:48 ` [PATCH v6.9-rc1 02/10] fs: dlm: Simplify the allocation of slab caches in dlm_midcomms_cache_create Alexander Aring
2024-03-28 15:48 ` [PATCH v6.9-rc1 03/10] fs: dlm: Simplify the allocation of slab caches in dlm_lowcomms_msg_cache_create Alexander Aring
2024-03-28 15:48 ` [PATCH v6.9-rc1 04/10] dlm: put lkbs instead of force free Alexander Aring
2024-03-28 15:48 ` [PATCH v6.9-rc1 05/10] dlm: remove lkb from ast bast tracepoints Alexander Aring
2024-03-28 15:48 ` [PATCH v6.9-rc1 06/10] dlm: remove callback queue debugfs functionality Alexander Aring
2024-03-28 15:48 ` Alexander Aring [this message]
2024-03-28 15:48 ` [PATCH v6.9-rc1 08/10] dlm: combine switch case fail and default statements Alexander Aring
2024-03-28 15:48 ` [PATCH v6.9-rc1 09/10] dlm: fix race between final callback and remove Alexander Aring
2024-03-28 15:48 ` [PATCH v6.9-rc1 10/10] dlm: remove callback reference counting Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240328154842.1099288-7-aahringo@redhat.com \
    --to=aahringo@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.