xfs: always use iget in bulkstat
[deliverable/linux.git] / fs / xfs / xfs_itable.h
1 /*
2 * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
3 *
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.
7 *
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.
12 *
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
16 */
17 #ifndef __XFS_ITABLE_H__
18 #define __XFS_ITABLE_H__
19
20 /*
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
25 */
26 typedef int (*bulkstat_one_pf)(struct xfs_mount *mp,
27 xfs_ino_t ino,
28 void __user *buffer,
29 int ubsize,
30 xfs_daddr_t bno,
31 int *ubused,
32 int *stat);
33
34 /*
35 * Values for stat return value.
36 */
37 #define BULKSTAT_RV_NOTHING 0
38 #define BULKSTAT_RV_DIDONE 1
39 #define BULKSTAT_RV_GIVEUP 2
40
41 /*
42 * Return stat information in bulk (by-inode) for the filesystem.
43 */
44 int /* error status */
45 xfs_bulkstat(
46 xfs_mount_t *mp, /* mount point for filesystem */
47 xfs_ino_t *lastino, /* last inode returned */
48 int *count, /* size of buffer/count returned */
49 bulkstat_one_pf formatter, /* func that'd fill a single buf */
50 size_t statstruct_size,/* sizeof struct that we're filling */
51 char __user *ubuffer,/* buffer with inode stats */
52 int *done); /* 1 if there are more stats to get */
53
54 int
55 xfs_bulkstat_single(
56 xfs_mount_t *mp,
57 xfs_ino_t *lastinop,
58 char __user *buffer,
59 int *done);
60
61 typedef int (*bulkstat_one_fmt_pf)( /* used size in bytes or negative error */
62 void __user *ubuffer, /* buffer to write to */
63 int ubsize, /* remaining user buffer sz */
64 int *ubused, /* bytes used by formatter */
65 const xfs_bstat_t *buffer); /* buffer to read from */
66
67 int
68 xfs_bulkstat_one_int(
69 xfs_mount_t *mp,
70 xfs_ino_t ino,
71 void __user *buffer,
72 int ubsize,
73 bulkstat_one_fmt_pf formatter,
74 xfs_daddr_t bno,
75 int *ubused,
76 int *stat);
77
78 int
79 xfs_bulkstat_one(
80 xfs_mount_t *mp,
81 xfs_ino_t ino,
82 void __user *buffer,
83 int ubsize,
84 xfs_daddr_t bno,
85 int *ubused,
86 int *stat);
87
88 typedef int (*inumbers_fmt_pf)(
89 void __user *ubuffer, /* buffer to write to */
90 const xfs_inogrp_t *buffer, /* buffer to read from */
91 long count, /* # of elements to read */
92 long *written); /* # of bytes written */
93
94 int
95 xfs_inumbers_fmt(
96 void __user *ubuffer, /* buffer to write to */
97 const xfs_inogrp_t *buffer, /* buffer to read from */
98 long count, /* # of elements to read */
99 long *written); /* # of bytes written */
100
101 int /* error status */
102 xfs_inumbers(
103 xfs_mount_t *mp, /* mount point for filesystem */
104 xfs_ino_t *last, /* last inode returned */
105 int *count, /* size of buffer/count returned */
106 void __user *buffer, /* buffer with inode info */
107 inumbers_fmt_pf formatter);
108
109 #endif /* __XFS_ITABLE_H__ */
This page took 0.033947 seconds and 5 git commands to generate.