summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ag.h
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2010-01-11 12:47:49 +0100
committerAlex Elder <aelder@sgi.com>2010-01-15 22:34:39 +0100
commite57336ff7fc7520bec7b3a7741043bdebaf622ea (patch)
tree6a1196e925f2cb7fc2cd5b9ca5d9510166088be2 /fs/xfs/xfs_ag.h
parentxfs: handle ENOMEM correctly during initialisation of perag structures (diff)
downloadlinux-e57336ff7fc7520bec7b3a7741043bdebaf622ea.tar.xz
linux-e57336ff7fc7520bec7b3a7741043bdebaf622ea.zip
xfs: embed the pagb_list array in the perag structure
Now that the perag structure is allocated memory rather than held in an array, we don't need to have the busy extent array external to the structure. Embed it into the perag structure to avoid needing an extra allocation when setting up. Signed-off-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_ag.h')
-rw-r--r--fs/xfs/xfs_ag.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h
index 963bc2700bf7..b1a5a1ff88ea 100644
--- a/fs/xfs/xfs_ag.h
+++ b/fs/xfs/xfs_ag.h
@@ -187,14 +187,8 @@ typedef struct xfs_perag_busy {
/*
* Per-ag incore structure, copies of information in agf and agi,
* to improve the performance of allocation group selection.
- *
- * pick sizes which fit in allocation buckets well
*/
-#if (BITS_PER_LONG == 32)
-#define XFS_PAGB_NUM_SLOTS 84
-#elif (BITS_PER_LONG == 64)
#define XFS_PAGB_NUM_SLOTS 128
-#endif
typedef struct xfs_perag {
struct xfs_mount *pag_mount; /* owner filesystem */
@@ -212,8 +206,6 @@ typedef struct xfs_perag {
__uint32_t pagf_btreeblks; /* # of blocks held in AGF btrees */
xfs_agino_t pagi_freecount; /* number of free inodes */
xfs_agino_t pagi_count; /* number of allocated inodes */
- int pagb_count; /* pagb slots in use */
- xfs_perag_busy_t *pagb_list; /* unstable blocks */
/*
* Inode allocation search lookup optimisation.
@@ -232,6 +224,8 @@ typedef struct xfs_perag {
rwlock_t pag_ici_lock; /* incore inode lock */
struct radix_tree_root pag_ici_root; /* incore inode cache root */
#endif
+ int pagb_count; /* pagb slots in use */
+ xfs_perag_busy_t pagb_list[XFS_PAGB_NUM_SLOTS]; /* unstable blocks */
} xfs_perag_t;
/*