svn commit: r233653 - stable/9/sys/ufs/ffs
Konstantin Belousov
kib at FreeBSD.org
Thu Mar 29 09:16:11 UTC 2012
Author: kib
Date: Thu Mar 29 09:16:10 2012
New Revision: 233653
URL: http://svn.freebsd.org/changeset/base/233653
Log:
MFC r232835:
Do not fall back to slow synchronous i/o when low on memory or buffers.
The bawrite() schedules the write to happen immediately, and its use
frees the current thread to do more cleanups.
MFC r232837:
Remove superfluous brackets.
Modified:
stable/9/sys/ufs/ffs/ffs_inode.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/ufs/ffs/ffs_inode.c
==============================================================================
--- stable/9/sys/ufs/ffs/ffs_inode.c Thu Mar 29 07:29:27 2012 (r233652)
+++ stable/9/sys/ufs/ffs/ffs_inode.c Thu Mar 29 09:16:10 2012 (r233653)
@@ -148,9 +148,11 @@ loop:
else
*((struct ufs2_dinode *)bp->b_data +
ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2;
- if ((waitfor && !DOINGASYNC(vp)) ||
- (vm_page_count_severe() || buf_dirty_count_severe())) {
+ if (waitfor && !DOINGASYNC(vp))
error = bwrite(bp);
+ else if (vm_page_count_severe() || buf_dirty_count_severe()) {
+ bawrite(bp);
+ error = 0;
} else {
if (bp->b_bufsize == fs->fs_bsize)
bp->b_flags |= B_CLUSTEROK;
More information about the svn-src-stable-9
mailing list