Date: Thu, 29 Mar 2012 09:16:10 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r233653 - stable/9/sys/ufs/ffs Message-ID: <201203290916.q2T9GA4c084983@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203290916.q2T9GA4c084983>