fs: dlm: rename DLM_IFL_NEED_SCHED to DLM_IFL_CB_PENDING
authorAlexander Aring <aahringo@redhat.com>
Thu, 17 Nov 2022 22:11:43 +0000 (17:11 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 21 Nov 2022 15:45:49 +0000 (09:45 -0600)
This patch renames DLM_IFL_NEED_SCHED to DLM_IFL_CB_PENDING because
CB_PENDING is a proper name to describe this flag. This flag is set when
callback enqueue will return DLM_ENQUEUE_CALLBACK_NEED_SCHED because the
callback worker need to be queued. The flag tells that callbacks are
currently pending to be called and will be unset if the callback work
for the specific lkb is done. The term need schedule is part of this
time but a proper name is to say that there are some callbacks pending
to being called.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/ast.c
fs/dlm/dlm_internal.h
fs/dlm/user.c

index 7dd072b..26fef99 100644 (file)
@@ -45,8 +45,7 @@ void dlm_purge_lkb_callbacks(struct dlm_lkb *lkb)
                kref_put(&cb->ref, dlm_release_callback);
        }
 
-       /* TODO */
-       lkb->lkb_flags &= ~DLM_IFL_NEED_SCHED;
+       lkb->lkb_flags &= ~DLM_IFL_CB_PENDING;
 
        /* invalidate */
        dlm_callback_set_last_ptr(&lkb->lkb_last_cast, NULL);
@@ -104,8 +103,8 @@ int dlm_enqueue_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode,
        cb->sb_status = status;
        cb->sb_flags = (sbflags & 0x000000FF);
        kref_init(&cb->ref);
-       if (!(lkb->lkb_flags & DLM_IFL_NEED_SCHED)) {
-               lkb->lkb_flags |= DLM_IFL_NEED_SCHED;
+       if (!(lkb->lkb_flags & DLM_IFL_CB_PENDING)) {
+               lkb->lkb_flags |= DLM_IFL_CB_PENDING;
                rv = DLM_ENQUEUE_CALLBACK_NEED_SCHED;
        }
        list_add_tail(&cb->list, &lkb->lkb_callbacks);
@@ -210,7 +209,7 @@ void dlm_callback_work(struct work_struct *work)
                spin_lock(&lkb->lkb_cb_lock);
                rv = dlm_dequeue_lkb_callback(lkb, &cb);
                if (rv == DLM_DEQUEUE_CALLBACK_EMPTY) {
-                       lkb->lkb_flags &= ~DLM_IFL_NEED_SCHED;
+                       lkb->lkb_flags &= ~DLM_IFL_CB_PENDING;
                        spin_unlock(&lkb->lkb_cb_lock);
                        break;
                }
index 6318e0f..ab1a553 100644 (file)
@@ -211,7 +211,7 @@ struct dlm_args {
 #endif
 #define DLM_IFL_DEADLOCK_CANCEL        0x01000000
 #define DLM_IFL_STUB_MS                0x02000000 /* magic number for m_flags */
-#define DLM_IFL_NEED_SCHED     0x04000000
+#define DLM_IFL_CB_PENDING     0x04000000
 /* least significant 2 bytes are message changed, they are full transmitted
  * but at receive side only the 2 bytes LSB will be set.
  *
index edf722d..3512950 100644 (file)
@@ -884,8 +884,7 @@ static ssize_t device_read(struct file *file, char __user *buf, size_t count,
                goto try_another;
        case DLM_DEQUEUE_CALLBACK_LAST:
                list_del_init(&lkb->lkb_cb_list);
-               /* TODO */
-               lkb->lkb_flags &= ~DLM_IFL_NEED_SCHED;
+               lkb->lkb_flags &= ~DLM_IFL_CB_PENDING;
                break;
        case DLM_DEQUEUE_CALLBACK_SUCCESS:
                break;