]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - include/jdm.h
libxfs: plumb in refcount deferred op log items
[thirdparty/xfsprogs-dev.git] / include / jdm.h
CommitLineData
2bd0ea18 1/*
f302e9e4
NS
2 * Copyright (c) 2000-2002, 2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
dfc130f3 4 *
f302e9e4
NS
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation.
dfc130f3 8 *
f302e9e4
NS
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
dfc130f3 13 *
f302e9e4
NS
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2bd0ea18
NS
17 */
18#ifndef __JDM_H__
19#define __JDM_H__
20
21typedef int intgen_t;
89184fbc
AG
22typedef void jdm_fshandle_t; /* filesystem handle */
23typedef void jdm_filehandle_t; /* filehandle */
2bd0ea18
NS
24
25struct xfs_bstat;
14290264 26struct attrlist_cursor;
258b00ea 27struct parent;
89184fbc
AG
28
29extern jdm_fshandle_t *
30jdm_getfshandle( char *mntpnt);
31
32extern void
33jdm_new_filehandle( jdm_filehandle_t **handlep, /* new filehandle */
34 size_t *hlen, /* new filehandle size */
35 jdm_fshandle_t *fshandlep, /* filesystem filehandle */
36 struct xfs_bstat *sp); /* bulkstat info */
dfc130f3 37
89184fbc
AG
38extern void
39jdm_delete_filehandle( jdm_filehandle_t *handlep,/* filehandle to delete */
40 size_t hlen); /* filehandle size */
41
42extern intgen_t
43jdm_open( jdm_fshandle_t *fshandlep,
44 struct xfs_bstat *sp,
45 intgen_t oflags);
46
47extern intgen_t
48jdm_readlink( jdm_fshandle_t *fshandlep,
49 struct xfs_bstat *sp,
50 char *bufp,
51 size_t bufsz);
2bd0ea18 52
14290264
NS
53extern intgen_t
54jdm_attr_multi( jdm_fshandle_t *fshp,
55 xfs_bstat_t *statp,
56 char *bufp, int rtrvcnt, int flags);
57
58extern intgen_t
59jdm_attr_list( jdm_fshandle_t *fshp,
60 xfs_bstat_t *statp,
61 char *bufp, size_t bufsz, int flags,
62 struct attrlist_cursor *cursor);
63
258b00ea 64extern int
60ac13e8 65jdm_parents( jdm_fshandle_t *fshp,
258b00ea
TS
66 xfs_bstat_t *statp,
67 struct parent *bufp, size_t bufsz,
60ac13e8 68 unsigned int *count);
258b00ea
TS
69
70extern int
60ac13e8 71jdm_parentpaths( jdm_fshandle_t *fshp,
258b00ea
TS
72 xfs_bstat_t *statp,
73 struct parent *bufp, size_t bufsz,
60ac13e8 74 unsigned int *count);
258b00ea 75
2bd0ea18
NS
76/* macro for determining the size of a structure member */
77#define sizeofmember( t, m ) sizeof( ( ( t * )0 )->m )
78
79/* macro for calculating the offset of a structure member */
80#define offsetofmember( t, m ) ( ( size_t )( char * )&( ( ( t * )0 )->m ) )
81
82#endif /* __JDM_H__ */