When the softdep conversion took place, the periodic vfs_msync() from
update got lost. This is responsible for ensuring that dirty mmap() pages get periodically written to disk. Without it, long time mmap's might not have their dirty pages written out at all of the system crashes or isn't cleanly shut down. This could be nasty if you've got a long-running writing via mmap(), dirty pages used to get written to disk within 30 seconds or so.
This commit is contained in:
parent
6528be86fc
commit
38037278fa
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.148 1998/03/30 09:51:08 phk Exp $
|
||||
* $Id: vfs_subr.c,v 1.149 1998/04/15 18:37:49 tegge Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -2744,6 +2744,7 @@ sync_fsync(ap)
|
||||
}
|
||||
asyncflag = mp->mnt_flag & MNT_ASYNC;
|
||||
mp->mnt_flag &= ~MNT_ASYNC;
|
||||
vfs_msync(mp, MNT_NOWAIT);
|
||||
VFS_SYNC(mp, MNT_LAZY, ap->a_cred, p);
|
||||
if (asyncflag)
|
||||
mp->mnt_flag |= MNT_ASYNC;
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.148 1998/03/30 09:51:08 phk Exp $
|
||||
* $Id: vfs_subr.c,v 1.149 1998/04/15 18:37:49 tegge Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -2744,6 +2744,7 @@ sync_fsync(ap)
|
||||
}
|
||||
asyncflag = mp->mnt_flag & MNT_ASYNC;
|
||||
mp->mnt_flag &= ~MNT_ASYNC;
|
||||
vfs_msync(mp, MNT_NOWAIT);
|
||||
VFS_SYNC(mp, MNT_LAZY, ap->a_cred, p);
|
||||
if (asyncflag)
|
||||
mp->mnt_flag |= MNT_ASYNC;
|
||||
|
Loading…
Reference in New Issue
Block a user