mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
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. Submitted by: bde Reviewed by: mckusick Tested by: pho MFC after: 2 weeks
This commit is contained in:
parent
4cd74eecda
commit
2fd2c0b1e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232835
@ -133,9 +133,11 @@ ffs_update(vp, waitfor)
|
|||||||
else
|
else
|
||||||
*((struct ufs2_dinode *)bp->b_data +
|
*((struct ufs2_dinode *)bp->b_data +
|
||||||
ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2;
|
ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2;
|
||||||
if ((waitfor && !DOINGASYNC(vp)) ||
|
if ((waitfor && !DOINGASYNC(vp)))
|
||||||
(vm_page_count_severe() || buf_dirty_count_severe())) {
|
|
||||||
error = bwrite(bp);
|
error = bwrite(bp);
|
||||||
|
else if (vm_page_count_severe() || buf_dirty_count_severe()) {
|
||||||
|
bawrite(bp);
|
||||||
|
error = 0;
|
||||||
} else {
|
} else {
|
||||||
if (bp->b_bufsize == fs->fs_bsize)
|
if (bp->b_bufsize == fs->fs_bsize)
|
||||||
bp->b_flags |= B_CLUSTEROK;
|
bp->b_flags |= B_CLUSTEROK;
|
||||||
|
Loading…
Reference in New Issue
Block a user