"mount -u -o ro" stuck on ufs mount with journaled soft-updates
Guy Yur
guyyur at gmail.com
Sat Feb 11 11:56:21 UTC 2012
Hi,
When updating a mount to read-only for ufs with journaled soft-updates
it can get stuck in ffs_sync when there are open unlinked files.
The issue doesn't occur when using only soft-updates.
>From prints added to softdep_check_suspend I see softdep_deps and
ump->softdep_deps are 1 each time the function is called for the
specified mount point after doing "mount -u -o ro"
terminal 1
prepare /dev/md0 with journaled soft-updates, newfs -U -j
mount /dev/md0 /mnt
touch /mnt/a.txt
tail -f /mnt/a.txt
terminal 2
rm /mnt/a.txt
mount -u -o ro /mnt
mount -u -o ro /mnt
Happens with physical hdd as well, for example /dev/ada0p2
Tested on
9.0-RELEASE and head r231393
VirtualBox 1 CPU and 2 CPU guests on i7-860 host
Atom 330 host
with journaled soft-updates
# mount -u -o ro /mnt
fsync: giving up on dirty
0xc4697770: tag devfs, type VCHR
usecount 1, writecount 0, refcount 6 mountedhere 0xc4654500
flags ()
v_object 0xc469daa0 ref 0 pages 11
lock type devfs: EXCL by thread 0xc466f2e0 (pid 1518)
dev md0
mount: /dev/md0 : Resource temporarily unavailable
# mount -u -o ro /mnt
mount is stuck taking 100% CPU
with soft-updates only
# mount -u -o ro /mnt
mount: /dev/md0 : Device busy
# mount -u -o ro /mnt
mount: /dev/md0 : Device busy
Thanks,
Guy Yur
More information about the freebsd-fs
mailing list