[CPUFREQ] ondemand governor automatic downscaling
[linux-2.6/mini2440.git] / fs / xfs / xfs_itable.h
blob2be9d1805ab237f27ee34e0f63dcfecbcdade349
1 /*
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:
26 * http://www.sgi.com
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,
42 xfs_ino_t ino,
43 void __user *buffer,
44 int ubsize,
45 void *private_data,
46 xfs_daddr_t bno,
47 int *ubused,
48 void *dip,
49 int *stat);
52 * Values for stat return value.
54 #define BULKSTAT_RV_NOTHING 0
55 #define BULKSTAT_RV_DIDONE 1
56 #define BULKSTAT_RV_GIVEUP 2
59 * Values for bulkstat flag argument.
61 #define BULKSTAT_FG_IGET 0x1 /* Go through the buffer cache */
62 #define BULKSTAT_FG_QUICK 0x2 /* No iget, walk the dinode cluster */
63 #define BULKSTAT_FG_VFSLOCKED 0x4 /* Already have vfs lock */
66 * Return stat information in bulk (by-inode) for the filesystem.
68 int /* error status */
69 xfs_bulkstat(
70 xfs_mount_t *mp, /* mount point for filesystem */
71 xfs_ino_t *lastino, /* last inode returned */
72 int *count, /* size of buffer/count returned */
73 bulkstat_one_pf formatter, /* func that'd fill a single buf */
74 void *private_data, /* private data for formatter */
75 size_t statstruct_size,/* sizeof struct that we're filling */
76 char __user *ubuffer,/* buffer with inode stats */
77 int flags, /* flag to control access method */
78 int *done); /* 1 if there're more stats to get */
80 int
81 xfs_bulkstat_single(
82 xfs_mount_t *mp,
83 xfs_ino_t *lastinop,
84 char __user *buffer,
85 int *done);
87 int
88 xfs_bulkstat_one(
89 xfs_mount_t *mp,
90 xfs_ino_t ino,
91 void __user *buffer,
92 int ubsize,
93 void *private_data,
94 xfs_daddr_t bno,
95 int *ubused,
96 void *dibuff,
97 int *stat);
99 int /* error status */
100 xfs_inumbers(
101 xfs_mount_t *mp, /* mount point for filesystem */
102 xfs_ino_t *last, /* last inode returned */
103 int *count, /* size of buffer/count returned */
104 xfs_inogrp_t __user *buffer);/* buffer with inode info */
106 #endif /* __XFS_ITABLE_H__ */