<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/read-only/src, branch v3.10.10</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>features/worm: Adding check to newloc when doing rename</title>
<updated>2017-10-25T14:03:28+00:00</updated>
<author>
<name>luneo7</name>
<email>luneo7@gmail.com</email>
</author>
<published>2017-10-10T20:17:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=be662aa3007898c22ad2e9d23db63f2e88a6d434'/>
<id>be662aa3007898c22ad2e9d23db63f2e88a6d434</id>
<content type='text'>
Problem: Since rename didn't check if newloc exists and it's
retention state it was possible to rename a new file that wasn't
in retention over a existing file that was in read-only state.

Cherry picked from commit 00a4dc0:
&gt; Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229
&gt; BUG: 1484490
&gt; Signed-off-by: luneo7 &lt;luneo7@gmail.com&gt;
&gt; Reviewed-on: https://review.gluster.org/18104
&gt; Tested-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
&gt; Tested-by: Prashanth Pai &lt;ppai@redhat.com&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Prashanth Pai &lt;ppai@redhat.com&gt;
&gt; Reviewed-by: Karthik U S &lt;ksubrahm@redhat.com&gt;
&gt; Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;

Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229
BUG: 1480788
Signed-off-by: luneo7 &lt;luneo7@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Since rename didn't check if newloc exists and it's
retention state it was possible to rename a new file that wasn't
in retention over a existing file that was in read-only state.

Cherry picked from commit 00a4dc0:
&gt; Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229
&gt; BUG: 1484490
&gt; Signed-off-by: luneo7 &lt;luneo7@gmail.com&gt;
&gt; Reviewed-on: https://review.gluster.org/18104
&gt; Tested-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
&gt; Tested-by: Prashanth Pai &lt;ppai@redhat.com&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Prashanth Pai &lt;ppai@redhat.com&gt;
&gt; Reviewed-by: Karthik U S &lt;ksubrahm@redhat.com&gt;
&gt; Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;

Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229
BUG: 1480788
Signed-off-by: luneo7 &lt;luneo7@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/worm: Adding implementation for ftruncate</title>
<updated>2017-04-13T15:37:23+00:00</updated>
<author>
<name>karthik-us</name>
<email>ksubrahm@redhat.com</email>
</author>
<published>2017-04-04T13:27:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0090727aea9dfcfdd06debadeb5cf9377adca64f'/>
<id>0090727aea9dfcfdd06debadeb5cf9377adca64f</id>
<content type='text'>
Problem:
Since the ftruncate fop was not handled in the worm feature, when
truncate and write was happening on a worm-retained/worm file, it was
giving the EROFS error but truncating the file, which is not correct.

&gt; Change-Id: I1a7e904655210d78bce9e01652ac56f3783b5aed
&gt; BUG: 1438810
&gt; Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/16995
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
&gt; Reviewed-by: Raghavendra Talur &lt;rtalur@redhat.com&gt;
(cherry picked from commit c5a4a77848024d2adf8cd4f35d550ba90c174fc7)

Change-Id: I815049d37d95597021e11b1e3d25d56bb83623c4
BUG: 1437763
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16999
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Since the ftruncate fop was not handled in the worm feature, when
truncate and write was happening on a worm-retained/worm file, it was
giving the EROFS error but truncating the file, which is not correct.

&gt; Change-Id: I1a7e904655210d78bce9e01652ac56f3783b5aed
&gt; BUG: 1438810
&gt; Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
&gt; Reviewed-on: https://review.gluster.org/16995
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
&gt; Reviewed-by: Raghavendra Talur &lt;rtalur@redhat.com&gt;
(cherry picked from commit c5a4a77848024d2adf8cd4f35d550ba90c174fc7)

Change-Id: I815049d37d95597021e11b1e3d25d56bb83623c4
BUG: 1437763
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16999
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-by: Shyamsundar Ranganathan &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/read-only: reten_mode is invalid to be free by mem_put()</title>
<updated>2016-10-18T14:13:08+00:00</updated>
<author>
<name>Ryan Ding</name>
<email>ryan.ding@open-fs.com</email>
</author>
<published>2016-08-23T16:08:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=975c5572a8300c81e127c27e677974f49e96bd5d'/>
<id>975c5572a8300c81e127c27e677974f49e96bd5d</id>
<content type='text'>
priv-&gt;reten_mode is initialised by option 'retention-mode'. and it
reference the memory in this-&gt;options. so fini() use mem_put to free
priv-&gt;reten_mode will cause a problem.
there is no need to call mem_put(), so just remove it will be fine.

