Re: write-behind bug with ftruncate

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

 





On Sun, Jul 17, 2011 at 5:43 PM, Emmanuel Dreyfus <manu@xxxxxxxxxx> wrote:
Emmanuel Dreyfus <manu@xxxxxxxxxx> 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

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux