~ubuntu-branches/ubuntu/hoary/xfsprogs/hoary

« back to all changes in this revision

Viewing changes to include/xfs_dir_sf.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2004-07-28 21:11:38 UTC
  • Revision ID: james.westby@ubuntu.com-20040728211138-0v4pdnunnp7na5lm
Tags: 2.6.20-1
* New upstream release.
* Fix xfs_io segfault on non-XFS files.  (closes: #260470)
* Fix packaging botch, deleted files included.  (closes: #260491)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
3
 
 * 
 
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify it
5
5
 * under the terms of version 2 of the GNU General Public License as
6
6
 * published by the Free Software Foundation.
7
 
 * 
 
7
 *
8
8
 * This program is distributed in the hope that it would be useful, but
9
9
 * WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 
 * 
 
11
 *
12
12
 * Further, this software is distributed without any warranty that it is
13
13
 * free of the rightful claim of any third person regarding infringement
14
14
 * or the like.  Any license provided herein, whether implied or
15
15
 * otherwise, applies only to this software file.  Patent licenses, if
16
16
 * any, provided herein do not apply to combinations of this program with
17
17
 * other software, or any other product whatsoever.
18
 
 * 
 
18
 *
19
19
 * You should have received a copy of the GNU General Public License along
20
20
 * with this program; if not, write the Free Software Foundation, Inc., 59
21
21
 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
22
 
 * 
 
22
 *
23
23
 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24
24
 * Mountain View, CA  94043, or:
25
 
 * 
26
 
 * http://www.sgi.com 
27
 
 * 
28
 
 * For further information regarding this notice, see: 
29
 
 * 
 
25
 *
 
26
 * http://www.sgi.com
 
27
 *
 
28
 * For further information regarding this notice, see:
 
29
 *
30
30
 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31
31
 */
32
32
#ifndef __XFS_DIR_SF_H__
46
46
 * be calculated on the fly.
47
47
 *
48
48
 * Entries are packed toward the top as tight as possible.  The header
49
 
 * and the elements much be bcopy()'d out into a work area to get correct
 
49
 * and the elements much be memcpy'd out into a work area to get correct
50
50
 * alignment for the inode number fields.
51
51
 */
52
52
typedef struct xfs_dir_shortform {
82
82
#define XFS_DIR_SF_GET_DIRINO_ARCH(from,to,arch)    xfs_dir_sf_get_dirino_arch(from, to, arch)
83
83
#define XFS_DIR_SF_GET_DIRINO(from,to)              xfs_dir_sf_get_dirino(from, to)
84
84
#else
85
 
#define XFS_DIR_SF_GET_DIRINO_ARCH(from,to,arch)    DIRINO_COPY_ARCH(from,to,arch)      
 
85
#define XFS_DIR_SF_GET_DIRINO_ARCH(from,to,arch)    DIRINO_COPY_ARCH(from,to,arch)
86
86
#define XFS_DIR_SF_GET_DIRINO(from,to)              DIRINO_COPY_ARCH(from,to,ARCH_NOCONVERT)
87
87
#endif
88
88
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_PUT_DIRINO)
126
126
               ((uint)sizeof(xfs_dir_sf_entry_t)-1)*(count) + (totallen))
127
127
#endif
128
128
 
129
 
#ifdef XFS_ALL_TRACE
130
 
#define XFS_DIR_TRACE
131
 
#endif
132
 
 
133
 
#if !defined(DEBUG)
134
 
#undef XFS_DIR_TRACE
135
 
#endif
 
129
#if defined(XFS_DIR_TRACE)
136
130
 
137
131
/*
138
132
 * Kernel tracing support for directories.
144
138
struct xfs_dir_leafblock;
145
139
struct xfs_dir_leaf_entry;
146
140
 
147
 
#define XFS_DIR_TRACE_SIZE      4096    /* size of global trace buffer */     
 
141
#define XFS_DIR_TRACE_SIZE      4096    /* size of global trace buffer */
 
142
extern ktrace_t *xfs_dir_trace_buf;
148
143
 
149
144
/*
150
145
 * Trace record types.
156
151
#define XFS_DIR_KTRACE_G_DUE    5       /* dp, uio, leaf entry */
157
152
#define XFS_DIR_KTRACE_G_DUC    6       /* dp, uio, cookie */
158
153
 
159
 
#if defined(XFS_DIR_TRACE)
160
 
 
161
154
void xfs_dir_trace_g_du(char *where, struct xfs_inode *dp, struct uio *uio);
162
155
void xfs_dir_trace_g_dub(char *where, struct xfs_inode *dp, struct uio *uio,
163
156
                              xfs_dablk_t bno);
170
163
void xfs_dir_trace_g_duc(char *where, struct xfs_inode *dp, struct uio *uio,
171
164
                              xfs_off_t cookie);
172
165
void xfs_dir_trace_enter(int type, char *where,
173
 
                             __psunsigned_t a0, __psunsigned_t a1,
174
 
                             __psunsigned_t a2, __psunsigned_t a3,
175
 
                             __psunsigned_t a4, __psunsigned_t a5,
176
 
                             __psunsigned_t a6, __psunsigned_t a7,
177
 
                             __psunsigned_t a8, __psunsigned_t a9,
178
 
                             __psunsigned_t a10, __psunsigned_t a11);
 
166
                             void *a0, void *a1, void *a2, void *a3,
 
167
                             void *a4, void *a5, void *a6, void *a7,
 
168
                             void *a8, void *a9, void *a10, void *a11);
179
169
#else
180
170
#define xfs_dir_trace_g_du(w,d,u)
181
171
#define xfs_dir_trace_g_dub(w,d,u,b)