Change-Id: Iee6f9d1d54df38cba8c9b9100e2824f4f2b18ab4
BUG: 1369523
Signed-off-by: Ryan Ding &lt;ryan.ding@open-fs.com&gt;
Reviewed-on: http://review.gluster.org/15296
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&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>
priv-&gt;reten_mode is initialised by option 'retention-mode'. and it
reference the memory in this-&gt;options. so fini() use mem_put to free
priv-&gt;reten_mode will cause a problem.
there is no need to call mem_put(), so just remove it will be fine.

Change-Id: Iee6f9d1d54df38cba8c9b9100e2824f4f2b18ab4
BUG: 1369523
Signed-off-by: Ryan Ding &lt;ryan.ding@open-fs.com&gt;
Reviewed-on: http://review.gluster.org/15296
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: out-of-tree builds generates files in the wrong directory</title>
<updated>2016-09-18T16:34:37+00:00</updated>
<author>
<name>Kaleb S KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2016-04-26T21:04:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e38dff5b4e0f0a25db664810fc3617eac44673ce'/>
<id>e38dff5b4e0f0a25db664810fc3617eac44673ce</id>
<content type='text'>
And minor cleanup of a few of the Makefile.am files while we're
at it.

Rewrite the make rules to do what xdrgen does. Now we can get rid
of xdrgen.

Note 1. netbsd6's sed doesn't do -i. Why are we still running
smoke tests on netbsd6 and not netbsd7? We barely support netbsd7
as it is.

Note 2. Why is/was libgfxdr.so (.../rpc/xdr/src/...) linked with
libglusterfs? A cut-and-paste mistake? It has no references to
symbols in libglusterfs.

Note3. "/#ifndef\|#define\|#endif/" (note the '\'s) is a _basic_
regex that matches the same lines as the _extended_ regex
"/#(ifndef|define|endif)/". To match the extended regex sed needs to
be run with -r on Linux; with -E on *BSD. However NetBSD's and
FreeBSD's sed helpfully also provide -r for compatibility. Using a
basic regex avoids having to use a kludge in order to run sed with
the correct option on OS X.

Note 4. Not copying the bit of xdrgen that inserts copyright/license
boilerplate. AFAIK it's silly to pretend that machine generated
files like these can be copyrighted or need license boilerplate.
The XDR source files have their own copyright and license; and
their copyrights are bound to be more up to date than old
boilerplate inserted by a script. From what I've seen of other
Open Source projects -- e.g. gcc and its C parser files generated
by yacc and lex -- IIRC they don't bother to add copyright/license
boilerplate to their generated files.

It appears that it's a long-standing feature of make (SysV, BSD,
gnu) for out-of-tree builds to helpfully pretend that the source
files it can find in the VPATH "exist" as if they are in the $cwd.
rpcgen doesn't work well in this situation and generates files
with "bad" #include directives.

E.g. if you `rpcgen ../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.x`,
you get an #include directive in the generated .c file like this:

  ...
  #include "../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.h"
  ...

which (obviously) results in compile errors on out-of-tree build
because the (generated) header file doesn't exist at that location.
Compared to `rpcgen ./glusterfs3-xdr.x` where you get:

  ...
  #include "glusterfs3-xdr.h"
  ...

Which is what we need. We have to resort to some Stupid Make Tricks
like the addition of various .PHONY targets to work around the VPATH
"help".

Warning: When doing an in-tree build, -I$(top_builddir)/rpc/xdr/...
looks exactly like -I$(top_srcdir)/rpc/xdr/...  Don't be fooled though.
And don't delete the -I$(top_builddir)/rpc/xdr/... bits

Change-Id: Iba6ab96b2d0a17c5a7e9f92233993b318858b62e
BUG: 1330604
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14085
Tested-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And minor cleanup of a few of the Makefile.am files while we're
at it.

Rewrite the make rules to do what xdrgen does. Now we can get rid
of xdrgen.

Note 1. netbsd6's sed doesn't do -i. Why are we still running
smoke tests on netbsd6 and not netbsd7? We barely support netbsd7
as it is.

Note 2. Why is/was libgfxdr.so (.../rpc/xdr/src/...) linked with
libglusterfs? A cut-and-paste mistake? It has no references to
symbols in libglusterfs.

