<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/cli/src/cli.c, branch v3.7.16</title>
<subtitle>GlusterFS is a distributed file-system capable of scaling to several petabytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/'/>
<entry>
<title>cli/quota: Sort the list output alphabetically by path</title>
<updated>2016-04-27T16:46:50+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2016-04-25T10:53:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=7433fcfdf7a663ab228de67099e8a53fed526fb0'/>
<id>7433fcfdf7a663ab228de67099e8a53fed526fb0</id>
<content type='text'>
This is a backport of http://review.gluster.org/14000

&gt; Change-Id: I0b124e119d167817be2ae3eb52ac6c80fc7db5d1
&gt; BUG: 1320716
&gt; Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/14000
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Kaushal M &lt;kaushal@redhat.com&gt;

Change-Id: I87e12d58c8e267b2af67e287998e7313efc70af4
BUG: 1330018
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14061
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a backport of http://review.gluster.org/14000

&gt; Change-Id: I0b124e119d167817be2ae3eb52ac6c80fc7db5d1
&gt; BUG: 1320716
&gt; Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/14000
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Kaushal M &lt;kaushal@redhat.com&gt;

Change-Id: I87e12d58c8e267b2af67e287998e7313efc70af4
BUG: 1330018
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14061
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: on error invoke cli_cmd_broadcast_response function in separate thread</title>
<updated>2015-08-31T15:04:08+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-08-24T02:37:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=d90ed0b9b7160911c3fb8515f2947579d0fd197f'/>
<id>d90ed0b9b7160911c3fb8515f2947579d0fd197f</id>
<content type='text'>
This is a backport of http://review.gluster.org/#/c/11990/

There is a problem in current CLI framework
CLI holds the lock when processing command.
When processing quota list command, below sequence of steps executed in the
same thread and causing deadlock

1) CLI holds the lock
2) Send rpc_clnt_submit request to quotad for quota usage
3) If quotad is down, rpc_clnt_submit invokes cbk function with error
4) cbk function cli_quotad_getlimit_cbk tries to hold lock to broadcast
   the results and hangs, because same thread has already holding the lock

This patch fixes the problem by creating seperate thread for
broadcasting the result

&gt; Change-Id: I53be006eadf6aaf348083d9168535530d70a8ab3
&gt; BUG: 1242819
&gt; Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;

Change-Id: Ic3c651c143e4143cfb4542d99b4856e582022e36
BUG: 1257881
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12038
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaushal M &lt;kaushal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a backport of http://review.gluster.org/#/c/11990/

There is a problem in current CLI framework
CLI holds the lock when processing command.
When processing quota list command, below sequence of steps executed in the
same thread and causing deadlock

1) CLI holds the lock
2) Send rpc_clnt_submit request to quotad for quota usage
3) If quotad is down, rpc_clnt_submit invokes cbk function with error
4) cbk function cli_quotad_getlimit_cbk tries to hold lock to broadcast
   the results and hangs, because same thread has already holding the lock

This patch fixes the problem by creating seperate thread for
broadcasting the result

&gt; Change-Id: I53be006eadf6aaf348083d9168535530d70a8ab3
&gt; BUG: 1242819
&gt; Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;

Change-Id: Ic3c651c143e4143cfb4542d99b4856e582022e36
BUG: 1257881
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12038
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaushal M &lt;kaushal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota :display the size of soft limit percentage</title>
<updated>2015-08-26T12:09:47+00:00</updated>
<author>
<name>Manikandan Selvaganesh</name>
<email>mselvaga@redhat.com</email>
</author>
<published>2015-07-30T12:59:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=7f346e567edb94b008a5f0fa9f614fa8a296636b'/>
<id>7f346e567edb94b008a5f0fa9f614fa8a296636b</id>
<content type='text'>
Display the size equivalent to the soft limit percentage
in gluster v quota &lt;volname&gt; list &lt;path&gt; and
gluster v quota &lt;volname&gt; list-objects &lt;path&gt; command

        Backport of http://review.gluster.org/#/c/11808/

Cherry picked from commit b9e87f39386fc9c591c7698357c2899afc255b95
&gt; Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87
&gt; BUG: 1248521
&gt; Signed-off-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/11808
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Vijaikumar Mallikarjuna &lt;vmallika@redhat.com&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;

Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87
BUG: 1255644
Signed-off-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11977
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Display the size equivalent to the soft limit percentage
in gluster v quota &lt;volname&gt; list &lt;path&gt; and
gluster v quota &lt;volname&gt; list-objects &lt;path&gt; command

        Backport of http://review.gluster.org/#/c/11808/

