]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Only sleep interruptible while waiting for suspension end when
authorKonstantin Belousov <kib@FreeBSD.org>
Sat, 13 Dec 2014 16:07:01 +0000 (16:07 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Sat, 13 Dec 2014 16:07:01 +0000 (16:07 +0000)
commit0061ddb3ede464c048a739974af5bdcd3c9b58bc
tree6c1328cd8a9d3146a168463bd4999b76bef1263d
parentea117d1735d8160364bbbb4f620cae0a200df5be
Only sleep interruptible while waiting for suspension end when
filesystem specified VFCF_SBDRY flag, i.e. for NFS.

There are two issues with the sleeps.  First, applications may get
unexpected EINTR from the disk i/o syscalls.  Second, interruptible
sleep allows the stop of the process, and since mount point is
referenced while thread sleeps, unmount cannot free mount point
structure' memory, blocking unmount indefinitely.

Even for NFS, it is probably only reasonable to enable PCATCH for intr
mounts, but this information is currently not available at VFS level.

Reported and tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/kern/vfs_vnops.c