Note3. "/#ifndef\|#define\|#endif/" (note the '\'s) is a _basic_
regex that matches the same lines as the _extended_ regex
"/#(ifndef|define|endif)/". To match the extended regex sed needs to
be run with -r on Linux; with -E on *BSD. However NetBSD's and
FreeBSD's sed helpfully also provide -r for compatibility. Using a
basic regex avoids having to use a kludge in order to run sed with
the correct option on OS X.

Note 4. Not copying the bit of xdrgen that inserts copyright/license
boilerplate. AFAIK it's silly to pretend that machine generated
files like these can be copyrighted or need license boilerplate.
The XDR source files have their own copyright and license; and
their copyrights are bound to be more up to date than old
boilerplate inserted by a script. From what I've seen of other
Open Source projects -- e.g. gcc and its C parser files generated
by yacc and lex -- IIRC they don't bother to add copyright/license
boilerplate to their generated files.

It appears that it's a long-standing feature of make (SysV, BSD,
gnu) for out-of-tree builds to helpfully pretend that the source
files it can find in the VPATH "exist" as if they are in the $cwd.
rpcgen doesn't work well in this situation and generates files
with "bad" #include directives.

E.g. if you `rpcgen ../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.x`,
you get an #include directive in the generated .c file like this:

  ...
  #include "../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.h"
  ...

which (obviously) results in compile errors on out-of-tree build
because the (generated) header file doesn't exist at that location.
Compared to `rpcgen ./glusterfs3-xdr.x` where you get:

  ...
  #include "glusterfs3-xdr.h"
  ...

Which is what we need. We have to resort to some Stupid Make Tricks
like the addition of various .PHONY targets to work around the VPATH
"help".

Warning: When doing an in-tree build, -I$(top_builddir)/rpc/xdr/...
looks exactly like -I$(top_srcdir)/rpc/xdr/...  Don't be fooled though.
And don't delete the -I$(top_builddir)/rpc/xdr/... bits

Change-Id: Iba6ab96b2d0a17c5a7e9f92233993b318858b62e
BUG: 1330604
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14085
Tested-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dict: Don't expose get_new_dict/dict_destroy</title>
<updated>2016-07-26T06:47:33+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2016-01-06T09:00:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d2bd17e5a53d0ffa375df1a5ad957556be2f2b83'/>
<id>d2bd17e5a53d0ffa375df1a5ad957556be2f2b83</id>
<content type='text'>
get_new_dict/dict_destroy is causing confusion where, dict_new/dict_destroy or
get_new_dict/dict_unref are used instead of dict_new/dict_unref.

Change-Id: I4cc69f5b6711d720823395e20fd624a0c6c1168c
BUG: 1296043
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13183
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
get_new_dict/dict_destroy is causing confusion where, dict_new/dict_destroy or
get_new_dict/dict_unref are used instead of dict_new/dict_unref.

Change-Id: I4cc69f5b6711d720823395e20fd624a0c6c1168c
BUG: 1296043
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13183
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: fix sprintf format for uint64_t in gf_worm_serialize_state()</title>
<updated>2016-07-18T20:56:10+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2016-07-16T14:36:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=1b228d3d489cada1c3c9f5fdbb882e7dbc25a091'/>
<id>1b228d3d489cada1c3c9f5fdbb882e7dbc25a091</id>
<content type='text'>
When building on 32-bit architectures, the following warning gets
reported:

    worm-helper.c: In function 'gf_worm_serialize_state':
    worm-helper.c:219: warning: format '%ld' expects type 'long int', but argument 4 has type 'uint64_t'
    worm-helper.c:219: warning: format '%ld' expects type 'long int', but argument 5 has type 'uint64_t'

The format string "%ld" depend on the architecture. If the type is very
specific (here unint64_t), the dynamicness of "%ld" is not correct.
There are macros for these fixed types in &lt;inttypes.h&gt; and even some
more in "logging.h" from libglusterfs.

BUG: 1198849
Change-Id: I63eeb9c8e4d7b292ce0c9333938ca365db0823fc
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14934
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building on 32-bit architectures, the following warning gets
reported:

    worm-helper.c: In function 'gf_worm_serialize_state':
    worm-helper.c:219: warning: format '%ld' expects type 'long int', but argument 4 has type 'uint64_t'
    worm-helper.c:219: warning: format '%ld' expects type 'long int', but argument 5 has type 'uint64_t'

The format string "%ld" depend on the architecture. If the type is very
specific (here unint64_t), the dynamicness of "%ld" is not correct.
There are macros for these fixed types in &lt;inttypes.h&gt; and even some
more in "logging.h" from libglusterfs.

