<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/trash/src, branch v3.7.4</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>features/trash : Notify CTR translator if an unlink happens to a file</title>
<updated>2015-05-05T06:21:06+00:00</updated>
<author>
<name>Jiffin Tony Thottan</name>
<email>jthottan@redhat.com</email>
</author>
<published>2015-03-25T09:34:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c85b7c2c0c7b8b9e576ebd20e7446b9051c733e4'/>
<id>c85b7c2c0c7b8b9e576ebd20e7446b9051c733e4</id>
<content type='text'>
        Backport of http://review.gluster.org/#/c/9989/

This implementation is same as the posix_unlink_cbk() where CTR sends
a request during a unlink to send the number of links to the inode
and posix obliges sending it using the unwind xdata dict.
For Trash xlator a unlink is stat + mkdir(if parent is not present)
+ rename. And hence this is handled in trash_unlink_rename_cbk().

Change-Id: I402e83567b88e3c9fe171379693c82937af567f9
BUG: 1218032
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10513
Reviewed-by: Joseph Fernandes
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of http://review.gluster.org/#/c/9989/

This implementation is same as the posix_unlink_cbk() where CTR sends
a request during a unlink to send the number of links to the inode
and posix obliges sending it using the unwind xdata dict.
For Trash xlator a unlink is stat + mkdir(if parent is not present)
+ rename. And hence this is handled in trash_unlink_rename_cbk().

Change-Id: I402e83567b88e3c9fe171379693c82937af567f9
BUG: 1218032
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10513
Reviewed-by: Joseph Fernandes
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/trash: Minor coverity fixes</title>
<updated>2015-04-27T06:25:28+00:00</updated>
<author>
<name>Anoop C S</name>
<email>achiraya@redhat.com</email>
</author>
<published>2015-04-15T07:31:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f2026fd6d5993fa5d57ccb7b0add832cef14e09c'/>
<id>f2026fd6d5993fa5d57ccb7b0add832cef14e09c</id>
<content type='text'>
        Backport of http://review.gluster.org/10315

CID 1288784
CID 1288785
CID 1288795
CID 1288796
CID 1288797
CID 1288802

Change-Id: I51dd7653a2dce3b7b6387e5d91c1c07eb157a04b
BUG: 1215026
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10361
Tested-by: NetBSD Build System
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of http://review.gluster.org/10315

CID 1288784
CID 1288785
CID 1288795
CID 1288796
CID 1288797
CID 1288802

Change-Id: I51dd7653a2dce3b7b6387e5d91c1c07eb157a04b
BUG: 1215026
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10361
Tested-by: NetBSD Build System
</pre>
</div>
</content>
</entry>
<entry>
<title>features/trash: More coverity fixes</title>
<updated>2015-04-04T17:58:15+00:00</updated>
<author>
<name>Anoop C S</name>
<email>achiraya@redhat.com</email>
</author>
<published>2015-03-24T09:04:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d2ada381fe332b6151d12d3ef1d1e47f9f7c77f7'/>
<id>d2ada381fe332b6151d12d3ef1d1e47f9f7c77f7</id>
<content type='text'>
The following CIDs are being addressed:

1288792
1288794

Change-Id: Ic2cdaf43f05488e04616ceb801b47a47c6a93656
BUG: 789278
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10082
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>
The following CIDs are being addressed:

1288792
1288794

Change-Id: Ic2cdaf43f05488e04616ceb801b47a47c6a93656
BUG: 789278
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10082
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>Avoid conflict between contrib/uuid and system uuid</title>
<updated>2015-04-04T17:48:35+00:00</updated>
<author>
<name>Emmanuel Dreyfus</name>
<email>manu@netbsd.org</email>
</author>
<published>2015-04-02T13:51:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=28397cae4102ac3f08576ebaf071ad92683097e8'/>
<id>28397cae4102ac3f08576ebaf071ad92683097e8</id>
<content type='text'>
glusterfs relies on Linux uuid implementation, which
API is incompatible with most other systems's uuid. As
a result, libglusterfs has to embed contrib/uuid,
which is the Linux implementation, on non Linux systems.
This implementation is incompatible with systtem's
built in, but the symbols have the same names.

Usually this is not a problem because when we link
with -lglusterfs, libc's symbols are trumped. However
there is a problem when a program not linked with
-lglusterfs will dlopen() glusterfs component. In
such a case, libc's uuid implementation is already
loaded in the calling program, and it will be used
instead of libglusterfs's implementation, causing
crashes.

