zfs_fuid.h revision 89459e17032b6bb1d59eebd2b7c0d06859d4657c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_ZFS_FUID_H
#define _SYS_FS_ZFS_FUID_H
#ifdef _KERNEL
#include <sys/zfs_vfsops.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
/*
* Estimate space needed for one more fuid table entry.
* for now assume its current size + 1K
*/
#define FUID_INDEX(x) (x >> 32)
#define FUID_RID(x) (x & 0xffffffff)
/*
* FUIDs cause problems for the intent log
* we need to replay the creation of the FUID,
* but we can't count on the idmapper to be around
* and during replay the FUID index may be different than
* before. Also, if an ACL has 100 ACEs and 12 different
* domains we don't want to log 100 domain strings, but rather
* just the unique 12.
*/
/*
* The FUIDs in the log will index into
* domain string table and the bottom half will be the rid.
*/
typedef struct zfs_fuid {
} zfs_fuid_t;
/* list of unique domains */
typedef struct zfs_fuid_domain {
const char *z_domain; /* domain string */
/*
* FUID information necessary for logging create, setattr, and setacl.
*/
typedef struct zfs_fuid_info {
char **z_domain_table; /* Used during replay */
#ifdef _KERNEL
struct znode;
extern void zfs_fuid_destroy(zfsvfs_t *);
cred_t *, zfs_fuid_info_t **);
zfs_fuid_info_t **);
extern zfs_fuid_info_t *zfs_fuid_info_alloc(void);
extern void zfs_fuid_info_free(zfs_fuid_info_t *);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FS_ZFS_FUID_H */