diff options
Diffstat (limited to 'fs/xfs/xfs_alloc.h')
-rw-r--r-- | fs/xfs/xfs_alloc.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/fs/xfs/xfs_alloc.h b/fs/xfs/xfs_alloc.h index 599bffa39784..895009a97271 100644 --- a/fs/xfs/xfs_alloc.h +++ b/fs/xfs/xfs_alloc.h | |||
@@ -22,20 +22,21 @@ struct xfs_buf; | |||
22 | struct xfs_mount; | 22 | struct xfs_mount; |
23 | struct xfs_perag; | 23 | struct xfs_perag; |
24 | struct xfs_trans; | 24 | struct xfs_trans; |
25 | struct xfs_busy_extent; | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * Freespace allocation types. Argument to xfs_alloc_[v]extent. | 28 | * Freespace allocation types. Argument to xfs_alloc_[v]extent. |
28 | */ | 29 | */ |
29 | typedef enum xfs_alloctype | 30 | #define XFS_ALLOCTYPE_ANY_AG 0x01 /* allocate anywhere, use rotor */ |
30 | { | 31 | #define XFS_ALLOCTYPE_FIRST_AG 0x02 /* ... start at ag 0 */ |
31 | XFS_ALLOCTYPE_ANY_AG, /* allocate anywhere, use rotor */ | 32 | #define XFS_ALLOCTYPE_START_AG 0x04 /* anywhere, start in this a.g. */ |
32 | XFS_ALLOCTYPE_FIRST_AG, /* ... start at ag 0 */ | 33 | #define XFS_ALLOCTYPE_THIS_AG 0x08 /* anywhere in this a.g. */ |
33 | XFS_ALLOCTYPE_START_AG, /* anywhere, start in this a.g. */ | 34 | #define XFS_ALLOCTYPE_START_BNO 0x10 /* near this block else anywhere */ |
34 | XFS_ALLOCTYPE_THIS_AG, /* anywhere in this a.g. */ | 35 | #define XFS_ALLOCTYPE_NEAR_BNO 0x20 /* in this a.g. and near this block */ |
35 | XFS_ALLOCTYPE_START_BNO, /* near this block else anywhere */ | 36 | #define XFS_ALLOCTYPE_THIS_BNO 0x40 /* at exactly this block */ |
36 | XFS_ALLOCTYPE_NEAR_BNO, /* in this a.g. and near this block */ | 37 | |
37 | XFS_ALLOCTYPE_THIS_BNO /* at exactly this block */ | 38 | /* this should become an enum again when the tracing code is fixed */ |
38 | } xfs_alloctype_t; | 39 | typedef unsigned int xfs_alloctype_t; |
39 | 40 | ||
40 | #define XFS_ALLOC_TYPES \ | 41 | #define XFS_ALLOC_TYPES \ |
41 | { XFS_ALLOCTYPE_ANY_AG, "ANY_AG" }, \ | 42 | { XFS_ALLOCTYPE_ANY_AG, "ANY_AG" }, \ |
@@ -119,15 +120,13 @@ xfs_alloc_longest_free_extent(struct xfs_mount *mp, | |||
119 | #ifdef __KERNEL__ | 120 | #ifdef __KERNEL__ |
120 | 121 | ||
121 | void | 122 | void |
122 | xfs_alloc_mark_busy(xfs_trans_t *tp, | 123 | xfs_alloc_busy_insert(xfs_trans_t *tp, |
123 | xfs_agnumber_t agno, | 124 | xfs_agnumber_t agno, |
124 | xfs_agblock_t bno, | 125 | xfs_agblock_t bno, |
125 | xfs_extlen_t len); | 126 | xfs_extlen_t len); |
126 | 127 | ||
127 | void | 128 | void |
128 | xfs_alloc_clear_busy(xfs_trans_t *tp, | 129 | xfs_alloc_busy_clear(struct xfs_mount *mp, struct xfs_busy_extent *busyp); |
129 | xfs_agnumber_t ag, | ||
130 | int idx); | ||
131 | 130 | ||
132 | #endif /* __KERNEL__ */ | 131 | #endif /* __KERNEL__ */ |
133 | 132 | ||