lofs_vfsops.c revision b431137cd272e49097db14ab8b85efbbe92a1d76
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * CDDL HEADER START
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * The contents of this file are subject to the terms of the
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Common Development and Distribution License, Version 1.0 only
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * (the "License"). You may not use this file except in compliance
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * with the License.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * See the License for the specific language governing permissions
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * and limitations under the License.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * When distributing Covered Code, include this CDDL HEADER in each
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * If applicable, add the following below this CDDL HEADER, with the
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * fields enclosed by brackets "[]" replaced with your own identifying
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * information: Portions Copyright [yyyy] [name of copyright owner]
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * CDDL HEADER END
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Use is subject to license terms.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson#pragma ident "%Z%%M% %I% %E% SMI"
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * This is the loadable module wrapper.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlsonstatic int lofsinit(int, char *);
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Stuff needed to support "zonedevfs" mode.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * LOFS mount options table
b00044a2eb43864b8718585d21949611a2ee59efJames Carlsonstatic char *xattr_cancel[] = { MNTOPT_NOXATTR, NULL };
b00044a2eb43864b8718585d21949611a2ee59efJames Carlsonstatic char *noxattr_cancel[] = { MNTOPT_XATTR, NULL };
b00044a2eb43864b8718585d21949611a2ee59efJames Carlsonstatic char *zonedevfs_cancel[] = { MNTOPT_LOFS_NOZONEDEVFS, NULL };
b00044a2eb43864b8718585d21949611a2ee59efJames Carlsonstatic char *nozonedevfs_cancel[] = { MNTOPT_LOFS_ZONEDEVFS, NULL };
b00044a2eb43864b8718585d21949611a2ee59efJames Carlsonstatic char *sub_cancel[] = { MNTOPT_LOFS_NOSUB, NULL };
b00044a2eb43864b8718585d21949611a2ee59efJames Carlsonstatic char *nosub_cancel[] = { MNTOPT_LOFS_SUB, NULL };
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * option name cancel option default arg flags
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * private data
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson { MNTOPT_LOFS_ZONEDEVFS, zonedevfs_cancel, NULL, 0,
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson { MNTOPT_LOFS_NOZONEDEVFS, nozonedevfs_cancel, NULL, 0,
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Module linkage information for the kernel.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * This is the module initialization routine.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Cleanup previously initialized work.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Don't allow the lofs module to be unloaded for now.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * There is a memory leak if it gets unloaded.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * lo mount vfsop
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson * Set up mount info record and attach it to vfs struct.
b00044a2eb43864b8718585d21949611a2ee59efJames Carlson struct vnode *srootvp = NULL; /* the server's root */
int nodev;
return (EPERM);
return (EPERM);
return (EBUSY);
&realrootvp))
return (error);
return (error);
if (is_zonedevfs) {
#ifdef LODEBUG
return (EPERM);
return (ENOTSUP);
#ifdef LODEBUG
#ifdef LODEBUG
return (EBUSY);
#ifdef LODEBUG
return (ENOSYS);
#ifdef LODEBUG
return (EIO);
short flag,
#ifdef LODEBUG
#ifdef LODEBUG
return (EIO);
int error;
if (error != 0) {
return (error);
if (error != 0) {
return (error);
return (ENXIO);
lofs_minor = 0;