dsl_dir.h revision 03bad06fbb261fd4a7151a70dfeff2f5041cce1f
/*
* 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 (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
*/
#ifndef _SYS_DSL_DIR_H
#define _SYS_DSL_DIR_H
#include <sys/dsl_pool.h>
#include <sys/dsl_synctask.h>
#include <sys/refcount.h>
#include <sys/zfs_context.h>
#ifdef __cplusplus
extern "C" {
#endif
struct dsl_dataset;
/*
* DD_FIELD_* are strings that are used in the "extensified" dsl_dir zap object.
* They should be of the format <reverse-dns>:<field>.
*/
#define DD_FIELD_FILESYSTEM_COUNT "com.joyent:filesystem_count"
#define DD_FIELD_SNAPSHOT_COUNT "com.joyent:snapshot_count"
typedef enum dd_used {
} dd_used_t;
#define DD_FLAG_USED_BREAKDOWN (1<<0)
typedef struct dsl_dir_phys {
/*
* how much space our children are accounting for; for leaf
* datasets, == physical space used by fs + snaps
*/
/* Administrative quota setting */
/* Administrative reservation setting */
struct dsl_dir {
/* These are immutable; no lock needed: */
/* Stable until user eviction; no lock needed: */
/* protected by lock on pool's dp_dirty_dirs list */
/* protected by dp_config_rwlock */
/* Protected by dd_lock */
/* gross estimate of space used by in-flight tx's */
/* amount of space we expect to write; == amount of dirty data */
/* protected by dd_lock; keep at end of struct for better locality */
char dd_myname[MAXNAMELEN];
};
inline dsl_dir_phys_t *
{
}
int dsl_dir_activate_fs_ss_limit(const char *);
cred_t *);
/* internal reserved dir name */
#define MOS_DIR_NAME "$MOS"
#define ORIGIN_DIR_NAME "$ORIGIN"
#define XLATION_DIR_NAME "$XLATION"
#define FREE_DIR_NAME "$FREE"
#define LEAK_DIR_NAME "$LEAK"
#ifdef ZFS_DEBUG
if (zfs_flags & ZFS_DEBUG_DPRINTF) { \
KM_SLEEP); \
} \
#else
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DSL_DIR_H */