Skip to content

Commit 8ef2766

Browse files
committed
gfs2: Update to the evict / remote delete documentation
jira LE-3201 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10 commit-author Andreas Gruenbacher <[email protected]> commit a603333 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-rt-4.18.0-553.27.1.rt7.368.el8_10/a6033333.failed Try to be a bit more clear and remove some duplications. We cannot actually get rid of the verification step eventually, so remove the comment saying so. Signed-off-by: Andreas Gruenbacher <[email protected]> (cherry picked from commit a603333) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # fs/gfs2/glock.c
1 parent 111b724 commit 8ef2766

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
gfs2: Update to the evict / remote delete documentation
2+
3+
jira LE-3201
4+
Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10
5+
commit-author Andreas Gruenbacher <[email protected]>
6+
commit a6033333ccce01ecada39b3ddabc03fd967e60c0
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-rt-4.18.0-553.27.1.rt7.368.el8_10/a6033333.failed
10+
11+
Try to be a bit more clear and remove some duplications. We cannot
12+
actually get rid of the verification step eventually, so remove the
13+
comment saying so.
14+
15+
Signed-off-by: Andreas Gruenbacher <[email protected]>
16+
(cherry picked from commit a6033333ccce01ecada39b3ddabc03fd967e60c0)
17+
Signed-off-by: Jonathan Maple <[email protected]>
18+
19+
# Conflicts:
20+
# fs/gfs2/glock.c
21+
diff --cc fs/gfs2/glock.c
22+
index 7369f9303901,8fff36846145..000000000000
23+
--- a/fs/gfs2/glock.c
24+
+++ b/fs/gfs2/glock.c
25+
@@@ -992,37 -1028,15 +995,42 @@@ static void delete_work_func(struct wor
26+
struct delayed_work *dwork = to_delayed_work(work);
27+
struct gfs2_glock *gl = container_of(dwork, struct gfs2_glock, gl_delete);
28+
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
29+
- bool verify_delete = test_and_clear_bit(GLF_VERIFY_DELETE, &gl->gl_flags);
30+
+ struct inode *inode;
31+
+ u64 no_addr = gl->gl_name.ln_number;
32+
33+
++<<<<<<< HEAD
34+
+ if (test_and_clear_bit(GLF_TRY_TO_EVICT, &gl->gl_flags)) {
35+
+ /*
36+
+ * If we can evict the inode, give the remote node trying to
37+
+ * delete the inode some time before verifying that the delete
38+
+ * has happened. Otherwise, if we cause contention on the inode glock
39+
+ * immediately, the remote node will think that we still have
40+
+ * the inode in use, and so it will give up waiting.
41+
+ *
42+
+ * If we can't evict the inode, signal to the remote node that
43+
+ * the inode is still in use. We'll later try to delete the
44+
+ * inode locally in gfs2_evict_inode.
45+
+ *
46+
+ * FIXME: We only need to verify that the remote node has
47+
+ * deleted the inode because nodes before this remote delete
48+
+ * rework won't cooperate. At a later time, when we no longer
49+
+ * care about compatibility with such nodes, we can skip this
50+
+ * step entirely.
51+
+ */
52+
+ if (gfs2_try_evict(gl)) {
53+
+ if (test_bit(SDF_KILL, &sdp->sd_flags))
54+
+ goto out;
55+
+ if (gfs2_queue_verify_delete(gl))
56+
+ return;
57+
+ }
58+
+ goto out;
59+
+ }
60+
++=======
61+
+ if (test_and_clear_bit(GLF_TRY_TO_EVICT, &gl->gl_flags))
62+
+ gfs2_try_evict(gl);
63+
++>>>>>>> a6033333ccce (gfs2: Update to the evict / remote delete documentation)
64+
65+
- if (verify_delete) {
66+
- u64 no_addr = gl->gl_name.ln_number;
67+
- struct inode *inode;
68+
-
69+
+ if (test_and_clear_bit(GLF_VERIFY_DELETE, &gl->gl_flags)) {
70+
inode = gfs2_lookup_by_inum(sdp, no_addr, gl->gl_no_formal_ino,
71+
GFS2_BLKST_UNLINKED);
72+
if (IS_ERR(inode)) {
73+
* Unmerged path fs/gfs2/glock.c
74+
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
75+
index 0857964a90b5..bd7f7213789d 100644
76+
--- a/fs/gfs2/super.c
77+
+++ b/fs/gfs2/super.c
78+
@@ -1301,9 +1301,9 @@ static bool gfs2_upgrade_iopen_glock(struct inode *inode)
79+
* exclusive access to the iopen glock here.
80+
*
81+
* Otherwise, the other nodes holding the lock will be notified about
82+
- * our locking request. If they do not have the inode open, they are
83+
- * expected to evict the cached inode and release the lock, allowing us
84+
- * to proceed.
85+
+ * our locking request (see iopen_go_callback()). If they do not have
86+
+ * the inode open, they are expected to evict the cached inode and
87+
+ * release the lock, allowing us to proceed.
88+
*
89+
* Otherwise, if they cannot evict the inode, they are expected to poke
90+
* the inode glock (note: not the iopen glock). We will notice that

0 commit comments

Comments
 (0)