Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 6706415

Browse files
committed
Merge tag 'gfs2-v6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 updates from Andreas Gruenbacher: "Fixes and cleanups: - Revise the glock reference counting model and LRU list handling to be more sensible - Several quota related fixes: clean up the quota code, add some missing locking, and work around the on-disk corruption that the reverted patch "gfs2: ignore negated quota changes" causes - Clean up the glock demote logic in glock_work_func()" * tag 'gfs2-v6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (29 commits) gfs2: Clean up glock demote logic gfs2: Revert "check for no eligible quota changes" gfs2: Be more careful with the quota sync generation gfs2: Get rid of some unnecessary quota locking gfs2: Add some missing quota locking gfs2: Fold qd_fish into gfs2_quota_sync gfs2: quota need_sync cleanup gfs2: Fix and clean up function do_qc gfs2: Revert "Add quota_change type" gfs2: Revert "ignore negated quota changes" gfs2: qd_check_sync cleanups gfs2: Revert "introduce qd_bh_get_or_undo" gfs2: Check quota consistency on mount gfs2: Minor gfs2_quota_init error path cleanup gfs2: Get rid of demote_ok checks Revert "GFS2: Don't add all glocks to the lru" gfs2: Revise glock reference counting model gfs2: Switch to a per-filesystem glock workqueue gfs2: Report when glocks cannot be freed for a long time gfs2: gfs2_glock_get cleanup ...
2 parents f097ef0 + f75efef commit 6706415

File tree

11 files changed

+380
-405
lines changed

11 files changed

+380
-405
lines changed

Documentation/filesystems/gfs2-glocks.rst

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,38 +40,37 @@ shared lock mode, SH. In GFS2 the DF mode is used exclusively for direct I/O
4040
operations. The glocks are basically a lock plus some routines which deal
4141
with cache management. The following rules apply for the cache:
4242

43-
========== ========== ============== ========== ==============
44-
Glock mode Cache data Cache Metadata Dirty Data Dirty Metadata
45-
========== ========== ============== ========== ==============
46-
UN No No No No
47-
SH Yes Yes No No
48-
DF No Yes No No
49-
EX Yes Yes Yes Yes
50-
========== ========== ============== ========== ==============
43+
========== ============== ========== ========== ==============
44+
Glock mode Cache Metadata Cache data Dirty Data Dirty Metadata
45+
========== ============== ========== ========== ==============
46+
UN No No No No
47+
DF Yes No No No
48+
SH Yes Yes No No
49+
EX Yes Yes Yes Yes
50+
========== ============== ========== ========== ==============
5151

5252
These rules are implemented using the various glock operations which
5353
are defined for each type of glock. Not all types of glocks use
5454
all the modes. Only inode glocks use the DF mode for example.
5555

5656
Table of glock operations and per type constants:
5757

58-
============= =============================================================
58+
============== =============================================================
5959
Field Purpose
60-
============= =============================================================
61-
go_xmote_th Called before remote state change (e.g. to sync dirty data)
60+
============== =============================================================
61+
go_sync Called before remote state change (e.g. to sync dirty data)
6262
go_xmote_bh Called after remote state change (e.g. to refill cache)
6363
go_inval Called if remote state change requires invalidating the cache
64-
go_demote_ok Returns boolean value of whether its ok to demote a glock
65-
(e.g. checks timeout, and that there is no cached data)
66-
go_lock Called for the first local holder of a lock
67-
go_unlock Called on the final local unlock of a lock
64+
go_instantiate Called when a glock has been acquired
65+
go_held Called every time a glock holder is acquired
6866
go_dump Called to print content of object for debugfs file, or on
6967
error to dump glock to the log.
70-
go_type The type of the glock, ``LM_TYPE_*``
7168
go_callback Called if the DLM sends a callback to drop this lock
69+
go_unlocked Called when a glock is unlocked (dlm_unlock())
70+
go_type The type of the glock, ``LM_TYPE_*``
7271
go_flags GLOF_ASPACE is set, if the glock has an address space
7372
associated with it
74-
============= =============================================================
73+
============== =============================================================
7574

7675
The minimum hold time for each lock is the time after a remote lock
7776
grant for which we ignore remote demote requests. This is in order to
@@ -82,26 +81,24 @@ to by multiple nodes. By delaying the demotion in response to a
8281
remote callback, that gives the userspace program time to make
8382
some progress before the pages are unmapped.
8483

85-
There is a plan to try and remove the go_lock and go_unlock callbacks
86-
if possible, in order to try and speed up the fast path though the locking.
87-
Also, eventually we hope to make the glock "EX" mode locally shared
88-
such that any local locking will be done with the i_mutex as required
89-
rather than via the glock.
84+
Eventually, we hope to make the glock "EX" mode locally shared such that any
85+
local locking will be done with the i_mutex as required rather than via the
86+
glock.
9087

9188
Locking rules for glock operations:
9289

93-
============= ====================== =============================
90+
============== ====================== =============================
9491
Operation GLF_LOCK bit lock held gl_lockref.lock spinlock held
95-
============= ====================== =============================
96-
go_xmote_th Yes No
92+
============== ====================== =============================
93+
go_sync Yes No
9794
go_xmote_bh Yes No
9895
go_inval Yes No
99-
go_demote_ok Sometimes Yes
100-
go_lock Yes No
101-
go_unlock Yes No
96+
go_instantiate No No
97+
go_held No No
10298
go_dump Sometimes Yes
10399
go_callback Sometimes (N/A) Yes
104-
============= ====================== =============================
100+
go_unlocked Yes No
101+
============== ====================== =============================
105102

106103
.. Note::
107104

0 commit comments

Comments
 (0)