<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/protocol/client/src/client-handshake.c, branch v3.4.0qa3</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>client-handshake: synchronize config.remote_port setting b/w</title>
<updated>2012-10-11T23:35:52+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>raghavendra@gluster.com</email>
</author>
<published>2012-10-08T08:46:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=92754cd1d12cdda18b27911f3e50eabd907edce6'/>
<id>92754cd1d12cdda18b27911f3e50eabd907edce6</id>
<content type='text'>
rpc_clnt_reconnect and client_query_portmap_cbk

problem:
-------
Theoretically there is a possibility that we could complete
querying the remote brick's port number before rpc_transport_connect
can return. If rpc_clnt_reconnect happens to be the caller of
rpc_transport_connect and we've already got the remote brick's port
number by the time rpc_transport_connect returns, without synchronization,
rpc_clnt_connect resets config.remote_port to zero even before we have
attempted a connection with remote brick.

fix:
---
By making only poll thread do setting and resetting of
config.remote_port, we avoid the race-condition.

Change-Id: I51879ba1cac651a80ff5c9c070ec7fe1ceea9e05
BUG: 765051
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Reviewed-on: http://review.gluster.org/4044
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rpc_clnt_reconnect and client_query_portmap_cbk

problem:
-------
Theoretically there is a possibility that we could complete
querying the remote brick's port number before rpc_transport_connect
can return. If rpc_clnt_reconnect happens to be the caller of
rpc_transport_connect and we've already got the remote brick's port
number by the time rpc_transport_connect returns, without synchronization,
rpc_clnt_connect resets config.remote_port to zero even before we have
attempted a connection with remote brick.

fix:
---
By making only poll thread do setting and resetting of
config.remote_port, we avoid the race-condition.

Change-Id: I51879ba1cac651a80ff5c9c070ec7fe1ceea9e05
BUG: 765051
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Reviewed-on: http://review.gluster.org/4044
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: quick-reconnect after portmap query</title>
<updated>2012-09-26T04:14:42+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@redhat.com</email>
</author>
<published>2012-09-26T00:08:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f29e26188635231652f57a518d85f110313933a2'/>
<id>f29e26188635231652f57a518d85f110313933a2</id>
<content type='text'>
Currently the disconnect after a portmap query is treated like an
ordinary disconnect and the reconnection attempt (in this case, to
the brick) is attempted only after 3 secs. This results in a delay
which is unnecessary.

Mark the disconnection happening because of a successful portmap
query as needing a 'quick reconnect' to avoid the delay for this
special case.

Change-Id: I43c8292ff0c30858d883ff3569a3761acbf2f5eb
BUG: 860220
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3994
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the disconnect after a portmap query is treated like an
ordinary disconnect and the reconnection attempt (in this case, to
the brick) is attempted only after 3 secs. This results in a delay
which is unnecessary.

Mark the disconnection happening because of a successful portmap
query as needing a 'quick reconnect' to avoid the delay for this
special case.

Change-Id: I43c8292ff0c30858d883ff3569a3761acbf2f5eb
BUG: 860220
Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
Reviewed-on: http://review.gluster.org/3994
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: Fix negative return in client_setvolume</title>
<updated>2012-08-01T07:03:15+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2012-07-30T17:01:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5070aa3973066ba7347b14b4b993dcde11e08165'/>
<id>5070aa3973066ba7347b14b4b993dcde11e08165</id>
<content type='text'>
PROBLEM:
The function dict_serialized_length could, owing to an error,
return a negative integer (-EINVAL) that gets assigned to an
unsigned int member 'dict_len' of gf_setvolume_req structure.

FIX:
Hold the value returned by dict_serialized_length in local
variable ret (which is a signed int). Test if ret is negative,
in which case the control would anyway branch to the label fail
where the function returns. Otherwise dict_len is assigned with
ret, in turn giving a more meaningful value to the attribute
length.

TEST:
Attached gdb to glusterfs mount process, set breakpoint at
client_setvolume, forced dict_serialized_length to return
-EINVAL (indirectly by forcing _dict_serialized_length to return
-EINVAL after setting count to -1 within its body) and checked
the value of ret (which is now sure to contain a negative value)
whose value will be appropriately tested to decide the next
course of action within client_setvolume: whether to simply
exit due to an error or execute the subsequent statements.

