<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfs/src/quota-common-utils.h, branch v3.10.11</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>marker: optimize mq_update_dirty_inode_task</title>
<updated>2016-04-06T12:23:04+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2016-04-02T03:27:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=34d1c81dc4c730eb0cd2b8fd756b8bffed655e9c'/>
<id>34d1c81dc4c730eb0cd2b8fd756b8bffed655e9c</id>
<content type='text'>
In function mq_update_dirty_inode_task we do readdirp
on a dirty directory and for entry we again do
lookup to fecth the contribution xattr.
We can fetch this contribution as part of readdirp

Change-Id: I766593c0dba793f1ab3b43625acce1c7d9af8d7f
BUG: 1320818
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13892
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In function mq_update_dirty_inode_task we do readdirp
on a dirty directory and for entry we again do
lookup to fecth the contribution xattr.
We can fetch this contribution as part of readdirp

Change-Id: I766593c0dba793f1ab3b43625acce1c7d9af8d7f
BUG: 1320818
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13892
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota/marker: fix spurious failure afr-quota-xattr-mdata-heal.t</title>
<updated>2015-07-10T08:20:44+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-07-08T16:52:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c2cd3aeb0d88117f0929a733e9b05aa3e4d392ac'/>
<id>c2cd3aeb0d88117f0929a733e9b05aa3e4d392ac</id>
<content type='text'>
During quota-update process if inode info is present in size-xattr and
missing in contri-xattrs, then in function '_mq_get_metadata', we set
contri-size as zero (on error -2, which means usage info present, but inode info missing).
With this we are calculating wrong delta and updating the same.

With this patch we are ignoring errors if inode info in xattrs are missing

Change-Id: I7940a0e299b8bb425b5b43746b1f13f775c7fb92
BUG: 1241153
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11583
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During quota-update process if inode info is present in size-xattr and
missing in contri-xattrs, then in function '_mq_get_metadata', we set
contri-size as zero (on error -2, which means usage info present, but inode info missing).
With this we are calculating wrong delta and updating the same.

With this patch we are ignoring errors if inode info in xattrs are missing

Change-Id: I7940a0e299b8bb425b5b43746b1f13f775c7fb92
BUG: 1241153
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11583
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: quota.conf backward compatibility fix</title>
<updated>2015-05-29T01:57:37+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-05-22T08:34:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b7f05e64f615a12e6487eab64544b8f92a6037ae'/>
<id>b7f05e64f615a12e6487eab64544b8f92a6037ae</id>
<content type='text'>
In release-3.7 the format of quota.conf is changed.
There is a backward compatibility issues during upgrade
1) There can be an issue when peer sync between node-3.6 and node-3.7
2) If the user sets/removes limit, there is will different format of
   file in node-3.6 and node-3.7

This patch fixes the issue:
1) restrict the user to execute command quota enable, limit-usage, remove
2) write quota.conf in older format if op-version is less than 3.6

Change-Id: Ib76f5a0a85394642159607a105cacda743e7d26b
BUG: 1223739
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10889
Tested-by: NetBSD Build System
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In release-3.7 the format of quota.conf is changed.
There is a backward compatibility issues during upgrade
1) There can be an issue when peer sync between node-3.6 and node-3.7
2) If the user sets/removes limit, there is will different format of
   file in node-3.6 and node-3.7

This patch fixes the issue:
1) restrict the user to execute command quota enable, limit-usage, remove
2) write quota.conf in older format if op-version is less than 3.6

Change-Id: Ib76f5a0a85394642159607a105cacda743e7d26b
BUG: 1223739
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10889
Tested-by: NetBSD Build System
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: support for inode quota in quota.conf</title>
<updated>2015-05-04T10:46:08+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-04-15T12:05:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=821b1fdc893c0dd603d4c43a0b31f1ea495a46c9'/>
<id>821b1fdc893c0dd603d4c43a0b31f1ea495a46c9</id>
<content type='text'>
Currently when quota limit is set, corresponding gfid
is set in quota.conf. This patch supports storing
inode-quota limits in quota.conf and also stores
additional byte for each gfid to differentiate
between usage quota limit and inode quota limit.

Change-Id: I444d7399407594edd280e640681679a784d4c46a
BUG: 1202244
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Signed-off-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10069
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently when quota limit is set, corresponding gfid
is set in quota.conf. This patch supports storing
inode-quota limits in quota.conf and also stores
additional byte for each gfid to differentiate
between usage quota limit and inode quota limit.

Change-Id: I444d7399407594edd280e640681679a784d4c46a
BUG: 1202244
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Signed-off-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10069
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota/disperse: handle inode quotas in xattr aggregate</title>
<updated>2015-04-14T05:01:18+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-04-01T14:33:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=6e8298654a7d0de29192b88d769132cfc51c9ac7'/>
<id>6e8298654a7d0de29192b88d769132cfc51c9ac7</id>
<content type='text'>
with the inode quota feature, quota size is now
increased from 64bit to 192bits which contains
values of 'file size', 'file count' and 'dir count'

This change in quota size xattr needs to be handled
in disperse xattr aggregation

Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;

Change-Id: I5fd28aa9f5b8b6cba83a98360236417a97ac16ee
BUG: 1207967
Reviewed-on: http://review.gluster.org/10112
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with the inode quota feature, quota size is now
increased from 64bit to 192bits which contains
values of 'file size', 'file count' and 'dir count'

This change in quota size xattr needs to be handled
in disperse xattr aggregation

Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;

