Skip to content

Commit 3fc480d

Browse files
committed
gfs2: Rename remaining "transaction" glock references
jira LE-1907 Rebuild_History Non-Buildable kernel-4.18.0-477.27.1.el8_8 commit-author Andreas Gruenbacher <agruenba@redhat.com> commit af1abe1 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> (cherry picked from commit af1abe1) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent e4199dc commit 3fc480d

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
@@ -143,8 +143,8 @@ static void gfs2_glock_dealloc(struct rcu_head *rcu)
143143
*
144144
* We need to allow some glocks to be enqueued, dequeued, promoted, and demoted
145145
* when we're withdrawn. For example, to maintain metadata integrity, we should
146-
* disallow the use of inode and rgrp glocks when withdrawn. Other glocks, like
147-
* iopen or the transaction glocks may be safely used because none of their
146+
* disallow the use of inode and rgrp glocks when withdrawn. Other glocks like
147+
* the iopen or freeze glock may be safely used because none of their
148148
* metadata goes through the journal. So in general, we should disallow all
149149
* glocks that are journaled, and allow all the others. One exception is:
150150
* 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
@@ -432,7 +432,7 @@ static int init_locking(struct gfs2_sbd *sdp, struct gfs2_holder *mount_gh,
432432
error = gfs2_glock_get(sdp, GFS2_FREEZE_LOCK, &gfs2_freeze_glops,
433433
CREATE, &sdp->sd_freeze_gl);
434434
if (error) {
435-
fs_err(sdp, "can't create transaction glock: %d\n", error);
435+
fs_err(sdp, "can't create freeze glock: %d\n", error);
436436
goto fail_rename;
437437
}
438438

fs/gfs2/recovery.c

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

432432
error = gfs2_glock_nq_num(sdp, jd->jd_jid, &gfs2_journal_glops,
433433
LM_ST_EXCLUSIVE,
@@ -469,10 +469,10 @@ void gfs2_recover_func(struct work_struct *work)
469469
ktime_ms_delta(t_jhd, t_jlck));
470470

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

475-
/* Acquire a shared hold on the freeze lock */
475+
/* Acquire a shared hold on the freeze glock */
476476

477477
error = gfs2_freeze_lock(sdp, &thaw_gh, LM_FLAG_PRIORITY);
478478
if (error)

fs/gfs2/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static int gfs2_write_inode(struct inode *inode, struct writeback_control *wbc)
483483
* @flags: The type of dirty
484484
*
485485
* Unfortunately it can be called under any combination of inode
486-
* glock and transaction lock, so we have to check carefully.
486+
* glock and freeze glock, so we have to check carefully.
487487
*
488488
* At the moment this deals only with atime - it should be possible
489489
* 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
@@ -109,7 +109,7 @@ int gfs2_freeze_lock(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
109109
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, flags,
110110
freeze_gh);
111111
if (error && error != GLR_TRYFAILED)
112-
fs_err(sdp, "can't lock the freeze lock: %d\n", error);
112+
fs_err(sdp, "can't lock the freeze glock: %d\n", error);
113113
return error;
114114
}
115115

0 commit comments

Comments
 (0)