gfs2: Rename remaining "transaction" glock references
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 16 Nov 2022 13:19:06 +0000 (14:19 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 15 Jun 2023 07:57:38 +0000 (09:57 +0200)
The transaction glock was repurposed to serve as the new freeze glock
years ago.  Don't refer to it as the transaction glock anymore.

Also, to be more precise, call it the "freeze glock" instead of the
"freeze lock".  Ditto for the journal glock.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/ops_fstype.c
fs/gfs2/recovery.c
fs/gfs2/super.c
fs/gfs2/util.c

index 5adc7d8..1438e74 100644 (file)
@@ -145,8 +145,8 @@ static void gfs2_glock_dealloc(struct rcu_head *rcu)
  *
  * We need to allow some glocks to be enqueued, dequeued, promoted, and demoted
  * when we're withdrawn. For example, to maintain metadata integrity, we should
- * disallow the use of inode and rgrp glocks when withdrawn. Other glocks, like
- * iopen or the transaction glocks may be safely used because none of their
+ * disallow the use of inode and rgrp glocks when withdrawn. Other glocks like
+ * the iopen or freeze glock may be safely used because none of their
  * metadata goes through the journal. So in general, we should disallow all
  * glocks that are journaled, and allow all the others. One exception is:
  * we need to allow our active journal to be promoted and demoted so others
index 9af9ddb..3b93e4a 100644 (file)
@@ -434,7 +434,7 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh,
        error = gfs2_glock_get(sdp, GFS2_FREEZE_LOCK, &gfs2_freeze_glops,
                               CREATE, &sdp->sd_freeze_gl);
        if (error) {
-               fs_err(sdp, "can't create transaction glock: %d\n", error);
+               fs_err(sdp, "can't create freeze glock: %d\n", error);
                goto fail_rename;
        }
 
index 2bb085a..d8e522f 100644 (file)
@@ -420,10 +420,10 @@ void gfs2_recover_func(struct work_struct *work)
        if (sdp->sd_args.ar_spectator)
                goto fail;
        if (jd->jd_jid != sdp->sd_lockstruct.ls_jid) {
-               fs_info(sdp, "jid=%u: Trying to acquire journal lock...\n",
+               fs_info(sdp, "jid=%u: Trying to acquire journal glock...\n",
                        jd->jd_jid);
                jlocked = 1;
-               /* Acquire the journal lock so we can do recovery */
+               /* Acquire the journal glock so we can do recovery */
 
                error = gfs2_glock_nq_num(sdp, jd->jd_jid, &gfs2_journal_glops,
                                          LM_ST_EXCLUSIVE,
@@ -465,10 +465,10 @@ void gfs2_recover_func(struct work_struct *work)
                ktime_ms_delta(t_jhd, t_jlck));
 
        if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) {
-               fs_info(sdp, "jid=%u: Acquiring the transaction lock...\n",
+               fs_info(sdp, "jid=%u: Acquiring the freeze glock...\n",
                        jd->jd_jid);
 
-               /* Acquire a shared hold on the freeze lock */
+               /* Acquire a shared hold on the freeze glock */
 
                error = gfs2_freeze_lock(sdp, &thaw_gh, LM_FLAG_PRIORITY);
                if (error)
index c89b280..6afd290 100644 (file)
@@ -463,7 +463,7 @@ static int gfs2_write_inode(struct inode *inode, struct writeback_control *wbc)
  * @flags: The type of dirty
  *
  * Unfortunately it can be called under any combination of inode
- * glock and transaction lock, so we have to check carefully.
+ * glock and freeze glock, so we have to check carefully.
  *
  * At the moment this deals only with atime - it should be possible
  * to expand that role in future, once a review of the locking has
index 7a6aeff..c84242e 100644 (file)
@@ -107,7 +107,7 @@ int gfs2_freeze_lock(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
        error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, flags,
                                   freeze_gh);
        if (error && error != GLR_TRYFAILED)
-               fs_err(sdp, "can't lock the freeze lock: %d\n", error);
+               fs_err(sdp, "can't lock the freeze glock: %d\n", error);
        return error;
 }