--- a/libmultipath/util.c +++ b/libmultipath/util.c @@ -368,6 +368,13 @@ int safe_write(int fd, const void *buf, size_t count) count -= r; buf = (const char *)buf + r; } + + /* sync->disk */ + if (fsync(fd) < 0) { + condlog(0, "failed to fsync fd :%d", fd); + return -errno; + } + return 0; } -- 1.8.3.1