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:
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/8695 (ec: Fix invalid inode lock in ftruncate) posted (#2) for review on master by Xavier Hernandez (xhernandez)
REVIEW: http://review.gluster.org/8695 (ec: Fix invalid inode lock in ftruncate) posted (#3) for review on master by Xavier Hernandez (xhernandez)
COMMIT: http://review.gluster.org/8695 committed in master by Vijay Bellur (vbellur) ------ commit 0ee0cfae80f7b17115b78d76610b995edb1bfa8b 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. Change-Id: Ibd18accf2652193b395a841b9029729e5f4867c6 BUG: 1140396 Signed-off-by: Xavier Hernandez <xhernandez> Reviewed-on: http://review.gluster.org/8695 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Vijay Bellur <vbellur>
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.7.0, please open a new bug report. glusterfs-3.7.0 has been announced on the Gluster mailinglists [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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user