Skip to content

Commit af1abe1

Browse files
author
Andreas Gruenbacher
committed
gfs2: Rename remaining "transaction" glock references
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>
1 parent cea4403 commit af1abe1

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

fs/gfs2/glock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ static void gfs2_glock_dealloc(struct rcu_head *rcu)
145145
*
146146
* We need to allow some glocks to be enqueued, dequeued, promoted, and demoted
147147
* when we're withdrawn. For example, to maintain metadata integrity, we should
148-
* disallow the use of inode and rgrp glocks when withdrawn. Other glocks, like
149-
* iopen or the transaction glocks may be safely used because none of their
148+
* disallow the use of inode and rgrp glocks when withdrawn. Other glocks like
149+
* the iopen or freeze glock may be safely used because none of their
150150
* metadata goes through the journal. So in general, we should disallow all
151151
* glocks that are journaled, and allow all the others. One exception is:
152152
* we need to allow our active journal to be promoted and demoted so others

fs/gfs2/ops_fstype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh,
434434
error = gfs2_glock_get(sdp, GFS2_FREEZE_LOCK, &gfs2_freeze_glops,
435435
CREATE, &sdp->sd_freeze_gl);
436436
if (error) {
437-
fs_err(sdp, "can't create transaction glock: %d\n", error);
437+
fs_err(sdp, "can't create freeze glock: %d\n", error);
438438
goto fail_rename;
439439
}
440440

fs/gfs2/recovery.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ void gfs2_recover_func(struct work_struct *work)
420420
if (sdp->sd_args.ar_spectator)
421421
goto fail;
422422
if (jd->jd_jid != sdp->sd_lockstruct.ls_jid) {
423-
fs_info(sdp, "jid=%u: Trying to acquire journal lock...\n",
423+
fs_info(sdp, "jid=%u: Trying to acquire journal glock...\n",
424424
jd->jd_jid);
425425
jlocked = 1;
426-
/* Acquire the journal lock so we can do recovery */
426+
/* Acquire the journal glock so we can do recovery */
427427

428428
error = gfs2_glock_nq_num(sdp, jd->jd_jid, &gfs2_journal_glops,
429429
LM_ST_EXCLUSIVE,
@@ -465,10 +465,10 @@ void gfs2_recover_func(struct work_struct *work)
465465
ktime_ms_delta(t_jhd, t_jlck));
466466

467467
if (!(head.lh_flags & GFS2_LOG_HEAD_UNMOUNT)) {
468-
fs_info(sdp, "jid=%u: Acquiring the transaction lock...\n",
468+
fs_info(sdp, "jid=%u: Acquiring the freeze glock...\n",
469469
jd->jd_jid);
470470

471-
/* Acquire a shared hold on the freeze lock */
471+
/* Acquire a shared hold on the freeze glock */
472472

473473
error = gfs2_freeze_lock(sdp, &thaw_gh, LM_FLAG_PRIORITY);
474474
if (error)

fs/gfs2/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ static int gfs2_write_inode(struct inode *inode, struct writeback_control *wbc)
463463
* @flags: The type of dirty
464464
*
465465
* Unfortunately it can be called under any combination of inode
466-
* glock and transaction lock, so we have to check carefully.
466+
* glock and freeze glock, so we have to check carefully.
467467
*
468468
* At the moment this deals only with atime - it should be possible
469469
* to expand that role in future, once a review of the locking has

fs/gfs2/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ int gfs2_freeze_lock(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
107107
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, flags,
108108
freeze_gh);
109109
if (error && error != GLR_TRYFAILED)
110-
fs_err(sdp, "can't lock the freeze lock: %d\n", error);
110+
fs_err(sdp, "can't lock the freeze glock: %d\n", error);
111111
return error;
112112
}
113113

0 commit comments

Comments
 (0)