+++ This bug was initially created as a clone of Bug #1140396 +++ Description of problem: Current tests for ec xlator fail on NetBSD. A simple 'cp' of a big file to a dispersed volume generates a file larger than expected. The same test on linux works fine. Version-Release number of selected component (if applicable): master How reproducible: always on NetBSD Steps to Reproduce: 1. gluster volume create test disperse node{1..3}:/data/bricks/test 2. gluster volume start test 3. mount -t glusterfs node1:/test /mnt/test 4. dd if=/dev/urandom of=/tmp/data bs=1024k count=8 5. cp /tmp/data /mnt/test/ 6. ls -l /mnt/test/ Actual results: The size of the file is 8650752 bytes Expected results: The size of the file should be 8388608 bytes Additional info: --- Additional comment from Anand Avati on 2014-09-10 23:47:47 CEST --- REVIEW: http://review.gluster.org/8695 (ec: Fix invalid inode lock in ftruncate) posted (#1) for review on master by Xavier Hernandez (xhernandez)
REVIEW: http://review.gluster.org/8780 (ec: Fix invalid inode lock in ftruncate) posted (#1) for review on release-3.6 by Xavier Hernandez (xhernandez)
COMMIT: http://review.gluster.org/8780 committed in release-3.6 by Vijay Bellur (vbellur) ------ commit b8c820be5f1d3ad7f60a2a0c7256081491d79d51 Author: Xavier Hernandez <xhernandez> Date: Wed Sep 10 23:43:07 2014 +0200 ec: Fix invalid inode lock in ftruncate The fops 'truncate' and 'ftruncate' share some code and inodelk() was always made against the inode inside the loc_t structure instead of that of fd_t. Since ftruncate has the loc initialized to NULL, this fop was executed without any lock, allowing some concurrent modifications in the file size. Also changed the way in which 'fop' and 'ffop' are differentiated in shared code. Now it uses 'id' field instead of checking if 'fd' is NULL. This is a backport of http://review.gluster.org/8695/ Change-Id: Ibd18accf2652193b395a841b9029729e5f4867c6 BUG: 1140847 Signed-off-by: Xavier Hernandez <xhernandez> Reviewed-on: http://review.gluster.org/8780 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Dan Lambright <dlambrig> Reviewed-by: Vijay Bellur <vbellur>
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED. Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution. [1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html [2] http://supercolony.gluster.org/pipermail/gluster-users/
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.6.1, please reopen this bug report. glusterfs-3.6.1 has been announced [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html [2] http://supercolony.gluster.org/mailman/listinfo/gluster-users