Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181790
b: refs/heads/master
c: e57336f
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Alex Elder committed Jan 15, 2010
1 parent 973600a commit 3bbcd33
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b26c5825e023b1bccac7afd174ebe55b8905cb1
refs/heads/master: e57336ff7fc7520bec7b3a7741043bdebaf622ea
10 changes: 2 additions & 8 deletions trunk/fs/xfs/xfs_ag.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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.
Expand All @@ -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;

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/xfs/xfs_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2200,8 +2200,8 @@ xfs_alloc_read_agf(
pag->pagf_levels[XFS_BTNUM_CNTi] =
be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi]);
spin_lock_init(&pag->pagb_lock);
pag->pagb_list = kmem_zalloc(XFS_PAGB_NUM_SLOTS *
sizeof(xfs_perag_busy_t), KM_SLEEP);
pag->pagb_count = 0;
memset(pag->pagb_list, 0, sizeof(pag->pagb_list));
pag->pagf_init = 1;
}
#ifdef DEBUG
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ xfs_free_perag(
for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) {
spin_lock(&mp->m_perag_lock);
pag = radix_tree_delete(&mp->m_perag_tree, agno);
ASSERT(pag);
ASSERT(atomic_read(&pag->pag_ref) == 0);
spin_unlock(&mp->m_perag_lock);
ASSERT(pag);
kmem_free(pag->pagb_list);
kmem_free(pag);
}
}
Expand Down

0 comments on commit 3bbcd33

Please sign in to comment.