aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2006-05-26 13:01:53 +0000
committerCraig Rodrigues <rodrigc@FreeBSD.org>2006-05-26 13:01:53 +0000
commit4df2902f3b155171096a59a0f37c4cd564008624 (patch)
tree025a669c84e890c2a1480cdbcb57a48fcbe7176a
parentee98eb825bbf1445ec02f915281bc02dff71539a (diff)
downloadsrc-4df2902f3b155171096a59a0f37c4cd564008624.tar.gz
src-4df2902f3b155171096a59a0f37c4cd564008624.zip
Add support for "export" option, to allow NFS exporting
of XFS filesystems.
Notes
Notes: svn path=/head/; revision=158953
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
index 21290594e6e9..569e74a77e7a 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
@@ -65,7 +65,7 @@ static b_strategy_t xfs_geom_strategy;
static const char *xfs_opts[] =
{ "from", "flags", "logbufs", "logbufsize",
"rtname", "logname", "iosizelog", "sunit",
- "swidth",
+ "swidth", "export",
NULL };
static void
@@ -168,6 +168,16 @@ _xfs_mount(struct mount *mp,
if (vfs_filteropt(mp->mnt_optnew, xfs_opts))
return (EINVAL);
+ if (mp->mnt_flag & MNT_UPDATE) {
+ /*
+ * XXX: Only support update mounts for NFS export.
+ */
+ if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0))
+ return (0);
+ else
+ return EOPNOTSUPP;
+ }
+
xmp = xfsmount_allocate(mp);
if (xmp == NULL)
return (ENOMEM);
@@ -179,10 +189,6 @@ _xfs_mount(struct mount *mp,
XFSTOVFS(xmp)->vfs_flag |= VFS_RDONLY;
mp->mnt_flag |= MNT_RDONLY;
- /* XXX: Do not support MNT_UPDATE yet */
- if (mp->mnt_flag & MNT_UPDATE)
- return EOPNOTSUPP;
-
curcred = td->td_ucred;
XVFS_MOUNT(XFSTOVFS(xmp), &xmp->m_args, curcred, error);
if (error)