]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fix fsync(2) detection
authorJan Kara <jack@suse.cz>
Wed, 7 Jun 2017 13:31:14 +0000 (15:31 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 8 Jun 2017 19:16:48 +0000 (15:16 -0400)
commit474f67a968ff3b2123b149002c2f5b517c7c654c
tree4cd4803483e7be2ec293a34b9d56742ddafd3e0d
parent82424fc6bbe364ba64e4196bd099ebeab942d66b
libext2fs: fix fsync(2) detection

For some reason lib/config.h.in was missing a definition of HAVE_FSYNC
and as a result lib/config.h never had HAVE_FSYNC defined. As a result
we never called fsync(2) for example from
lib/ext2fs/unix_io.c:unix_flush() when we finished creating filesystem
and could miss IO errors happening during creating of the filesystem.
Test generic/405 exposes this problem.

Fix the problem by defining HAVE_FSYNC in lib/config.h.in.

Fixes: f47f31958578
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/config.h.in