Port autofs to DragonFly

Tomohiro Kusumi kusumi.tomohiro at gmail.com
Sun May 29 07:05:07 PDT 2016

I've uploaded the autofs code to GitHub.

It's been rebased on top of the current master.
Initial submission consists of 11 commits and has been tested by a user.
See "1b3f558 autofs: Port autofs from FreeBSD" for overall summary.

# git log --oneline origin/master.. | cat -n
     1  e2c9c9d usr.sbin/autofs: Workaround namecache bug after unmount
     2  8b4102d sys/kern: Don't implement .vfs_sync unless sync is supported
     3  1b3f558 autofs: Port autofs from FreeBSD
     4  b47fcb0 usr.sbin/fstyp: Port fstyp from FreeBSD
     5  3be0dbd sys/kern: Retry nlookup if nresolve returned ESTALE
     6  535a47c sys/sys: Fix IOCPARM_MAX
     7  dace0f3 sys/sys: Extend IOCPARM_MAX
     8  04a68d1 usr.bin/showmount: Add -E option
     9  510f5f0 sbin/mount_nfs: Add -o retrycnt= option
    10  94ec125 sys/kern: Add kqueue EVFILT_FS
    11  d91990d sys/kern: Add kstrndup()

There is no documentation other than manpages, since it's basically
the same as FreeBSD.
I'm not going to write any document either (and it's better without
DragonFly specific docs too since this is supposed to be a port).

Note that manpages for kstrndup and EVFILT_FS (in kqueue(2)) are missing.
FreeBSD doesn't have manpages for these either.

Difference or limitation in terms of feature are as follows.

1. -media map uses kern.disks sysctl instead of kern.geom.confdot
2. -media map doesn't automount HAMMER consists of >1 volumes
3. -media map ignores /dev/md*
4. vfs.autofs.mount_on_stat is not supported
5. fstyp doesn't support ZFS and GEOM
6. fstyp supports HAMMER volumes

- 2,3,4,5,6 are mentioned in related manpages.
- 3. could be fixed by modifying /etc/autofs/special_media but
recommend not fixing this unless automounting /dev/md* is needed.
- 4. is disabled by default on FreeBSD. This sysctl does exist on
DragonFly too, but nothing changes when enabled.

More information about the Users mailing list