Cherry picked from commit b9e87f39386fc9c591c7698357c2899afc255b95
&gt; Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87
&gt; BUG: 1248521
&gt; Signed-off-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/11808
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Vijaikumar Mallikarjuna &lt;vmallika@redhat.com&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;

Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87
BUG: 1255644
Signed-off-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11977
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: add owner xlator argument to rpc_clnt_new</title>
<updated>2015-08-14T10:10:47+00:00</updated>
<author>
<name>Krishnan Parthasarathi</name>
<email>kparthas@redhat.com</email>
</author>
<published>2015-06-27T05:34:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=6d3d4dba5276aea924ec275ae00b69c70fa975c0'/>
<id>6d3d4dba5276aea924ec275ae00b69c70fa975c0</id>
<content type='text'>
The @owner argument tells RPC layer the xlator that owns
the connection and to which xlator THIS needs be set during
network notifications like CONNECT and DISCONNECT.

Code paths that originate from the head of a (volume) graph and use
STACK_WIND ensure that the RPC local endpoint has the right xlator saved
in the frame of the call (callback pair). This guarantees that the
callback is executed in the right xlator context.

The client handshake process which includes fetching of brick ports from
glusterd, setting lk-version on the brick for the session, don't have
the correct xlator set in their frames. The problem lies with RPC
notifications. It doesn't have the provision to set THIS with the xlator
that is registered with the corresponding RPC programs. e.g,
RPC_CLNT_CONNECT event received by protocol/client doesn't have THIS set
to its xlator. This implies, call(-callbacks) originating from this
thread don't have the right xlator set too.

The fix would be to save the xlator registered with the RPC connection
during rpc_clnt_new. e.g, protocol/client's xlator would be saved with
the RPC connection that it 'owns'. RPC notifications such as CONNECT,
DISCONNECT, etc inherit THIS from the RPC connection's xlator.

Change-Id: I9dea2c35378c511d800ef58f7fa2ea5552f2c409
BUG: 1253212
Signed-off-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11436
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit f7668938cd7745d024f3d2884e04cd744d0a69ab)
Reviewed-on: http://review.gluster.org/11908
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The @owner argument tells RPC layer the xlator that owns
the connection and to which xlator THIS needs be set during
network notifications like CONNECT and DISCONNECT.

Code paths that originate from the head of a (volume) graph and use
STACK_WIND ensure that the RPC local endpoint has the right xlator saved
in the frame of the call (callback pair). This guarantees that the
callback is executed in the right xlator context.

The client handshake process which includes fetching of brick ports from
glusterd, setting lk-version on the brick for the session, don't have
the correct xlator set in their frames. The problem lies with RPC
notifications. It doesn't have the provision to set THIS with the xlator
that is registered with the corresponding RPC programs. e.g,
RPC_CLNT_CONNECT event received by protocol/client doesn't have THIS set
to its xlator. This implies, call(-callbacks) originating from this
thread don't have the right xlator set too.

The fix would be to save the xlator registered with the RPC connection
during rpc_clnt_new. e.g, protocol/client's xlator would be saved with
the RPC connection that it 'owns'. RPC notifications such as CONNECT,
DISCONNECT, etc inherit THIS from the RPC connection's xlator.

Change-Id: I9dea2c35378c511d800ef58f7fa2ea5552f2c409
BUG: 1253212
Signed-off-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11436
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
(cherry picked from commit f7668938cd7745d024f3d2884e04cd744d0a69ab)
Reviewed-on: http://review.gluster.org/11908
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Create missing logbuf_pool</title>
<updated>2015-07-24T11:19:30+00:00</updated>
<author>
<name>Anoop C S</name>
<email>anoopcs@redhat.com</email>
</author>
<published>2015-07-16T08:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=c12234ee25deafe148a1557c30a0e56688548f91'/>
<id>c12234ee25deafe148a1557c30a0e56688548f91</id>
<content type='text'>
        Backport of http://review.gluster.org/#/c/11691/

Since logbuf_pool was not created via glusterfs_ctx_defaults_init(),
the following error was present in cli logs repeateadly for each
and every execution of a gluster command.

E [mem-pool.c:417:mem_get0] (--&gt;/usr/local/lib/libglusterfs.so.0(+0x7e262)
[0x7fdbc0b1f262] --&gt;/usr/local/lib/libglusterfs.so.0(_gf_msg+0x804)
[0x7fdbc0ac7844] --&gt;/usr/local/lib/libglusterfs.so.0(mem_get0+0x78)
[0x7fdbc0af5b48] ) 0-mem-pool: invalid argument [Invalid argument]

This change creates ctx-&gt;logbuf_pool via glusterfs_ctx_defaults_init()
in cli.c so that the above error is no longer logged in cli logs.

Change-Id: I3fcd9cfefa06ddd52e1989b039ff5637372c3235
BUG: 1244103
Signed-off-by: Anoop C S &lt;anoopcs@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11705
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of http://review.gluster.org/#/c/11691/

