Commit e4199dc
committed
gfs2: init system threads before freeze lock
jira LE-1907
Rebuild_History Non-Buildable kernel-4.18.0-477.27.1.el8_8
commit-author Bob Peterson <rpeterso@redhat.com>
commit a28dc12
Patch 96b1454 ("gfs2: move freeze glock outside the make_fs_rw and _ro
functions") changed the gfs2 mount sequence so that it holds the freeze
lock before calling gfs2_make_fs_rw. Before this patch, gfs2_make_fs_rw
called init_threads to initialize the quotad and logd threads. That is a
problem if the system needs to withdraw due to IO errors early in the
mount sequence, for example, while initializing the system statfs inode:
1. An IO error causes the statfs glock to not sync properly after
recovery, and leaves items on the ail list.
2. The leftover items on the ail list causes its do_xmote call to fail,
which makes it want to withdraw. But since the glock code cannot
withdraw (because the withdraw sequence uses glocks) it relies upon
the logd daemon to initiate the withdraw.
3. The withdraw can never be performed by the logd daemon because all
this takes place before the logd daemon is started.
This patch moves function init_threads from super.c to ops_fstype.c
and it changes gfs2_fill_super to start its threads before holding the
freeze lock, and if there's an error, stop its threads after releasing
it. This allows the logd to run unblocked by the freeze lock. Thus,
the logd daemon can perform its withdraw sequence properly.
Fixes: 96b1454 ("gfs2: move freeze glock outside the make_fs_rw and _ro functions")
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
(cherry picked from commit a28dc12)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 31deac6 commit e4199dc
2 files changed
+48
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1079 | 1107 | | |
1080 | 1108 | | |
1081 | 1109 | | |
| |||
1208 | 1236 | | |
1209 | 1237 | | |
1210 | 1238 | | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
1211 | 1247 | | |
1212 | 1248 | | |
1213 | 1249 | | |
| |||
1217 | 1253 | | |
1218 | 1254 | | |
1219 | 1255 | | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
1220 | 1262 | | |
1221 | 1263 | | |
1222 | 1264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 125 | | |
154 | 126 | | |
155 | 127 | | |
| |||
164 | 136 | | |
165 | 137 | | |
166 | 138 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 139 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 140 | + | |
| 141 | + | |
178 | 142 | | |
179 | 143 | | |
180 | 144 | | |
181 | | - | |
| 145 | + | |
182 | 146 | | |
183 | 147 | | |
184 | 148 | | |
185 | | - | |
186 | | - | |
| 149 | + | |
187 | 150 | | |
188 | 151 | | |
189 | 152 | | |
190 | 153 | | |
191 | 154 | | |
192 | 155 | | |
193 | 156 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 157 | + | |
| 158 | + | |
208 | 159 | | |
209 | 160 | | |
210 | 161 | | |
| |||
0 commit comments