2 * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
32 #ifndef __XFS_ITABLE_H__
33 #define __XFS_ITABLE_H__
36 * xfs_bulkstat() is used to fill in xfs_bstat structures as well as dm_stat
37 * structures (by the dmi library). This is a pointer to a formatter function
38 * that will iget the inode and fill in the appropriate structure.
39 * see xfs_bulkstat_one() and xfs_dm_bulkstat_one() in dmapi_xfs.c
41 typedef int (*bulkstat_one_pf)(struct xfs_mount *mp,
53 * Values for stat return value.
55 #define BULKSTAT_RV_NOTHING 0
56 #define BULKSTAT_RV_DIDONE 1
57 #define BULKSTAT_RV_GIVEUP 2
60 * Values for bulkstat flag argument.
62 #define BULKSTAT_FG_IGET 0x1 /* Go through the buffer cache */
63 #define BULKSTAT_FG_QUICK 0x2 /* No iget, walk the dinode cluster */
64 #define BULKSTAT_FG_VFSLOCKED 0x4 /* Already have vfs lock */
67 * Return stat information in bulk (by-inode) for the filesystem.
69 int /* error status */
71 xfs_mount_t *mp, /* mount point for filesystem */
72 xfs_trans_t *tp, /* transaction pointer */
73 xfs_ino_t *lastino, /* last inode returned */
74 int *count, /* size of buffer/count returned */
75 bulkstat_one_pf formatter, /* func that'd fill a single buf */
76 void *private_data, /* private data for formatter */
77 size_t statstruct_size,/* sizeof struct that we're filling */
78 xfs_caddr_t ubuffer, /* buffer with inode stats */
79 int flags, /* flag to control access method */
80 int *done); /* 1 if there're more stats to get */
102 int /* error status */
104 xfs_mount_t *mp, /* mount point for filesystem */
105 xfs_trans_t *tp, /* transaction pointer */
106 xfs_ino_t *last, /* last inode returned */
107 int *count, /* size of buffer/count returned */
108 xfs_caddr_t buffer);/* buffer with inode descriptions */
110 #endif /* __XFS_ITABLE_H__ */