aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-07-07 09:03:57 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-07-07 09:03:57 +0000
commitdebc480e037b7337cc27dd1200d64ac55eea0644 (patch)
tree595990c3c63580feac383e70c62f36197568ff07 /sys/sys
parentaf625dc998ce3224c05ce266562da7a33904ac2e (diff)
downloadsrc-debc480e037b7337cc27dd1200d64ac55eea0644.tar.gz
src-debc480e037b7337cc27dd1200d64ac55eea0644.zip
Add new unmount(2) flag, MNT_NONBUSY, to check whether there are
any open vnodes before proceeding. Make autounmound(8) use this flag. Without it, even an unsuccessfull unmount causes filesystem flush, which interferes with normal operation. Reviewed by: kib@ Approved by: re (gjb@) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D7047
Notes
Notes: svn path=/head/; revision=302388
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/mount.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 5438140dc365..7c2856ab2c32 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -312,17 +312,21 @@ void __mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *);
* External filesystem command modifier flags.
* Unmount can use the MNT_FORCE flag.
* XXX: These are not STATES and really should be somewhere else.
- * XXX: MNT_BYFSID collides with MNT_ACLS, but because MNT_ACLS is only used for
- * mount(2) and MNT_BYFSID is only used for unmount(2) it's harmless.
+ * XXX: MNT_BYFSID and MNT_NONBUSY collide with MNT_ACLS and MNT_MULTILABEL,
+ * but because MNT_ACLS and MNT_MULTILABEL are only used for mount(2),
+ * and MNT_BYFSID and MNT_NONBUSY are only used for unmount(2),
+ * it's harmless.
*/
#define MNT_UPDATE 0x0000000000010000ULL /* not real mount, just update */
#define MNT_DELEXPORT 0x0000000000020000ULL /* delete export host lists */
#define MNT_RELOAD 0x0000000000040000ULL /* reload filesystem data */
#define MNT_FORCE 0x0000000000080000ULL /* force unmount or readonly */
#define MNT_SNAPSHOT 0x0000000001000000ULL /* snapshot the filesystem */
+#define MNT_NONBUSY 0x0000000004000000ULL /* check vnode use counts. */
#define MNT_BYFSID 0x0000000008000000ULL /* specify filesystem by ID. */
#define MNT_CMDFLAGS (MNT_UPDATE | MNT_DELEXPORT | MNT_RELOAD | \
- MNT_FORCE | MNT_SNAPSHOT | MNT_BYFSID)
+ MNT_FORCE | MNT_SNAPSHOT | MNT_NONBUSY | \
+ MNT_BYFSID)
/*
* Internal filesystem control flags stored in mnt_kern_flag.
*