[Gluster-devel] write-behind bug with ftruncate
Anand Avati
anand.avati at gmail.com
Mon Jul 18 07:57:38 UTC 2011
On Mon, Jul 18, 2011 at 12:48 PM, Emmanuel Dreyfus <manu at netbsd.org> wrote:
> On Sun, Jul 17, 2011 at 02:13:38PM +0200, Emmanuel Dreyfus 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.
>
> Modifying NetBSD FUSE so that it matches Linux bahavior fixes the
> problem, but I beleive glusters dangerously relies on an undocumented
> behavior here. The Linux kernel could one day decide to sync atime and
> mtime with any SETATTR, just like NetBSD does. You may consider changing
> the code to remove this assumed behavior.
>
>
I still do not see a problem here. Gluster is not relying on any
undocumented behavior. If a SETATTR call is sent with both atime/mtime and
size, Gluster replies only after performing actions for all of those bits.
Whether it performs the actions in two separate internal calls or one is of
no concern to FUSE. Can you please describe what was the change you
performed in your FUSE implementation?
Avati
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20110718/1cc0a516/attachment-0003.html>
More information about the Gluster-devel
mailing list