On 03/18/2015 02:33 PM, Anoop C S wrote: > > > On 03/18/2015 02:00 PM, Emmanuel Dreyfus wrote: >> On Wed, Mar 18, 2015 at 11:26:02AM +0530, Anoop C S wrote: >>> Trash translator creates the original file inside .trashcan directory on >>> receiving a truncate/ftruncate call and then truncates the file. During >>> the above mentioned procedure, whether a truncate/ftruncate call is >>> issued internally? >> >> The kernel sends SETATTR with new file size, and glusterfs turns this >> into a truncate call. I have to dig deeper to tell how. > > Ok. As of now trash translator doesn't distinguish between extended > truncate and reduced truncate. From your explanation and discussion with > Vijay, we doubt that it is an extended truncate(truncate with a higher > size). We are planning to skip extended truncate from trashing. A patch > will be sent out soon to address the problem. If that is the case, then > the corresponding (upcoming) patch will solve the issue. > The above mentioned patch for skipping extended truncate [http://review.gluster.org/#/c/9984/] got merged yesterday. And some portability fixes for trash.t was included in your recently merged patch [http://review.gluster.org/#/c/10033/]. Now we expect trash.t to run more smoothly than before on NetBSD. Feel free to reply with outstanding failures. >> >>> We have started looking into the failures. And I see many instances of >>> the following error: >>> du: unknown option -- b >> >> Yes, I had to fix a few shell portability problems >> - The -p option for mkdir must be before the directory name >> - du -b is not portable. Use ls -l instead. >> - test -e file* fails if file* expands to multiple files. >> I introduced wildcard_exists() and wildcard_not_exists() to work >> this around. >> >> Attached patch adresses the three points. > > Thanks for pointing out the issues. When we have our above mentioned > patch merged upstream, we can verify and then you can send this patch > for trash.t upstream for review. > Now that the patches are merged and you can send the remaining portability fixes as mentioned above (whichever is remaining) for trash.t upstream for review. --Anoop C S. >> > > --Anoop C S. > _______________________________________________ > Gluster-devel mailing list > Gluster-devel@xxxxxxxxxxx > http://www.gluster.org/mailman/listinfo/gluster-devel > _______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-devel