Change-Id: I5fd28aa9f5b8b6cba83a98360236417a97ac16ee
BUG: 1207967
Reviewed-on: http://review.gluster.org/10112
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/quota : Introducing inode quota</title>
<updated>2015-03-19T01:24:12+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-03-18T17:47:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=3e18f093974c85ac92a4c48f0cd13aa9ff9c5cac'/>
<id>3e18f093974c85ac92a4c48f0cd13aa9ff9c5cac</id>
<content type='text'>
==========================================================================
                             Inode quota
==========================================================================
= Currently, the only way to retrieve the number of files/objects in a   =
= directory or volume is to do a crawl of the entire directory/volume.   =
= This is expensive and is not scalable.                                 =
=                                                                        =
= The proposed mechanism will provide an easier alternative to determine =
= the count of files/objects in a directory or volume.                   =
=                                                                        =
= The new mechanism proposes to store count of objects/files as part of  =
= an extended attribute of a directory. Each directory's extended        =
= attribute value will indicate the number of files/objects present      =
= in a tree with the directory being considered as the root of the tree. =
=                                                                        =
= The count value can be accessed by performing a getxattr().            =
= Cluster translators like afr, dht and stripe will perform aggregation  =
= of count values from various bricks when getxattr() happens on the key =
= associated with file/object count.                                     =

A new interface is introduced:
------------------------------
        limit-objects  : limit the number of inodes at directory level
        list-objects   : list the directories where the limit is set
        remove-objects : remove the limit from the directory

==========================================================================

CLI COMMAND:
gluster volume quota &lt;volname&gt; limit-objects &lt;path&gt; &lt;number&gt; [&lt;percent&gt;]

* &lt;number&gt; is a hard-limit for number of objects limitation for path "&lt;path&gt;"
  If hard-limit is exceeded, creation of file/directory is no longer
permitted.

* &lt;percent&gt; is a soft-limit for number of objects creation for path "&lt;path&gt;"
  If soft-limit is exceeded, a warning is issued for each creation.

CLI COMMAND:
gluster volume quota &lt;volname&gt; remove-objects [path]

==========================================================================

CLI COMMAND:
gluster volume quota &lt;volname&gt; list-objects [path] ...

Sample output:
------------------
  Path                   Hard-limit Soft-limit   Used  Available
Soft-limit exceeded?
Hard-limit exceeded?
  ------------------------------------------------------------------------
--------------------------------------
  /dir                      10       80%          10       0
Yes
        Yes

==========================================================================

[root@snapshot-28 dir]# ls
a  b  file11  file12  file13  file14  file15  file16  file17
[root@snapshot-28 dir]# touch a1
touch: cannot touch `a1': Disk quota exceeded
* Nine files are created in directory "dir" and directory is included in
* the
count too. Hence the limit "10" is reached and further file creation
fails

==========================================================================

Note: We have also done some re-factoring in cli for volume name
validation. New function cli_validate_volname is created

==========================================================================

Change-Id: I1823497de4f790a2a20ebb1770293472ea33ee2b
BUG: 1190108
Signed-off-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9769
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
==========================================================================
                             Inode quota
==========================================================================
= Currently, the only way to retrieve the number of files/objects in a   =
= directory or volume is to do a crawl of the entire directory/volume.   =
= This is expensive and is not scalable.                                 =
=                                                                        =
= The proposed mechanism will provide an easier alternative to determine =
= the count of files/objects in a directory or volume.                   =
=                                                                        =
= The new mechanism proposes to store count of objects/files as part of  =
= an extended attribute of a directory. Each directory's extended        =
= attribute value will indicate the number of files/objects present      =
= in a tree with the directory being considered as the root of the tree. =
=                                                                        =
= The count value can be accessed by performing a getxattr().            =
= Cluster translators like afr, dht and stripe will perform aggregation  =
= of count values from various bricks when getxattr() happens on the key =
= associated with file/object count.                                     =

A new interface is introduced:
------------------------------
        limit-objects  : limit the number of inodes at directory level
        list-objects   : list the directories where the limit is set
        remove-objects : remove the limit from the directory

==========================================================================

CLI COMMAND:
gluster volume quota &lt;volname&gt; limit-objects &lt;path&gt; &lt;number&gt; [&lt;percent&gt;]

* &lt;number&gt; is a hard-limit for number of objects limitation for path "&lt;path&gt;"
  If hard-limit is exceeded, creation of file/directory is no longer
permitted.

* &lt;percent&gt; is a soft-limit for number of objects creation for path "&lt;path&gt;"
  If soft-limit is exceeded, a warning is issued for each creation.

CLI COMMAND:
gluster volume quota &lt;volname&gt; remove-objects [path]

==========================================================================

CLI COMMAND:
gluster volume quota &lt;volname&gt; list-objects [path] ...

Sample output:
------------------
  Path                   Hard-limit Soft-limit   Used  Available
Soft-limit exceeded?
Hard-limit exceeded?
  ------------------------------------------------------------------------
--------------------------------------
  /dir                      10       80%          10       0
Yes
        Yes

==========================================================================

[root@snapshot-28 dir]# ls
a  b  file11  file12  file13  file14  file15  file16  file17
[root@snapshot-28 dir]# touch a1
touch: cannot touch `a1': Disk quota exceeded
* Nine files are created in directory "dir" and directory is included in
* the
count too. Hence the limit "10" is reached and further file creation
fails

==========================================================================

Note: We have also done some re-factoring in cli for volume name
validation. New function cli_validate_volname is created

==========================================================================

Change-Id: I1823497de4f790a2a20ebb1770293472ea33ee2b
BUG: 1190108
Signed-off-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9769
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
