diff options
Diffstat (limited to 'fs/xfs/xfs_bmap.h')
-rw-r--r-- | fs/xfs/xfs_bmap.h | 58 |
1 files changed, 21 insertions, 37 deletions
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h index e6d22ec9b2e4..2e0717a01309 100644 --- a/fs/xfs/xfs_bmap.h +++ b/fs/xfs/xfs_bmap.h | |||
@@ -1,33 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
3 | * All Rights Reserved. | ||
3 | * | 4 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
7 | * | 8 | * |
8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | ||
11 | * | 13 | * |
12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
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 | */ | 17 | */ |
32 | #ifndef __XFS_BMAP_H__ | 18 | #ifndef __XFS_BMAP_H__ |
33 | #define __XFS_BMAP_H__ | 19 | #define __XFS_BMAP_H__ |
@@ -77,12 +63,11 @@ typedef struct xfs_bmap_free | |||
77 | /* combine contig. space */ | 63 | /* combine contig. space */ |
78 | #define XFS_BMAPI_CONTIG 0x400 /* must allocate only one extent */ | 64 | #define XFS_BMAPI_CONTIG 0x400 /* must allocate only one extent */ |
79 | 65 | ||
80 | #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAPI_AFLAG) | ||
81 | int xfs_bmapi_aflag(int w); | ||
82 | #define XFS_BMAPI_AFLAG(w) xfs_bmapi_aflag(w) | 66 | #define XFS_BMAPI_AFLAG(w) xfs_bmapi_aflag(w) |
83 | #else | 67 | static inline int xfs_bmapi_aflag(int w) |
84 | #define XFS_BMAPI_AFLAG(w) ((w) == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0) | 68 | { |
85 | #endif | 69 | return (w == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0); |
70 | } | ||
86 | 71 | ||
87 | /* | 72 | /* |
88 | * Special values for xfs_bmbt_irec_t br_startblock field. | 73 | * Special values for xfs_bmbt_irec_t br_startblock field. |
@@ -90,14 +75,12 @@ int xfs_bmapi_aflag(int w); | |||
90 | #define DELAYSTARTBLOCK ((xfs_fsblock_t)-1LL) | 75 | #define DELAYSTARTBLOCK ((xfs_fsblock_t)-1LL) |
91 | #define HOLESTARTBLOCK ((xfs_fsblock_t)-2LL) | 76 | #define HOLESTARTBLOCK ((xfs_fsblock_t)-2LL) |
92 | 77 | ||
93 | #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_INIT) | ||
94 | void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp); | ||
95 | #define XFS_BMAP_INIT(flp,fbp) xfs_bmap_init(flp,fbp) | 78 | #define XFS_BMAP_INIT(flp,fbp) xfs_bmap_init(flp,fbp) |
96 | #else | 79 | static inline void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp) |
97 | #define XFS_BMAP_INIT(flp,fbp) \ | 80 | { |
98 | ((flp)->xbf_first = NULL, (flp)->xbf_count = 0, \ | 81 | ((flp)->xbf_first = NULL, (flp)->xbf_count = 0, \ |
99 | (flp)->xbf_low = 0, *(fbp) = NULLFSBLOCK) | 82 | (flp)->xbf_low = 0, *(fbp) = NULLFSBLOCK); |
100 | #endif | 83 | } |
101 | 84 | ||
102 | /* | 85 | /* |
103 | * Argument structure for xfs_bmap_alloc. | 86 | * Argument structure for xfs_bmap_alloc. |
@@ -156,7 +139,8 @@ xfs_bmap_trace_exlist( | |||
156 | int /* error code */ | 139 | int /* error code */ |
157 | xfs_bmap_add_attrfork( | 140 | xfs_bmap_add_attrfork( |
158 | struct xfs_inode *ip, /* incore inode pointer */ | 141 | struct xfs_inode *ip, /* incore inode pointer */ |
159 | int rsvd); /* flag for reserved block allocation */ | 142 | int size, /* space needed for new attribute */ |
143 | int rsvd); /* flag for reserved block allocation */ | ||
160 | 144 | ||
161 | /* | 145 | /* |
162 | * Add the extent to the list of extents to be free at transaction end. | 146 | * Add the extent to the list of extents to be free at transaction end. |