]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ufs: apply suspension for non-forced rw unmounts.
authorKonstantin Belousov <kib@FreeBSD.org>
Fri, 10 Apr 2020 01:24:16 +0000 (01:24 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Fri, 10 Apr 2020 01:24:16 +0000 (01:24 +0000)
commit71f26429886df8a11fbae1cc1def2a3f171efe9f
tree321a08e577b43116914c633f0294e69ba82cc1b1
parent8f5672ada487269ff4ed6b65129de1ce0afd9c64
ufs: apply suspension for non-forced rw unmounts.

Forced rw unmounts and remounts from rw to ro already suspend
filesystem, which closes races with writers instantiating new vnodes
while unmount flushes the queue.  Original intent of not including
non-forced unmounts into this regime was to allow such unmounts to
fail if writer was active, but this did not worked well.

Similar change, but causing all unmount, even involving only ro
filesystem, were proposed in D24088, but I believe that suspending ro
is undesirable, and definitely spends CPU time.

Reported by: markj
Discussed with: chs, mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/ufs/ffs/ffs_vfsops.c