projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6b54fb
)
notmuch-dump: use fsync instead of fdatasync
author
David Bremner
<david@tethera.net>
Thu, 8 May 2014 11:57:07 +0000
(20:57 +0900)
committer
David Bremner
<david@tethera.net>
Sat, 17 May 2014 21:31:15 +0000
(06:31 +0900)
Since the file size will have changed, there is no performance benefit
to calling fdatasync. Somewhat surprisingly, using fdatasync
apparently causes portability problems on FreeBSD.
notmuch-dump.c
patch
|
blob
|
history
diff --git
a/notmuch-dump.c
b/notmuch-dump.c
index 2849eabaadb9b292b0eab8e4dab6c10d4b26398d..887a20822d828ef6dab98f58f156e37bebefdf06 100644
(file)
--- a/
notmuch-dump.c
+++ b/
notmuch-dump.c
@@
-169,7
+169,7
@@
notmuch_database_dump (notmuch_database_t *notmuch,
}
if (output_file_name) {
- ret = f
data
sync (outfd);
+ ret = fsync (outfd);
if (ret) {
fprintf (stderr, "Error syncing %s to disk: %s\n",
name_for_error, strerror (errno));