[XFS] Fix block reservation mechanism.
authorDavid Chinner <dgc@sgi.com>
Sat, 10 Feb 2007 07:36:17 +0000 (18:36 +1100)
committerTim Shimmin <tes@sgi.com>
Sat, 10 Feb 2007 07:36:17 +0000 (18:36 +1100)
commitdbcabad19aa91dc9bc7176fd2853fa74f724cd2f
treeb65139c6c19541503444817af740ba265f8b838f
parent20f4ebf2bf2f57c1a9abb3655391336cc90314b3
[XFS] Fix block reservation mechanism.

The block reservation mechanism has been broken since the per-cpu
superblock counters were introduced. Make the block reservation code work
with the per-cpu counters by syncing the counters, snapshotting the amount
of available space and then doing a modifcation of the counter state
according to the result. Continue in a loop until we either have no space
available or we reserve some space.

SGI-PV: 956323
SGI-Modid: xfs-linux-melb:xfs-kern:27895a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/xfs_fsops.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_vfsops.c