1*13043STim.Haley@Sun.COM /* 2*13043STim.Haley@Sun.COM * CDDL HEADER START 3*13043STim.Haley@Sun.COM * 4*13043STim.Haley@Sun.COM * The contents of this file are subject to the terms of the 5*13043STim.Haley@Sun.COM * Common Development and Distribution License (the "License"). 6*13043STim.Haley@Sun.COM * You may not use this file except in compliance with the License. 7*13043STim.Haley@Sun.COM * 8*13043STim.Haley@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*13043STim.Haley@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*13043STim.Haley@Sun.COM * See the License for the specific language governing permissions 11*13043STim.Haley@Sun.COM * and limitations under the License. 12*13043STim.Haley@Sun.COM * 13*13043STim.Haley@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*13043STim.Haley@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*13043STim.Haley@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*13043STim.Haley@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*13043STim.Haley@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*13043STim.Haley@Sun.COM * 19*13043STim.Haley@Sun.COM * CDDL HEADER END 20*13043STim.Haley@Sun.COM */ 21*13043STim.Haley@Sun.COM /* 22*13043STim.Haley@Sun.COM * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 23*13043STim.Haley@Sun.COM */ 24*13043STim.Haley@Sun.COM 25*13043STim.Haley@Sun.COM #ifndef _SYS_FS_ZFS_STAT_H 26*13043STim.Haley@Sun.COM #define _SYS_FS_ZFS_STAT_H 27*13043STim.Haley@Sun.COM 28*13043STim.Haley@Sun.COM #ifdef _KERNEL 29*13043STim.Haley@Sun.COM #include <sys/isa_defs.h> 30*13043STim.Haley@Sun.COM #include <sys/types32.h> 31*13043STim.Haley@Sun.COM #include <sys/dmu.h> 32*13043STim.Haley@Sun.COM #endif 33*13043STim.Haley@Sun.COM 34*13043STim.Haley@Sun.COM #ifdef __cplusplus 35*13043STim.Haley@Sun.COM extern "C" { 36*13043STim.Haley@Sun.COM #endif 37*13043STim.Haley@Sun.COM 38*13043STim.Haley@Sun.COM /* 39*13043STim.Haley@Sun.COM * A limited number of zpl level stats are retrievable 40*13043STim.Haley@Sun.COM * with an ioctl. zfs diff is the current consumer. 41*13043STim.Haley@Sun.COM */ 42*13043STim.Haley@Sun.COM typedef struct zfs_stat { 43*13043STim.Haley@Sun.COM uint64_t zs_gen; 44*13043STim.Haley@Sun.COM uint64_t zs_mode; 45*13043STim.Haley@Sun.COM uint64_t zs_links; 46*13043STim.Haley@Sun.COM uint64_t zs_ctime[2]; 47*13043STim.Haley@Sun.COM } zfs_stat_t; 48*13043STim.Haley@Sun.COM 49*13043STim.Haley@Sun.COM extern int zfs_obj_to_stats(objset_t *osp, uint64_t obj, zfs_stat_t *sb, 50*13043STim.Haley@Sun.COM char *buf, int len); 51*13043STim.Haley@Sun.COM 52*13043STim.Haley@Sun.COM #ifdef __cplusplus 53*13043STim.Haley@Sun.COM } 54*13043STim.Haley@Sun.COM #endif 55*13043STim.Haley@Sun.COM 56*13043STim.Haley@Sun.COM #endif /* _SYS_FS_ZFS_STAT_H */ 57