git: umount(8): Add -d option to detach vn(4) devices

Aaron LI aly at
Thu Mar 21 18:58:50 PDT 2024

commit ce0bf054ae24dd51413cc9a1106d8b3043c98ef4
Author: Ricardo Branco <rbranco at>
Date:   Sun Mar 10 15:38:17 2024 +0100

    umount(8): Add -d option to detach vn(4) devices
    The '-d' option tells umount(8) to detach the underlying vn(4) device if
    the filesystem was mounted from it.  Note that vn(4) is a virtual disk
    and can provides multiple filesystems, so the vn(4) detaching can only
    succeed when all the filesystems are umounted.
    For example:
    $ vnconfig -c vn dfly.img
    $ mount_msdos /dev/vn4s1 /mnt/dfly/boot
    $ mount_ufs /dev/vn4s2a /mnt/dfly/root
    $ umount -d /mnt/dfly/boot
    umount: VNIOCDETACH: /dev/vn4: Device busy
    umount: detach of /dev/vn4s1 failed
    $ umount -d /mnt/dfly/root
    (now vn4 is detached)
    A similar option exists in Linux's and FreeBSD's umount(8).
    GitHub PR:
    See Also:

Summary of changes:
 sbin/umount/umount.8 | 13 +++++++----
 sbin/umount/umount.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 70 insertions(+), 9 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list