Since logbuf_pool was not created via glusterfs_ctx_defaults_init(),
the following error was present in cli logs repeateadly for each
and every execution of a gluster command.

E [mem-pool.c:417:mem_get0] (--&gt;/usr/local/lib/libglusterfs.so.0(+0x7e262)
[0x7fdbc0b1f262] --&gt;/usr/local/lib/libglusterfs.so.0(_gf_msg+0x804)
[0x7fdbc0ac7844] --&gt;/usr/local/lib/libglusterfs.so.0(mem_get0+0x78)
[0x7fdbc0af5b48] ) 0-mem-pool: invalid argument [Invalid argument]

This change creates ctx-&gt;logbuf_pool via glusterfs_ctx_defaults_init()
in cli.c so that the above error is no longer logged in cli logs.

Change-Id: I3fcd9cfefa06ddd52e1989b039ff5637372c3235
BUG: 1244103
Signed-off-by: Anoop C S &lt;anoopcs@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11705
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep/cli : Fix geo-rep cli crash</title>
<updated>2015-04-22T12:53:32+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2015-04-16T06:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=11a179331ef428906a843b59c69c97f621446f9e'/>
<id>11a179331ef428906a843b59c69c97f621446f9e</id>
<content type='text'>
Fixes crash dump when "gluster vol geo-rep &lt;master-vol&gt; status"
is run because of incorrect argc and index comparison.

Change-Id: Id14d63d020ad9c5951b54ef50e7c140e58d9d7a6
BUG: 1213048
Reviewed-on: http://review.gluster.org/10264
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10291
Tested-by: NetBSD Build System
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Tested-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes crash dump when "gluster vol geo-rep &lt;master-vol&gt; status"
is run because of incorrect argc and index comparison.

Change-Id: Id14d63d020ad9c5951b54ef50e7c140e58d9d7a6
BUG: 1213048
Reviewed-on: http://review.gluster.org/10264
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10291
Tested-by: NetBSD Build System
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
Tested-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Allow options prefixed with '--' for geo-rep config cmds</title>
<updated>2015-04-09T11:36:04+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2014-11-26T07:05:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=55ec6f27dd6be71224bb3b0da24c4258596db024'/>
<id>55ec6f27dd6be71224bb3b0da24c4258596db024</id>
<content type='text'>
Geo-replications allows users to send rsync_options from
cli but while parsing, options prefixed with '--' are
treated as unrecognized apart from a few options. Because
of this rsync_options can't be set through cli. This
patch allows such options if it's a geo-rep config command.

e.g.
gluster vol geo-rep master fedora1::slave config rsync-options \
"--bwlimit=1.5m"

Change-Id: I4b4f10c0efd3f3a362ece65e697d5ce1498f84ac
BUG: 1168108
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9198
Reviewed-by: Aravinda VK &lt;avishwan@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Tested-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Geo-replications allows users to send rsync_options from
cli but while parsing, options prefixed with '--' are
treated as unrecognized apart from a few options. Because
of this rsync_options can't be set through cli. This
patch allows such options if it's a geo-rep config command.

e.g.
gluster vol geo-rep master fedora1::slave config rsync-options \
"--bwlimit=1.5m"

Change-Id: I4b4f10c0efd3f3a362ece65e697d5ce1498f84ac
BUG: 1168108
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9198
Reviewed-by: Aravinda VK &lt;avishwan@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Tested-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: log gluster version in cli init</title>
<updated>2015-03-26T07:17:36+00:00</updated>
<author>
<name>Atin Mukherjee</name>
<email>amukherj@redhat.com</email>
</author>
<published>2015-03-20T05:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=c8e095765c5ef72df9979f917b1b8e66cd8d0115'/>
<id>c8e095765c5ef72df9979f917b1b8e66cd8d0115</id>
<content type='text'>
Change-Id: I4994043d303212da795c76867a7ee4355d318a8c
Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9951
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Tested-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I4994043d303212da795c76867a7ee4355d318a8c
Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9951
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Tested-by: Krishnan Parthasarathi &lt;kparthas@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='https://fedorapeople.org/cgit/anoopcs/public_git/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>
<entry>
<title>quota: quotad.socket  files should be created under /var/run/gluster</title>
<updated>2015-03-03T12:51:39+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-03-02T07:22:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=1dc89418ec39929f6f9de448da85966beffeef27'/>
<id>1dc89418ec39929f6f9de448da85966beffeef27</id>
<content type='text'>
Change-Id: I49502a4f7516c02f7e321c16eebd748545afde07
BUG: 1197587
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9778
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>
Change-Id: I49502a4f7516c02f7e321c16eebd748545afde07
BUG: 1197587
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9778
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>
