diff options
author | mckusick <mckusick@FreeBSD.org> | 2011-04-05 21:26:05 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2011-04-05 21:26:05 +0000 |
commit | 4d2789f22f2059a780b9ceba5ffd6e6d4373eec3 (patch) | |
tree | 3e98c5cb3295721e2bf0c1e1ee560f7893130b52 /sys/ufs/ffs/ffs_alloc.c | |
parent | 92bec9b84c91c81031aecc423fd62e9a9b27b631 (diff) | |
download | FreeBSD-src-4d2789f22f2059a780b9ceba5ffd6e6d4373eec3.zip FreeBSD-src-4d2789f22f2059a780b9ceba5ffd6e6d4373eec3.tar.gz |
Be far more persistent in reclaiming blocks and inodes before giving
up and declaring a filesystem out of space. Especially necessary when
running on a small filesystem. With this improvement, it should be
possible to use soft updates on a small root filesystem.
Kudos to: Peter Holm
Testing by: Peter Holm
MFC: 2 weeks
Diffstat (limited to 'sys/ufs/ffs/ffs_alloc.c')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 44d1f32..1795161 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -217,9 +217,9 @@ nospace: (void) chkdq(ip, -btodb(size), cred, FORCE); UFS_LOCK(ump); #endif - if (fs->fs_pendingblocks > 0 && reclaimed == 0) { + if (reclaimed == 0) { reclaimed = 1; - softdep_request_cleanup(fs, ITOV(ip), FLUSH_BLOCKS_WAIT); + softdep_request_cleanup(fs, ITOV(ip), cred, FLUSH_BLOCKS_WAIT); goto retry; } UFS_UNLOCK(ump); @@ -418,9 +418,9 @@ nospace: /* * no space available */ - if (fs->fs_pendingblocks > 0 && reclaimed == 0) { + if (reclaimed == 0) { reclaimed = 1; - softdep_request_cleanup(fs, vp, FLUSH_BLOCKS_WAIT); + softdep_request_cleanup(fs, vp, cred, FLUSH_BLOCKS_WAIT); UFS_UNLOCK(ump); if (bp) { brelse(bp); @@ -1023,7 +1023,7 @@ dup_alloc: noinodes: if (fs->fs_pendinginodes > 0 && reclaimed == 0) { reclaimed = 1; - softdep_request_cleanup(fs, pvp, FLUSH_INODES_WAIT); + softdep_request_cleanup(fs, pvp, cred, FLUSH_INODES_WAIT); goto retry; } UFS_UNLOCK(ump); |