summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_alloc.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2010-07-06 07:11:04 +0000
committerjeff <jeff@FreeBSD.org>2010-07-06 07:11:04 +0000
commit285c3f355cf6129d252b690ee2d17bc7d0964d7a (patch)
treecd17a559671a6f62e7bb6f03a3b2db2ba9afa573 /sys/ufs/ffs/ffs_alloc.c
parent26f5c3232149076d97f1f1ef9e8c339400f0a8be (diff)
downloadFreeBSD-src-285c3f355cf6129d252b690ee2d17bc7d0964d7a.zip
FreeBSD-src-285c3f355cf6129d252b690ee2d17bc7d0964d7a.tar.gz
- Handle the truncation of an inode with an effective link count of 0 in
the context of the process that reduced the effective count. Previously all truncation as a result of unlink happened in the softdep flush thread. This had the effect of being impossible to rate limit properly with the journal code. Now the process issuing unlinks is suspended when the journal files. This has a side-effect of improving rm performance by allowing more concurrent work. - Handle two cases in inactive, one for effnlink == 0 and another when nlink finally reaches 0. - Eliminate the SPACECOUNTED related code since the truncation is no longer delayed. Discussed with: mckusick
Diffstat (limited to 'sys/ufs/ffs/ffs_alloc.c')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index b1f7ba0..b740bbb 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -191,11 +191,6 @@ retry:
bno = ffs_hashalloc(ip, cg, bpref, size, size, ffs_alloccg);
if (bno > 0) {
delta = btodb(size);
- if (ip->i_flag & IN_SPACECOUNTED) {
- UFS_LOCK(ump);
- fs->fs_pendingblocks += delta;
- UFS_UNLOCK(ump);
- }
DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + delta);
if (flags & IO_EXT)
ip->i_flag |= IN_CHANGE;
@@ -321,11 +316,6 @@ retry:
if (bp->b_blkno != fsbtodb(fs, bno))
panic("ffs_realloccg: bad blockno");
delta = btodb(nsize - osize);
- if (ip->i_flag & IN_SPACECOUNTED) {
- UFS_LOCK(ump);
- fs->fs_pendingblocks += delta;
- UFS_UNLOCK(ump);
- }
DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + delta);
if (flags & IO_EXT)
ip->i_flag |= IN_CHANGE;
@@ -394,11 +384,6 @@ retry:
ffs_blkfree(ump, fs, ip->i_devvp, bprev, (long)osize,
ip->i_number, NULL);
delta = btodb(nsize - osize);
- if (ip->i_flag & IN_SPACECOUNTED) {
- UFS_LOCK(ump);
- fs->fs_pendingblocks += delta;
- UFS_UNLOCK(ump);
- }
DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + delta);
if (flags & IO_EXT)
ip->i_flag |= IN_CHANGE;
@@ -2422,11 +2407,6 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
if ((error = ffs_vget(mp, (ino_t)cmd.value, LK_EXCLUSIVE, &vp)))
break;
ip = VTOI(vp);
- if (ip->i_flag & IN_SPACECOUNTED) {
- UFS_LOCK(ump);
- fs->fs_pendingblocks += cmd.size;
- UFS_UNLOCK(ump);
- }
DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + cmd.size);
ip->i_flag |= IN_CHANGE;
vput(vp);
OpenPOWER on IntegriCloud