2 * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms 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,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write the Free Software Foundation,
15 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 #ifndef __XFS_ITABLE_H__
18 #define __XFS_ITABLE_H__
21 * xfs_bulkstat() is used to fill in xfs_bstat structures as well as dm_stat
22 * structures (by the dmi library). This is a pointer to a formatter function
23 * that will iget the inode and fill in the appropriate structure.
24 * see xfs_bulkstat_one() and xfs_dm_bulkstat_one() in dmapi_xfs.c
26 typedef int (*bulkstat_one_pf
)(struct xfs_mount
*mp
,
37 * Values for stat return value.
39 #define BULKSTAT_RV_NOTHING 0
40 #define BULKSTAT_RV_DIDONE 1
41 #define BULKSTAT_RV_GIVEUP 2
44 * Values for bulkstat flag argument.
46 #define BULKSTAT_FG_IGET 0x1 /* Go through the buffer cache */
47 #define BULKSTAT_FG_QUICK 0x2 /* No iget, walk the dinode cluster */
48 #define BULKSTAT_FG_INLINE 0x4 /* No iget if inline attrs */
51 * Return stat information in bulk (by-inode) for the filesystem.
53 int /* error status */
55 xfs_mount_t
*mp
, /* mount point for filesystem */
56 xfs_ino_t
*lastino
, /* last inode returned */
57 int *count
, /* size of buffer/count returned */
58 bulkstat_one_pf formatter
, /* func that'd fill a single buf */
59 void *private_data
, /* private data for formatter */
60 size_t statstruct_size
,/* sizeof struct that we're filling */
61 char __user
*ubuffer
,/* buffer with inode stats */
62 int flags
, /* flag to control access method */
63 int *done
); /* 1 if there are more stats to get */
89 int /* error status */
91 xfs_mount_t
*mp
, /* mount point for filesystem */
92 xfs_ino_t
*last
, /* last inode returned */
93 int *count
, /* size of buffer/count returned */
94 xfs_inogrp_t __user
*buffer
);/* buffer with inode info */
96 #endif /* __XFS_ITABLE_H__ */