Commit 8e0c8d2
sunrpc: fix up the special handling of sv_nrpools == 1
Only pooled services take a reference to the svc_pool_map. The sunrpc
code has always used the sv_nrpools value to detect whether the service
is pooled.
The problem there is that nfsd is a pooled service, but when it's
running in "global" pool_mode, it doesn't take a reference to the pool
map because it has a sv_nrpools value of 1. This means that we have
two separate codepaths for starting the server, depending on whether
it's pooled or not.
Fix this by adding a new flag to the svc_serv, that indicates whether
the serv is pooled. With this we can have the nfsd service
unconditionally take a reference, regardless of pool_mode.
Note that this is a behavior change for
/sys/module/sunrpc/parameters/pool_mode. Usually this file does not
allow you to change the pool-mode while there are nfsd threads running,
but if the pool-mode is "global" it's allowed. My assumption is that
this is a bug, since it probably should never have worked this way.
This patch changes the behavior such that you get back EBUSY even
when nfsd is running in global mode. I think this is more reasonable
behavior, and given that most people set this today using the module
parameter, it's doubtful anyone will notice.
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent 3a6adfc commit 8e0c8d2
2 files changed
+8
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | 253 | | |
255 | 254 | | |
256 | | - | |
257 | 255 | | |
258 | 256 | | |
259 | 257 | | |
| |||
275 | 273 | | |
276 | 274 | | |
277 | 275 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | 276 | | |
284 | 277 | | |
285 | 278 | | |
286 | 279 | | |
287 | 280 | | |
288 | | - | |
289 | | - | |
| 281 | + | |
290 | 282 | | |
291 | | - | |
292 | | - | |
293 | | - | |
| 283 | + | |
294 | 284 | | |
295 | 285 | | |
296 | | - | |
| 286 | + | |
297 | 287 | | |
298 | 288 | | |
299 | 289 | | |
300 | | - | |
301 | | - | |
302 | 290 | | |
303 | | - | |
304 | 291 | | |
305 | 292 | | |
306 | 293 | | |
307 | 294 | | |
308 | 295 | | |
309 | 296 | | |
310 | 297 | | |
311 | | - | |
312 | 298 | | |
313 | 299 | | |
314 | 300 | | |
| |||
553 | 539 | | |
554 | 540 | | |
555 | 541 | | |
| 542 | + | |
556 | 543 | | |
557 | 544 | | |
558 | | - | |
| 545 | + | |
559 | 546 | | |
560 | 547 | | |
561 | 548 | | |
| |||
585 | 572 | | |
586 | 573 | | |
587 | 574 | | |
588 | | - | |
| 575 | + | |
| 576 | + | |
589 | 577 | | |
590 | 578 | | |
591 | 579 | | |
| |||
0 commit comments