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 ftruncatz (was: Re: cache prob


From: Anand Avati
Subject: Re: [Gluster-devel] write-behind bug with ftruncatz (was: Re: cache problem?)
Date: Sun, 17 Jul 2011 00:37:19 +0530

Emmanuel,
  Can you give some more info about the happening writes and truncates. Are they all happening on the same FD? Is it possible to get paste strace -f output of the ftpd performing writes on the gluster mount?

Avati

On Sat, Jul 16, 2011 at 5:49 PM, Emmanuel Dreyfus <address@hidden> wrote:
Emmanuel Dreyfus <address@hidden> wrote:

> client# md5 gnusrc.tgz
> MD5 (gnusrc.tgz) = 471a73c374ec2b5733571c01647a69d5
>
> server# md5 /export/wd3a/tmp/gnusrc.tgz
> MD5 (/export/wd3a/tmp/gnusrc.tgz) = cf03446a7f31713002ef3b74020b173f

Here are the results of my investigations. It seems this is caused on
the client, by reordering of ftruncate() and write() by
performance/write-behind

Above write-behind, we get this:
write(sizeA, offsetA)
ftruncate(offsetB)
write(sizeB, offsetB)
write(sizeC, offsetC)
write(sizeD, offsetD)

And below, this turns into:
write(sizeA, offsetA)
write(sizeB, offsetB)
write(sizeC, offsetC)
ftruncate(offsetB)
write(sizeD, offsetD)

Result is that data between offsetB and offsetD is filled with zeros.

Removing the performance/write-behind xlator on the client fixes the
problem.

Nobody else got this problem? It may be NetBSD-specific, since the
ftruncate() come from FUSE SETATTR issued by the NetBSD kernel to update
the file size. I could filter out such messages, but I am not sure it
would not have side effects.

--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
address@hidden

_______________________________________________
Gluster-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/gluster-devel


reply via email to

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