diff options
author | David Chinner <dgc@sgi.com> | 2007-02-10 02:36:17 -0500 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-02-10 02:36:17 -0500 |
commit | dbcabad19aa91dc9bc7176fd2853fa74f724cd2f (patch) | |
tree | b65139c6c19541503444817af740ba265f8b838f /fs/xfs/xfs_mount.c | |
parent | 20f4ebf2bf2f57c1a9abb3655391336cc90314b3 (diff) |
[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>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 0df07c1df76e..30a5781a46d4 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -1979,8 +1979,8 @@ xfs_icsb_enable_counter( | |||
1979 | xfs_icsb_unlock_all_counters(mp); | 1979 | xfs_icsb_unlock_all_counters(mp); |
1980 | } | 1980 | } |
1981 | 1981 | ||
1982 | STATIC void | 1982 | void |
1983 | xfs_icsb_sync_counters_int( | 1983 | xfs_icsb_sync_counters_flags( |
1984 | xfs_mount_t *mp, | 1984 | xfs_mount_t *mp, |
1985 | int flags) | 1985 | int flags) |
1986 | { | 1986 | { |
@@ -2012,17 +2012,7 @@ STATIC void | |||
2012 | xfs_icsb_sync_counters( | 2012 | xfs_icsb_sync_counters( |
2013 | xfs_mount_t *mp) | 2013 | xfs_mount_t *mp) |
2014 | { | 2014 | { |
2015 | xfs_icsb_sync_counters_int(mp, 0); | 2015 | xfs_icsb_sync_counters_flags(mp, 0); |
2016 | } | ||
2017 | |||
2018 | /* | ||
2019 | * lazy addition used for things like df, background sb syncs, etc | ||
2020 | */ | ||
2021 | void | ||
2022 | xfs_icsb_sync_counters_lazy( | ||
2023 | xfs_mount_t *mp) | ||
2024 | { | ||
2025 | xfs_icsb_sync_counters_int(mp, XFS_ICSB_LAZY_COUNT); | ||
2026 | } | 2016 | } |
2027 | 2017 | ||
2028 | /* | 2018 | /* |