Alan Somers cbaba16b23 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-08-31 19:30:46 +00:00
2015-06-13 19:20:56 +00:00
2016-08-31 00:11:35 +00:00
MFH
2016-04-04 23:55:32 +00:00
MFH
2016-03-02 16:14:46 +00:00
2016-08-31 15:05:04 +00:00
MFH
2016-03-02 16:14:46 +00:00
2016-11-11 23:28:07 +00:00
2016-11-11 23:28:07 +00:00
2016-11-07 15:54:47 +00:00
MFH
2016-02-10 04:20:39 +00:00
MFH
2016-03-02 16:14:46 +00:00
2016-05-12 03:53:20 +00:00
2016-08-27 13:40:27 +00:00
2016-02-16 02:14:30 +00:00
MFH
2016-03-02 16:14:46 +00:00
MFH
2016-03-02 16:14:46 +00:00
2016-10-23 20:42:32 +00:00
MFH
2016-03-02 16:14:46 +00:00
MFH
2016-03-02 16:14:46 +00:00
MFH
2016-03-02 16:14:46 +00:00
2016-09-04 12:17:57 +00:00
MFH
2016-04-13 16:19:50 +00:00
2016-05-29 01:43:28 +00:00
MFH
2016-04-16 02:32:12 +00:00
MFH
2016-04-04 23:55:32 +00:00