BUG: 1198849
Change-Id: I63eeb9c8e4d7b292ce0c9333938ca365db0823fc
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14934
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/worm: fixed issue with write FOP for normal files</title>
<updated>2016-06-13T12:12:47+00:00</updated>
<author>
<name>karthik-us</name>
<email>ksubrahm@redhat.com</email>
</author>
<published>2016-06-02T19:34:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=40a7537556a7eb0a7c90ec6e7e2fd4014beae092'/>
<id>40a7537556a7eb0a7c90ec6e7e2fd4014beae092</id>
<content type='text'>
The write FOPs on normal files were being blocked after the recent change.
It should fail only for the WORM and WORM-Retained files, and should pass
for a normal file.
Using auto-commit period to check for dormant files instead of retention period.

Change-Id: I30f82d4de2ea2c59c1eb7b4449ba6a60e568cfd5
BUG: 1342259
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14619
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;
Reviewed-by: Joseph Fernandes
Reviewed-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The write FOPs on normal files were being blocked after the recent change.
It should fail only for the WORM and WORM-Retained files, and should pass
for a normal file.
Using auto-commit period to check for dormant files instead of retention period.

Change-Id: I30f82d4de2ea2c59c1eb7b4449ba6a60e568cfd5
BUG: 1342259
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14619
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;
Reviewed-by: Joseph Fernandes
Reviewed-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/worm: updating function names &amp; unwinding FOPs with op_errno</title>
<updated>2016-05-31T15:55:57+00:00</updated>
<author>
<name>karthik-us</name>
<email>ksubrahm@redhat.com</email>
</author>
<published>2016-05-05T07:12:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=03880f81dad9fd2a3a07c56a3cfbb994d44819b7'/>
<id>03880f81dad9fd2a3a07c56a3cfbb994d44819b7</id>
<content type='text'>
- Added gf_worm prefix to some of the functions in worm-helper files so that
  they do not clash with other functions
- Made the functions in worm.c static
- Unwinding the FOPs with op_errno instead of using different unwind statements
- Removed the multiple goto labels (wind &amp; unwind)

Change-Id: I3a2f114061aae4b422df54e91c4b3f702af5d0b0
BUG: 1333263
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14222
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Joseph Fernandes
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Added gf_worm prefix to some of the functions in worm-helper files so that
  they do not clash with other functions
- Made the functions in worm.c static
- Unwinding the FOPs with op_errno instead of using different unwind statements
- Removed the multiple goto labels (wind &amp; unwind)

Change-Id: I3a2f114061aae4b422df54e91c4b3f702af5d0b0
BUG: 1333263
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14222
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Joseph Fernandes
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/worm: When disabled, worm xl must directly pass fops to its child xl</title>
<updated>2016-05-10T16:33:28+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2016-05-03T08:59:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e3fd1c1b7d9357161fd0ffe05e2617db1b9ffcd7'/>
<id>e3fd1c1b7d9357161fd0ffe05e2617db1b9ffcd7</id>
<content type='text'>
Change-Id: I56ea46c2743636ef7af5c85469cb2e186eadf21f
BUG: 1332460
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14182
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Joseph Fernandes
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I56ea46c2743636ef7af5c85469cb2e186eadf21f
BUG: 1332460
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14182
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Joseph Fernandes
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>WORM/Retention Translator: Implementation of file level WORM</title>
<updated>2016-05-02T01:05:22+00:00</updated>
<author>
<name>karthik-us</name>
<email>ksubrahm@redhat.com</email>
</author>
<published>2016-02-11T11:01:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a15195794c336ed0e272076a128c56b171cae12f'/>
<id>a15195794c336ed0e272076a128c56b171cae12f</id>
<content type='text'>
To activate the file level worm feature, the features.read-only and
features.worm options should be switched "off" on the volume and
the features.worm-file-level should be switched "on". Both read-only
and worm or worm-file-level cannot be switched "on" together. The
files which are created when the worm-file-level option is set on the
volume will have their own retention profile.

If both worm and worm-file-level are "on" at that time the worm
which is the volume level worm will have priority over file level
worm. If worm-file level is switched "off" after some time and the
read-only option is switched "on" then read-only will have priority.

The current implementation allows the users to manually transmit
a file to a WORM-Retained state by removing all the write bits of
the file using the chmod command. The file will have a retention
profile which contains the state of the file, mode of retention,
and the default retention time.