Change-Id: Ib22ad8f30d8ae04acaf2ff5bfee9c348a2c47148
BUG: 789278
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3755
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PROBLEM:
The function dict_serialized_length could, owing to an error,
return a negative integer (-EINVAL) that gets assigned to an
unsigned int member 'dict_len' of gf_setvolume_req structure.

FIX:
Hold the value returned by dict_serialized_length in local
variable ret (which is a signed int). Test if ret is negative,
in which case the control would anyway branch to the label fail
where the function returns. Otherwise dict_len is assigned with
ret, in turn giving a more meaningful value to the attribute
length.

TEST:
Attached gdb to glusterfs mount process, set breakpoint at
client_setvolume, forced dict_serialized_length to return
-EINVAL (indirectly by forcing _dict_serialized_length to return
-EINVAL after setting count to -1 within its body) and checked
the value of ret (which is now sure to contain a negative value)
whose value will be appropriately tested to decide the next
course of action within client_setvolume: whether to simply
exit due to an error or execute the subsequent statements.

Change-Id: Ib22ad8f30d8ae04acaf2ff5bfee9c348a2c47148
BUG: 789278
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3755
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>remove useless if-before-free (and free-like) functions</title>
<updated>2012-07-13T21:03:42+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-07-13T08:29:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=7820b2c1f88b207a8b1270b8c3cb3b797b7563d2'/>
<id>7820b2c1f88b207a8b1270b8c3cb3b797b7563d2</id>
<content type='text'>
See comments in http://bugzilla.redhat.com/839925 for
the code to perform this change.

Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
BUG: 839925
Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a
Reviewed-on: http://review.gluster.com/3661
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See comments in http://bugzilla.redhat.com/839925 for
the code to perform this change.

Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
BUG: 839925
Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a
Reviewed-on: http://review.gluster.com/3661
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: variable name changes</title>
<updated>2012-07-12T16:40:05+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2012-06-30T18:25:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=ac6be8b4204330d117d24e1473becda3f3989cb1'/>
<id>ac6be8b4204330d117d24e1473becda3f3989cb1</id>
<content type='text'>
's/3_1/3_3/g' in case of glusterfs protocol
's/3_1_/_/g' in case of CLI and mgmt protocol

Change-Id: I6e6510d02c05f68f290c52ed284c04576326e12c
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
BUG: 764890
Reviewed-on: http://review.gluster.com/3632
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
's/3_1/3_3/g' in case of glusterfs protocol
's/3_1_/_/g' in case of CLI and mgmt protocol

Change-Id: I6e6510d02c05f68f290c52ed284c04576326e12c
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
BUG: 764890
Reviewed-on: http://review.gluster.com/3632
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: Re-open should not have O_CREAT|O_TRUNC|O_EXCL</title>
<updated>2012-06-20T06:50:30+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-06-15T09:43:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=79aa6092a277975cb618d89da645080e51958543'/>
<id>79aa6092a277975cb618d89da645080e51958543</id>
<content type='text'>
RCA
The bug is observed in 3.2.x because posix xlator changes
the uid/gid of file as per frame-&gt;root-uid/gid if O_CREAT flag
is set in open fop. Posix does not do this in 3.3.x so that
bug does not appear anymore but this issue exposed the actual
bug in client xlator re-open. Re-open of a file on re-connection
should not perform re-open with the same flags at the time of
open/create/opendir. Imagine a case where a file is opened with
O_TRUNC|O_RDWR and some data is written to it, now if the brick
goes down and comes back the file will be truncated.
When I tested this case, the file is not truncated because locks
xlator resets O_TRUNC unconditionally.
Client xlator re-open bug and locks xlator bug cancel each other.

Fix
Reset O_CREAT|O_TRUNC|O_EXCL flags in re-open.
Locks xlator should not reset O_TRUNC.

Additional changes
Removed wbflags as it is not assigned at all.

Testcases
Automated go program is at:
://bugzilla.redhat.com/show_bug.cgi?id=807976#c2

Change-Id: I0080344fdda2e62e7c976c35a5bf5f1fa8838891
BUG: 807976
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3582
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RCA
The bug is observed in 3.2.x because posix xlator changes
the uid/gid of file as per frame-&gt;root-uid/gid if O_CREAT flag
is set in open fop. Posix does not do this in 3.3.x so that
bug does not appear anymore but this issue exposed the actual
bug in client xlator re-open. Re-open of a file on re-connection
should not perform re-open with the same flags at the time of
open/create/opendir. Imagine a case where a file is opened with
O_TRUNC|O_RDWR and some data is written to it, now if the brick
goes down and comes back the file will be truncated.
When I tested this case, the file is not truncated because locks
xlator resets O_TRUNC unconditionally.
Client xlator re-open bug and locks xlator bug cancel each other.

Fix
Reset O_CREAT|O_TRUNC|O_EXCL flags in re-open.
Locks xlator should not reset O_TRUNC.

Additional changes
Removed wbflags as it is not assigned at all.

Testcases
Automated go program is at:
://bugzilla.redhat.com/show_bug.cgi?id=807976#c2

Change-Id: I0080344fdda2e62e7c976c35a5bf5f1fa8838891
BUG: 807976
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3582
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: Remember the gfid of opened fd</title>
<updated>2012-06-06T19:35:44+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-06-04T13:43:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b8fb6096b94905e2d304cd4219a70939495bfcc5'/>
<id>b8fb6096b94905e2d304cd4219a70939495bfcc5</id>
<content type='text'>
This is needed when the fresh lookup triggers self-heal, gfid
won't be present in inode yet. Similar situation happens with
Rebalance as it does not perform inode_link.
Added similar fix for re-opendir.
Removed inode from fdctx and removed some duplication of code.

Change-Id: Ic94e5738c8585ed86801d2eed9ddab1015246710
BUG: 826080
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3517
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed when the fresh lookup triggers self-heal, gfid
won't be present in inode yet. Similar situation happens with
Rebalance as it does not perform inode_link.
Added similar fix for re-opendir.
Removed inode from fdctx and removed some duplication of code.

Change-Id: Ic94e5738c8585ed86801d2eed9ddab1015246710
BUG: 826080
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3517
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: do not access the local object after being freed</title>
<updated>2012-06-01T00:56:55+00:00</updated>
<author>
<name>Raghavendra Bhat</name>
<email>raghavendra@redhat.com</email>
</author>
<published>2012-05-30T13:32:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=27620d0f7d9b101cc47a13a23928f767248a8cff'/>
<id>27620d0f7d9b101cc47a13a23928f767248a8cff</id>
<content type='text'>
Change-Id: I2d3aeb084168b9ed68a670b91e09126917f82968
BUG: 826588
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3494
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I2d3aeb084168b9ed68a670b91e09126917f82968
BUG: 826588
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3494
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: use correct xlator object while creating frames</title>
<updated>2012-05-23T20:56:47+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>raghavendra@gluster.com</email>
</author>
<published>2012-05-23T18:13:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=69680ec053f741961a141c81fa095f76531665e2'/>
<id>69680ec053f741961a141c81fa095f76531665e2</id>
<content type='text'>
during reopening files and reacquiring locks.

Change-Id: I29f42fcfa9e782ce9e323e53024e5034029914a7
BUG: 822337
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3420
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
during reopening files and reacquiring locks.

Change-Id: I29f42fcfa9e782ce9e323e53024e5034029914a7
BUG: 822337
Signed-off-by: Raghavendra G &lt;raghavendra@gluster.com&gt;
Reviewed-on: http://review.gluster.com/3420
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: Concatinate the graph uuid along with process uuid in</title>
<updated>2012-05-18T07:50:31+00:00</updated>
<author>
<name>Mohammed Junaid</name>
<email>junaid@redhat.com</email>
</author>
<published>2012-05-11T07:21:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=19394ef5f133d18aea757129bd903307814f1afb'/>
<id>19394ef5f133d18aea757129bd903307814f1afb</id>
<content type='text'>
setlk_version.

Change-Id: Idec06c5ef1d440864e465f008a38c86395b52aba
BUG: 820831
Signed-off-by: Mohammed Junaid &lt;junaid@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3314
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
setlk_version.

Change-Id: Idec06c5ef1d440864e465f008a38c86395b52aba
BUG: 820831
Signed-off-by: Mohammed Junaid &lt;junaid@redhat.com&gt;
Reviewed-on: http://review.gluster.com/3314
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vijay@gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
