Make sure to protect access to the block usage tracking btree with
the ag_lock.
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
agno = XFS_FSB_TO_AGNO(mp, bno);
agbno = XFS_FSB_TO_AGBNO(mp, bno);
+ pthread_mutex_lock(&ag_locks[agno]);
state = get_bmap(agno, agbno);
switch (state) {
case XR_E_UNKNOWN:
state, ino, (__uint64_t) bno);
break;
}
+ pthread_mutex_unlock(&ag_locks[agno]);
} else {
/*
* attribute fork for realtime files is in the regular