Bug 1323486

Summary: quota: check inode limits only when new file/dir is created and not with write FOP
Product: [Community] GlusterFS Reporter: Vijaikumar Mallikarjuna <vmallika>
Component: quotaAssignee: Manikandan <mselvaga>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, smohan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1324058 (view as bug list) Environment:
Last Closed: 2016-06-16 14:03:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1324058, 1324059    

Description Vijaikumar Mallikarjuna 2016-04-03 14:43:26 UTC
Below test-case fails with disk quota exceed even though there is space available

1) create volume
2) # gluster volume quota vol1 limit-objects /test_dir 10
3) exceed inode limit. Create 9 files in loop ( test_dir alreday accounted as 1 inode used, we should be able to create another 9 files)

   for i in {1..9}; do
      touch /mnt/test_dir/f$i
   done

Now if inode limit is full, but we have not set any usage limit. so any write operation on the existing files should work, but fails with disk quota exceeded.

dd if=/dev/zero of=/mnt/test_dir/f1 bs=256k count=4 oflag=sync
write failed: Disk quota exceeded

Comment 1 Vijay Bellur 2016-04-05 12:31:45 UTC
REVIEW: http://review.gluster.org/13911 (quota: check inode limits only when new file/dir is created) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika)

Comment 2 Vijay Bellur 2016-04-06 09:25:35 UTC
COMMIT: http://review.gluster.org/13911 committed in master by Vijaikumar Mallikarjuna (vmallika) 
------
commit 7927149f71adc49cad92f28f805a8e688534156e
Author: vmallika <vmallika>
Date:   Sun Apr 3 20:35:52 2016 +0530

    quota: check inode limits only when new file/dir is created
    
    When a inode limit is full, writes to any existing file
    fails with disk quota exceed even if usage limit is
    not set or usage limit is not full.
    
    BUG: 1323486
    Change-Id: I9679fe26a2839ade0b1541fa7f0a2b71ac6dcc31
    Signed-off-by: vmallika <vmallika>
    Reviewed-on: http://review.gluster.org/13911
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Manikandan Selvaganesh <mselvaga>

Comment 5 Niels de Vos 2016-06-16 14:03:04 UTC
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.8.0, please open a new bug report.

glusterfs-3.8.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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user