summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs/xfs
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2006-05-26 13:01:53 +0000
committerrodrigc <rodrigc@FreeBSD.org>2006-05-26 13:01:53 +0000
commit926f55ba7a9b2d1c33babf9d95cba072fb5b8dc5 (patch)
tree025a669c84e890c2a1480cdbcb57a48fcbe7176a /sys/gnu/fs/xfs
parent022e01f46be1808c6c57d5d6b957909a557873a9 (diff)
downloadFreeBSD-src-926f55ba7a9b2d1c33babf9d95cba072fb5b8dc5.zip
FreeBSD-src-926f55ba7a9b2d1c33babf9d95cba072fb5b8dc5.tar.gz
Add support for "export" option, to allow NFS exporting
of XFS filesystems.
Diffstat (limited to 'sys/gnu/fs/xfs')
-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 2129059..569e74a 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)
OpenPOWER on IntegriCloud