A possible workaround is to use pre-load libglusterfs
in the calling program (using LD_PRELOAD on NetBSD for
instance), but such a mechanism is not portable, nor
is it flexible. A much better approach is to rename
libglusterfs's uuid_* functions to gf_uuid_* to avoid
any possible conflict. This is what this change attempts.

BUG: 1206587
Change-Id: I9ccd3e13afed1c7fc18508e92c7beb0f5d49f31a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/10017
Tested-by: 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>
glusterfs relies on Linux uuid implementation, which
API is incompatible with most other systems's uuid. As
a result, libglusterfs has to embed contrib/uuid,
which is the Linux implementation, on non Linux systems.
This implementation is incompatible with systtem's
built in, but the symbols have the same names.

Usually this is not a problem because when we link
with -lglusterfs, libc's symbols are trumped. However
there is a problem when a program not linked with
-lglusterfs will dlopen() glusterfs component. In
such a case, libc's uuid implementation is already
loaded in the calling program, and it will be used
instead of libglusterfs's implementation, causing
crashes.

A possible workaround is to use pre-load libglusterfs
in the calling program (using LD_PRELOAD on NetBSD for
instance), but such a mechanism is not portable, nor
is it flexible. A much better approach is to rename
libglusterfs's uuid_* functions to gf_uuid_* to avoid
any possible conflict. This is what this change attempts.

BUG: 1206587
Change-Id: I9ccd3e13afed1c7fc18508e92c7beb0f5d49f31a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/10017
Tested-by: 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>features/trash: fix remove_trash_path in the internal case</title>
<updated>2015-04-01T06:52:04+00:00</updated>
<author>
<name>Michael Adam</name>
<email>obnox@samba.org</email>
</author>
<published>2015-03-31T11:47:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=ef5c3182224940f76d9290c1c4d9cc8e78fbdb83'/>
<id>ef5c3182224940f76d9290c1c4d9cc8e78fbdb83</id>
<content type='text'>
In the internal case, copy_trash_path adds a second
path component "internal_op/", so remove_trash_path
should remove it again. Originally, remove_trash_path
did the same thing in the internal and non-internal case.
This patch fixes this problem.

Change-Id: If247d18217a2375d369672182f69a54881df26b9
BUG: 1207709
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
Reviewed-on: http://review.gluster.org/10073
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the internal case, copy_trash_path adds a second
path component "internal_op/", so remove_trash_path
should remove it again. Originally, remove_trash_path
did the same thing in the internal and non-internal case.
This patch fixes this problem.

Change-Id: If247d18217a2375d369672182f69a54881df26b9
BUG: 1207709
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
Reviewed-on: http://review.gluster.org/10073
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/trash: fix remove_trash_path() to do what it is intended.</title>
<updated>2015-04-01T06:51:33+00:00</updated>
<author>
<name>Michael Adam</name>
<email>obnox@samba.org</email>
</author>
<published>2015-03-31T08:30:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5c1ce6d29ee52af9daa23c1c7a54f23ce29a687e'/>
<id>5c1ce6d29ee52af9daa23c1c7a54f23ce29a687e</id>
<content type='text'>
The intention is to set the the rem_path string pointer that
is handed in from the outside. So the string has to be passed
in by reference, or else the function just sets a pointer on
the stack.

Found by Coverity, CID 1288791

Also fixes:
CID 1288791
CID 1288809
CID 1288810
CID 1288814
CID 1288815
CID 1288817
CUD 1288818

Change-Id: I6ef5eeb58b83a875cf90513291abe37dee3fc9fb
BUG: 789278
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
Reviewed-on: http://review.gluster.org/10064
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The intention is to set the the rem_path string pointer that
is handed in from the outside. So the string has to be passed
in by reference, or else the function just sets a pointer on
the stack.

Found by Coverity, CID 1288791

Also fixes:
CID 1288791
CID 1288809
CID 1288810
CID 1288814
CID 1288815
CID 1288817
CUD 1288818

Change-Id: I6ef5eeb58b83a875cf90513291abe37dee3fc9fb
BUG: 789278
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
Reviewed-on: http://review.gluster.org/10064
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/trash: fix storing/wiping of eliminate path (coverity)</title>
<updated>2015-04-01T06:08:23+00:00</updated>
<author>
<name>Michael Adam</name>
<email>obnox@samba.org</email>
</author>
<published>2015-03-31T10:30:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=562cdace9152add786f156e38dc3fbc8805a69b7'/>
<id>562cdace9152add786f156e38dc3fbc8805a69b7</id>
<content type='text'>
Functions store_eliminate_path() and wipe_eliminate_path() take
eliminate as a plain pointer not pointer to pointer. Hence
store_eliminate_path fails to hand the allocated and filled
eliminate data out to the caller (in particular leaking memory),
and wipe_eliminate_path() fails to NULL the freed eliminate path.

