Ignore sync requests from the system syncher, i.e. VFS_SYNC(waitfor=MNT_LAZY).

ZFS already commits outstanding data every zfs_txg_timeout seconds, so these
syncs are unnecessarily intrusive.

Submitted by:	gibbs
Sponsored by:	Spectra Logic
MFSpectraBSD:	1105759 on 2014/12/11
This commit is contained in:
will 2015-01-21 19:25:57 +00:00
parent 23c5274c6b
commit dd05d56b15

View File

@ -132,6 +132,13 @@ zfs_sync(vfs_t *vfsp, int waitfor)
if (panicstr)
return (0);
/*
* Ignore the system syncher. ZFS already commits async data
* at zfs_txg_timeout intervals.
*/
if (waitfor == MNT_LAZY)
return (0);
if (vfsp != NULL) {
/*
* Sync a specific filesystem.