diff --git a/WHATS_NEW b/WHATS_NEW index a8a07d775..2a710ebdc 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.01.15 - ================================= + Suppress fsync() error message on filesystems that don't support it. Fix yes_no_prompt() error handling. Add lvm.conf comment warning against multiple filter lines. Tidy lvmconf.sh. diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 97708e321..4b561c82a 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -666,7 +666,7 @@ static int _vg_write_file(struct format_instance *fid, struct volume_group *vg, return 0; } - if (fsync(fd)) { + if (fsync(fd) && (errno != EROFS) && (errno != EINVAL)) { log_sys_error("fsync", tc->path_edit); fclose(fp); return 0; diff --git a/lib/misc/lvm-file.c b/lib/misc/lvm-file.c index 2153cce7b..e66d58da7 100644 --- a/lib/misc/lvm-file.c +++ b/lib/misc/lvm-file.c @@ -236,7 +236,7 @@ void sync_dir(const char *file) goto out; } - if (fsync(fd) == -1) + if (fsync(fd) && (errno != EROFS) && (errno != EINVAL)) log_sys_error("fsync", dir); close(fd);