diff options
Diffstat (limited to 'xlators/nfs/server/src/mount3.h')
| -rw-r--r-- | xlators/nfs/server/src/mount3.h | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/xlators/nfs/server/src/mount3.h b/xlators/nfs/server/src/mount3.h index f555bc7f1..7fc16ed57 100644 --- a/xlators/nfs/server/src/mount3.h +++ b/xlators/nfs/server/src/mount3.h @@ -1,20 +1,11 @@ /* - Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> + Copyright (c) 2010-2011 Gluster, Inc. <http://www.gluster.com> This file is part of GlusterFS. - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. */ #ifndef _MOUNT3_H_ @@ -34,6 +25,7 @@ #include "xdr-nfs3.h" #include "locking.h" #include "nfs3-fh.h" +#include "uuid.h" /* Registered with portmap */ #define GF_MOUNTV3_PORT 38465 @@ -49,7 +41,16 @@ mnt3svc_init (xlator_t *nfsx); extern rpcsvc_program_t * mnt1svc_init (xlator_t *nfsx); -/* Data structureused to store the list of mounts points currently +extern int +mount_init_state (xlator_t *nfsx); + +extern int +mount_reconfigure_state (xlator_t *nfsx, dict_t *options); + +void +mount_rewrite_rmtab (struct mount3_state *ms, char *new_rmtab); + +/* Data structure used to store the list of mounts points currently * in use by NFS clients. */ struct mountentry { @@ -64,6 +65,13 @@ struct mountentry { #define MNT3_EXPTYPE_VOLUME 1 #define MNT3_EXPTYPE_DIR 2 +/* Structure to hold export-dir AUTH parameter */ +struct host_auth_spec { + char *host_addr; /* Allowed IP or host name */ + int routeprefix; /* Routing prefix */ + struct host_auth_spec *next; /* Pointer to next AUTH struct */ +}; + struct mnt3_export { struct list_head explist; @@ -71,8 +79,17 @@ struct mnt3_export { * is exported or the subdirectory in the volume. */ char *expname; + /* + * IP address, hostname or subnets who are allowed to connect to expname + * subvolume or subdirectory + */ + struct host_auth_spec* hostspec; xlator_t *vol; int exptype; + + /* Extracted from nfs volume options if nfs.dynamicvolumes is on. + */ + uuid_t volumeid; }; struct mount3_state { @@ -93,9 +110,11 @@ struct mount3_state { gf_lock_t mountlock; /* Set to 0 if exporting full volumes is disabled. On by default. */ - int export_volumes; + gf_boolean_t export_volumes; + gf_boolean_t export_dirs; }; +#define gf_mnt3_export_dirs(mst) ((mst)->export_dirs) struct mount3_resolve_state { struct mnt3_export *exp; |
