HomeFreeBSD

Add two options to allow mount to avoid covering up existing mount points.

Description

Add two options to allow mount to avoid covering up existing mount points.
The two options are

  • nocover/cover: Prevent/allow mounting over an existing root mountpoint.

E.g., "mount -t ufs -o nocover /dev/sd1a /usr/local" will fail if /usr/local
is already a mountpoint.

  • emptydir/noemptydir: Prevent/allow mounting on a non-empty directory.

E.g., "mount -t ufs -o emptydir /dev/sd1a /usr" will fail.

Neither of these options is intended to be a default, for historical and
compatibility reasons.

Reviewed by: allanjude, kib
Differential Revision: https://reviews.freebsd.org/D21458

Details

Provenance
sefAuthored on
Reviewer
allanjude
Differential Revision
D21458: Add mount options to prevent covering
Parents
rS352613: cache: try to avoid vhold if locks held
Branches
Unknown
Tags
Unknown