The file will be made WORM-Retained for a default of 120 seconds
during which it will be immutable and undeletable and it sets the
atime of the file to the time till which it is retained.
After that period if any fop request comes for that file, will
make the transition from WORM-Retained state to WORM state, where
the file will be immutable but deletable and, it will reset
the atime to the actual atime of the file. If a WORM file needs
to be made undeletable again, it can be done by using the chmod
command with all the write bits removed.

There are two modes of retention:
1. Relax: where the retention time of a WORM-Retained file can be
   increased or decreased.
2. Enterprise: where the retention time of a WORM-Retained file
   can be increased but not be decreased.
Whenever a utime change(touch -a, -t, ...)request comes for a
file it checks the mode of retention before setting the utimes.
This is done only if the file is WORM-Retained but for a WORM file
it will change the utimes.

Lazy auto commit:
Whenever a file gets created it will store the creation time of the
file or if a file already exists then any of the next unlink, link,
truncate or rename fops will set the current time as the start time
in an xattr. The next rename/unlink/truncate/link call will check for the
auto commit period and if is is expired, then it will automatically do
the state transition. If it is a normal file then it gets converted
to WORM-Retained state. If it is a WORM-Retained file and its retention
period is expired, then it gets converted to WORM state.

Added the volume set options for the WORM translator. It allows the users
to change the default values of auto-commit-period, default-retention-period,
retention-mode. To make use of the file-level WORM first we have to set the
'worm-file' option to 'on'. The files which are created when the worm-file
option is set on the volume will get WORM-Retained. Other files will work
as usual and will not be WORMed. The auto-commit-period, retention-mode,
and the default-retention-period values for the file will be set to the values
which are set on the volume when the file is created.

Added the tests to check the basic functionalities of the WORM/Retention feature.

Change-Id: I77bd9777f9395a944d76b5cc35a5b48a3c14d148
BUG: 1326308
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13429
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To activate the file level worm feature, the features.read-only and
features.worm options should be switched "off" on the volume and
the features.worm-file-level should be switched "on". Both read-only
and worm or worm-file-level cannot be switched "on" together. The
files which are created when the worm-file-level option is set on the
volume will have their own retention profile.

If both worm and worm-file-level are "on" at that time the worm
which is the volume level worm will have priority over file level
worm. If worm-file level is switched "off" after some time and the
read-only option is switched "on" then read-only will have priority.

The current implementation allows the users to manually transmit
a file to a WORM-Retained state by removing all the write bits of
the file using the chmod command. The file will have a retention
profile which contains the state of the file, mode of retention,
and the default retention time.

The file will be made WORM-Retained for a default of 120 seconds
during which it will be immutable and undeletable and it sets the
atime of the file to the time till which it is retained.
After that period if any fop request comes for that file, will
make the transition from WORM-Retained state to WORM state, where
the file will be immutable but deletable and, it will reset
the atime to the actual atime of the file. If a WORM file needs
to be made undeletable again, it can be done by using the chmod
command with all the write bits removed.

There are two modes of retention:
1. Relax: where the retention time of a WORM-Retained file can be
   increased or decreased.
2. Enterprise: where the retention time of a WORM-Retained file
   can be increased but not be decreased.
Whenever a utime change(touch -a, -t, ...)request comes for a
file it checks the mode of retention before setting the utimes.
This is done only if the file is WORM-Retained but for a WORM file
it will change the utimes.

Lazy auto commit:
Whenever a file gets created it will store the creation time of the
file or if a file already exists then any of the next unlink, link,
truncate or rename fops will set the current time as the start time
in an xattr. The next rename/unlink/truncate/link call will check for the
auto commit period and if is is expired, then it will automatically do
the state transition. If it is a normal file then it gets converted
to WORM-Retained state. If it is a WORM-Retained file and its retention
period is expired, then it gets converted to WORM state.

Added the volume set options for the WORM translator. It allows the users
to change the default values of auto-commit-period, default-retention-period,
retention-mode. To make use of the file-level WORM first we have to set the
'worm-file' option to 'on'. The files which are created when the worm-file
option is set on the volume will get WORM-Retained. Other files will work
as usual and will not be WORMed. The auto-commit-period, retention-mode,
and the default-retention-period values for the file will be set to the values
which are set on the volume when the file is created.

Added the tests to check the basic functionalities of the WORM/Retention feature.

Change-Id: I77bd9777f9395a944d76b5cc35a5b48a3c14d148
BUG: 1326308
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13429
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
