Follow-up r295924: Only sync hash-based db files open for writing when closing.
This fixes a major performance regression when reading db files such as the pw database during a 'pkg install'. MFC after: 1 week Tested by: bapt Reviewed by: bapt Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5868
This commit is contained in:
parent
9af130ae8c
commit
15719ec499
@ -423,7 +423,8 @@ hdestroy(HTAB *hashp)
|
||||
free(hashp->tmp_buf);
|
||||
|
||||
if (hashp->fp != -1) {
|
||||
(void)_fsync(hashp->fp);
|
||||
if (hashp->save_file)
|
||||
(void)_fsync(hashp->fp);
|
||||
(void)_close(hashp->fp);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user