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