[Gluster-devel] Wrong behavior on fsync of md-cache ?

Emmanuel Dreyfus manu at netbsd.org
Tue Nov 25 08:49:23 UTC 2014


On Tue, Nov 25, 2014 at 09:35:25AM +0100, Xavier Hernandez wrote:
> Anyway it seems that there's a difference between linux and NetBSD because
> this test only fails on NetBSD. Is it possible that linux's fuse
> implementation delays the fsync request until all pending writes have been
> answered ? this would explain why this problem has not manifested till now.
> NetBSD seems to send fsync (probably as the first step of a close() call)
> when the first write fails.

I confirm that NetBSD FUSE sends a fsync before dropping the last 
reference on the vnode. That happens on close and it means the last
close will wait for data to be sync on disk. At that time there can be 
pending writes because of page cache flush which is done asynchrnously:
write system calls returns after storing data in page cache, and cache
is flushed to the filesystem later.

The kernel also flush page cache and sends fsyncs at regular time and
data written interval.

-- 
Emmanuel Dreyfus
manu at netbsd.org


More information about the Gluster-devel mailing list