There are probably more places which could benefit from allowing to interrupt vfs_busy() calls at syscalls top level. Requested by: Peter Eriksson <pen@lysator.liu.se> vfs_busy(): add MBF_PCATCH flag to allow interrupting the sleep
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/kern/vfs_subr.c | ||
|---|---|---|
| 934 | If we were to leak the flag here, what would be the impact? It would seem that the pending unmount (whether successful or not) should always ultimately clear the flag, at which point it would also issue a wakeup(). That wakeup might harmlessly do nothing if our canceled wait happened to be the only one, but that seems less potentially disruptive than possibly waking up N other vfs_busy() callers. | |
| 936 | spelling nit: then -> than | |
| 941 | Should this case reacquire mountlist_mtx if MBF_MNTLSTLOCK was passed? If we do want to reacquire that lock, then it might be cleaner to move this error-handling case below the call to MNT_ILOCK() at line 945. | |
| sys/kern/vfs_subr.c | ||
|---|---|---|
| 934 | I believe that we get a spurious wakeup one way or another. So I decided to clean it there instead of leaking. | |
Consistently return with the mountlist mutex locked on error, if it was locked on entry.