| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 modify it | 
 | 5 |  * under the terms of version 2 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, but | 
 | 9 |  * WITHOUT ANY WARRANTY; without even the implied warranty of | 
 | 10 |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 
 | 11 |  * | 
 | 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. | 
 | 18 |  * | 
 | 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. | 
 | 22 |  * | 
 | 23 |  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | 
 | 24 |  * Mountain View, CA  94043, or: | 
 | 25 |  * | 
 | 26 |  * http://www.sgi.com | 
 | 27 |  * | 
 | 28 |  * For further information regarding this notice, see: | 
 | 29 |  * | 
 | 30 |  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | 
 | 31 |  */ | 
 | 32 | #ifndef __XFS_ITABLE_H__ | 
 | 33 | #define	__XFS_ITABLE_H__ | 
 | 34 |  | 
 | 35 | /* | 
 | 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 | 
 | 40 |  */ | 
 | 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); | 
 | 50 |  | 
 | 51 | /* | 
 | 52 |  * Values for stat return value. | 
 | 53 |  */ | 
 | 54 | #define	BULKSTAT_RV_NOTHING	0 | 
 | 55 | #define	BULKSTAT_RV_DIDONE	1 | 
 | 56 | #define	BULKSTAT_RV_GIVEUP	2 | 
 | 57 |  | 
 | 58 | /* | 
 | 59 |  * Values for bulkstat flag argument. | 
 | 60 |  */ | 
 | 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 */ | 
 | 64 |  | 
 | 65 | /* | 
 | 66 |  * Return stat information in bulk (by-inode) for the filesystem. | 
 | 67 |  */ | 
 | 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 */ | 
 | 79 |  | 
 | 80 | int | 
 | 81 | xfs_bulkstat_single( | 
 | 82 | 	xfs_mount_t		*mp, | 
 | 83 | 	xfs_ino_t		*lastinop, | 
 | 84 | 	char			__user *buffer, | 
 | 85 | 	int			*done); | 
 | 86 |  | 
 | 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); | 
 | 98 |  | 
 | 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 */ | 
 | 105 |  | 
 | 106 | #endif	/* __XFS_ITABLE_H__ */ |