19 Commits

Author SHA1 Message Date
trasz
95a939758e MFC r271927:
Turns out -1 is a perfectly valid error number, ERESTART.  Remove useless
code written under assumption that it wasn't.

Sponsored by:	The FreeBSD Foundation
2015-03-07 20:00:26 +00:00
trasz
1fbf58cee9 MFC r274859:
Implement "automount -c".

Sponsored by:	The FreeBSD Foundation
2015-03-07 19:36:06 +00:00
trasz
97710cbe33 MFC r273127:
Make automountd(8) inform autofs(4) whether directory being handled can
have wildcards.  This makes it possible for autofs(4) to avoid requesting
automountd(8) action on access to nonexistent nodes - unless wildcards
are actually used.

Note that this change breaks ABI for automountd(8).

MFC r278521:

Restore ABI compatibility, broken in r273127.  Note that while this fixes
ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8)
is neccessary.

Sponsored by:	The FreeBSD Foundation
2015-03-07 19:32:19 +00:00
trasz
11e554c92e MFC r272931:
Add assertion to catch duplicated nodes.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:52:32 +00:00
trasz
44b7c0743b MFC r272836:
Remove remnants of some cleanup; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:50:40 +00:00
trasz
5217262cb3 MFC r272743:
Simplify; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:49:04 +00:00
trasz
a6df93e354 MFC r272512:
Make autofs use shared vnode locks.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:47:22 +00:00
trasz
f72fde1ec0 MFC r272471:
Fix autofs debug macros.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:45:34 +00:00
trasz
603b73d3cc MFC r272470:
Make autofs(4) use shared lock for lookups, instead of exclusive one.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:44:03 +00:00
trasz
c03d95d341 MFC r272405:
Call uma_zfree() outside of lock, and improve comment.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:42:11 +00:00
trasz
aba7b57a35 MFC r272403:
Make autofs timeout handling use timeout task instead of callout;
that's because the handler can sleep on sx lock.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:40:34 +00:00
trasz
22dfed7064 MFC r272025:
Fix thinko that, with two map entries like shown below, in that order,
made autofs mix them up: the second one wasn't visible in ls(1) output,
and trying to access it would trigger mount for the first one.

foobar          host:/foobar
foo             host:/foo

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2014-09-25 17:28:29 +00:00
trasz
0e88a7f8bf MFC r270507:
Fix bug that, assuming a/ is a root of NFS filesystem mounted on autofs,
prevented "mv a/from a/to" from working, while "cd a && mv from to" was ok.

PR:		192948
Sponsored by:	The FreeBSD Foundation
2014-08-31 21:58:07 +00:00
trasz
d1036ec04d MFC r270402:
Autofs softc needs to be global anyway, so don't pass it as a local
variable, and don't store in autofs_mount.  Also rename it from 'sc'
to 'autofs_softc', since it's global and extern.

Sponsored by:	The FreeBSD Foundation
2014-08-31 21:52:26 +00:00
trasz
2ded039a6d MFC r270399:
Add comment explaining one of the quirks in autofs.

Sponsored by:	The FreeBSD Foundation
2014-08-31 21:51:01 +00:00
trasz
87f90af6e4 MFC r270281:
Fix includes.

Suggested by:	pluknet@
Sponsored by:	The FreeBSD Foundation
2014-08-31 21:49:45 +00:00
trasz
ab3fae8a9e MFC r270276:
Use __FBSDID() properly.

Suggested by:	pluknet@
Sponsored by:	The FreeBSD Foundation
2014-08-31 21:48:12 +00:00
trasz
35b1298891 MFC r270207:
Rework ".." lookup; previous one failed to properly busy the mountpoint.

Reviewed by:	kib@
Sponsored by:	The FreeBSD Foundation
2014-08-31 21:43:28 +00:00
trasz
e8d76f86d2 MFC r270096:
Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by:	allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric:	D523
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-08-31 21:18:23 +00:00