Commit 29f11fce authored by Eric Sandeen's avatar Eric Sandeen Committed by Darrick J. Wong

xfs: #ifdef out perag code for userspace

The xfs_perag structure and initialization is unused in userspace,
so #ifdef it out with __KERNEL__ to facilitate the xfsprogs sync
and build.
Signed-off-by: default avatarEric Sandeen <esandeen@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 5b068aad
...@@ -248,6 +248,7 @@ xfs_initialize_perag( ...@@ -248,6 +248,7 @@ xfs_initialize_perag(
spin_unlock(&mp->m_perag_lock); spin_unlock(&mp->m_perag_lock);
radix_tree_preload_end(); radix_tree_preload_end();
#ifdef __KERNEL__
/* Place kernel structure only init below this point. */ /* Place kernel structure only init below this point. */
spin_lock_init(&pag->pag_ici_lock); spin_lock_init(&pag->pag_ici_lock);
spin_lock_init(&pag->pagb_lock); spin_lock_init(&pag->pagb_lock);
...@@ -257,6 +258,7 @@ xfs_initialize_perag( ...@@ -257,6 +258,7 @@ xfs_initialize_perag(
init_waitqueue_head(&pag->pagb_wait); init_waitqueue_head(&pag->pagb_wait);
pag->pagb_count = 0; pag->pagb_count = 0;
pag->pagb_tree = RB_ROOT; pag->pagb_tree = RB_ROOT;
#endif /* __KERNEL__ */
error = xfs_buf_hash_init(pag); error = xfs_buf_hash_init(pag);
if (error) if (error)
......
...@@ -64,6 +64,10 @@ struct xfs_perag { ...@@ -64,6 +64,10 @@ struct xfs_perag {
/* Blocks reserved for the reverse mapping btree. */ /* Blocks reserved for the reverse mapping btree. */
struct xfs_ag_resv pag_rmapbt_resv; struct xfs_ag_resv pag_rmapbt_resv;
/* for rcu-safe freeing */
struct rcu_head rcu_head;
#ifdef __KERNEL__
/* -- kernel only structures below this line -- */ /* -- kernel only structures below this line -- */
/* /*
...@@ -90,9 +94,6 @@ struct xfs_perag { ...@@ -90,9 +94,6 @@ struct xfs_perag {
spinlock_t pag_buf_lock; /* lock for pag_buf_hash */ spinlock_t pag_buf_lock; /* lock for pag_buf_hash */
struct rhashtable pag_buf_hash; struct rhashtable pag_buf_hash;
/* for rcu-safe freeing */
struct rcu_head rcu_head;
/* background prealloc block trimming */ /* background prealloc block trimming */
struct delayed_work pag_blockgc_work; struct delayed_work pag_blockgc_work;
...@@ -102,6 +103,7 @@ struct xfs_perag { ...@@ -102,6 +103,7 @@ struct xfs_perag {
* or have some other means to control concurrency. * or have some other means to control concurrency.
*/ */
struct rhashtable pagi_unlinked_hash; struct rhashtable pagi_unlinked_hash;
#endif /* __KERNEL__ */
}; };
int xfs_initialize_perag(struct xfs_mount *mp, xfs_agnumber_t agcount, int xfs_initialize_perag(struct xfs_mount *mp, xfs_agnumber_t agcount,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment