~ubuntu-branches/ubuntu/edgy/xfsprogs/edgy

« back to all changes in this revision

Viewing changes to include/xfs_buf_item.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
 
 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
3
 
 * 
 
2
 * Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
 
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_BUF_ITEM_H__
76
76
 */
77
77
#define XFS_BLI_CANCEL          0x2
78
78
/*
79
 
 * This flag indicates that the buffer contains on disk 
80
 
 * user or group dquots and may require special recovery handling.   
 
79
 * This flag indicates that the buffer contains on disk
 
80
 * user or group dquots and may require special recovery handling.
81
81
 */
82
82
#define XFS_BLI_UDQUOT_BUF      0x4
83
83
/* #define XFS_BLI_PDQUOT_BUF   0x8 */
96
96
#define XFS_BLI_STALE           0x04
97
97
#define XFS_BLI_LOGGED          0x08
98
98
#define XFS_BLI_INODE_ALLOC_BUF 0x10
 
99
#define XFS_BLI_STALE_INODE     0x20
99
100
 
100
101
 
101
102
#ifdef __KERNEL__
103
104
struct xfs_buf;
104
105
struct ktrace;
105
106
struct xfs_mount;
 
107
struct xfs_buf_log_item;
 
108
 
 
109
#if defined(XFS_BLI_TRACE)
 
110
#define XFS_BLI_TRACE_SIZE      32
 
111
 
 
112
void    xfs_buf_item_trace(char *, struct xfs_buf_log_item *);
 
113
#else
 
114
#define xfs_buf_item_trace(id, bip)
 
115
#endif
106
116
 
107
117
/*
108
118
 * This is the in core log item structure used to track information
115
125
        unsigned int            bli_flags;      /* misc flags */
116
126
        unsigned int            bli_recur;      /* lock recursion count */
117
127
        atomic_t                bli_refcount;   /* cnt of tp refs */
118
 
#ifdef DEBUG
 
128
#ifdef XFS_BLI_TRACE
119
129
        struct ktrace           *bli_trace;     /* event trace buf */
120
130
#endif
121
131
#ifdef XFS_TRANS_DEBUG
130
140
 * items which have been canceled and should not be replayed.
131
141
 */
132
142
typedef struct xfs_buf_cancel {
133
 
        xfs_daddr_t                     bc_blkno;
 
143
        xfs_daddr_t             bc_blkno;
134
144
        uint                    bc_len;
135
145
        int                     bc_refcount;
136
146
        struct xfs_buf_cancel   *bc_next;
137
147
} xfs_buf_cancel_t;
138
148
 
139
 
#define XFS_BLI_TRACE_SIZE      32
140
 
 
141
 
 
142
 
#if defined(XFS_ALL_TRACE)
143
 
#define XFS_BLI_TRACE
144
 
#endif
145
 
 
146
 
#if !defined(DEBUG)
147
 
#undef XFS_BLI_TRACE
148
 
#endif
149
 
 
150
 
#if defined(XFS_BLI_TRACE)
151
 
void    xfs_buf_item_trace(char *, xfs_buf_log_item_t *);
152
 
#else
153
 
#define xfs_buf_item_trace(id, bip)
154
 
#endif
155
 
 
156
149
void    xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *);
157
150
void    xfs_buf_item_relse(struct xfs_buf *);
158
151
void    xfs_buf_item_log(xfs_buf_log_item_t *, uint, uint);
159
152
uint    xfs_buf_item_dirty(xfs_buf_log_item_t *);
160
 
int     xfs_buf_item_bits(uint *, uint, uint);
161
 
int     xfs_buf_item_contig_bits(uint *, uint, uint);
162
 
int     xfs_buf_item_next_bit(uint *, uint, uint);
163
153
void    xfs_buf_attach_iodone(struct xfs_buf *,
164
154
                              void(*)(struct xfs_buf *, xfs_log_item_t *),
165
155
                              xfs_log_item_t *);
169
159
#ifdef XFS_TRANS_DEBUG
170
160
void
171
161
xfs_buf_item_flush_log_debug(
172
 
        struct xfs_buf *bp,                          
 
162
        struct xfs_buf *bp,
173
163
        uint    first,
174
164
        uint    last);
175
165
#else