This leads to several leak and access after free errors found
by Coverity. This patch fixes the issue by handing in eliminate
by reference and in the case of wipe_eliminate path, also NULLing
out the free'd pointer.

This fixes the following coverity IDs:

CID 1288759
CID 1288790

Change-Id: I7520ae42c5f6e369a145bea67b4ff95b75d2ae73
BUG: 789278
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
Reviewed-on: http://review.gluster.org/10068
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functions store_eliminate_path() and wipe_eliminate_path() take
eliminate as a plain pointer not pointer to pointer. Hence
store_eliminate_path fails to hand the allocated and filled
eliminate data out to the caller (in particular leaking memory),
and wipe_eliminate_path() fails to NULL the freed eliminate path.

This leads to several leak and access after free errors found
by Coverity. This patch fixes the issue by handing in eliminate
by reference and in the case of wipe_eliminate path, also NULLing
out the free'd pointer.

This fixes the following coverity IDs:

CID 1288759
CID 1288790

Change-Id: I7520ae42c5f6e369a145bea67b4ff95b75d2ae73
BUG: 789278
Signed-off-by: Michael Adam &lt;obnox@samba.org&gt;
Reviewed-on: http://review.gluster.org/10068
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/trash : Discarding extended truncate for trash-translator</title>
<updated>2015-03-30T07:48:50+00:00</updated>
<author>
<name>Jiffin Tony Thottan</name>
<email>jthottan@redhat.com</email>
</author>
<published>2015-03-24T10:59:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=3db5f3a41b7029ce8005d1e1cc01808a15cc6019'/>
<id>3db5f3a41b7029ce8005d1e1cc01808a15cc6019</id>
<content type='text'>
Change-Id: I5c571cbb2d6da1e95831ec206639926722a9d281
BUG: 1132465
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9984
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.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: I5c571cbb2d6da1e95831ec206639926722a9d281
BUG: 1132465
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9984
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/trash: Removing dead callbacks</title>
<updated>2015-03-27T17:43:23+00:00</updated>
<author>
<name>Anoop C S</name>
<email>achiraya@redhat.com</email>
</author>
<published>2015-03-26T06:30:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=bc71cc39881730c8592718a5045a744387bfaea4'/>
<id>bc71cc39881730c8592718a5045a744387bfaea4</id>
<content type='text'>
Since ftruncate create, mkdir, writev, readv and
unlink calls are being re-directed to corresponding
truncate calls, we no longer need their cbks. So
removing those cbks for now.

Change-Id: I41ecde7093a555b3bf69b66afaa8eca835b4982a
BUG: 1132465 
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10002
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since ftruncate create, mkdir, writev, readv and
unlink calls are being re-directed to corresponding
truncate calls, we no longer need their cbks. So
removing those cbks for now.

Change-Id: I41ecde7093a555b3bf69b66afaa8eca835b4982a
BUG: 1132465 
Signed-off-by: Anoop C S &lt;achiraya@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10002
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: jiffin tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/trash: Handling hardlinks in trash translator</title>
<updated>2015-03-24T07:18:50+00:00</updated>
<author>
<name>Jiffin Tony Thottan</name>
<email>jthottan@redhat.com</email>
</author>
<published>2015-03-18T08:42:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=191ab5693d3c9a0cdedc66bb24dd5efa535963d9'/>
<id>191ab5693d3c9a0cdedc66bb24dd5efa535963d9</id>
<content type='text'>
In the current code of trash translator, file is moved to
trash directory without checking whether it is the last
hardlink.This may lead to inconsistency for a file in that
gluster volume.To avoid those scenarios,so a file is moved
to trash directory only if it is the last hardlink.

Change-Id: Id098e53a2236c6406ef91e6e2599ea2cff9bace3
BUG: 1132465
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9926
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the current code of trash translator, file is moved to
trash directory without checking whether it is the last
hardlink.This may lead to inconsistency for a file in that
gluster volume.To avoid those scenarios,so a file is moved
to trash directory only if it is the last hardlink.

Change-Id: Id098e53a2236c6406ef91e6e2599ea2cff9bace3
BUG: 1132465
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9926
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
