gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] write-behind bug with ftruncate


From: Anand Avati
Subject: Re: [Gluster-devel] write-behind bug with ftruncate
Date: Sun, 17 Jul 2011 19:01:26 +0530



On Sun, Jul 17, 2011 at 5:43 PM, Emmanuel Dreyfus <address@hidden> wrote:
Emmanuel Dreyfus <address@hidden> wrote:

> The sin is therefore to set FATTR_ATIME | FATTR_MTIME, while glusterfs
> assumes this is a ftruncate() calls because only FATTR_SIZE is set. Am I
> correct?

I "fixed" NetBSD FUSE so that FATTR_ATIME | FATTR_MTIME are removed when
FATTR_SIZE is set but not FATTR_UID, FATTR_GID and FATTR_MODE. It seems
to work.

This only seems like a fix of the symptom. Even if FATTR_ATIME | FATTR_MTIME were set along with FATTR_SIZE, the entire setattr should not have had an effect on the ordering of ftruncate w.r.t the other writes. I believe that the issue can show up if you were to load io-threads and write-behind right below fuse. You need synchronization within your FUSE port to make sure further writes are not sent up (or truncate() syscall not returned) till the FUSE filesystem completes the setattr call.

Avati

reply via email to

[Prev in Thread] Current Thread [Next in Thread]