asomers 9e66c6e8f0 Speed up pw operations that edit /etc/group or /etc/passwd
r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group
corruption on power loss. However, it fixed it by opening those files with
O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC
with appropriately placed fsync()s instead, which is much faster. Using a
ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s.

Reviewed by:	allanjude, bapt, vangyzen, garga
Tested on pfSense by:	garga
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D8319
2016-11-18 16:07:08 +00:00
..
2016-10-04 20:27:15 +00:00
2016-11-08 23:59:41 +00:00
2016-11-13 17:55:27 +00:00
2016-09-21 10:58:58 +00:00
2016-08-23 13:43:43 +00:00
2016-11-08 23:59:41 +00:00
2016-08-24 02:41:24 +00:00
2016-10-21 15:23:54 +00:00
2016-09-30 20:35:12 +00:00
2016-09-04 12:17:57 +00:00