<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/protocol, branch v3.8.13</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>rpcsvc: Add rpchdr and proghdr to iobref before submitting to transport</title>
<updated>2017-04-07T12:05:09+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2017-02-14T07:15:36+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=982de32c7f559ab57f66a9ee92f884b772bae1e4'/>
<id>982de32c7f559ab57f66a9ee92f884b772bae1e4</id>
<content type='text'>
Backport of https://review.gluster.org/16613

Issue:
When fio is run on multiple clients (each client writes to its own files),
and meanwhile the clients does a readdirp, thus the client which did
a readdirp will now recieve the upcalls. In this scenario the client
disconnects with rpc decode failed error.

RCA:
Upcall calls rpcsvc_request_submit to submit the request to socket:
rpcsvc_request_submit currently:
rpcsvc_request_submit () {
   iobuf = iobuf_new
   iov = iobuf-&gt;ptr
   fill iobuf to contain xdrised upcall content - proghdr
   rpcsvc_callback_submit (..iov..)
   ...
   if (iobuf)
       iobuf_unref (iobuf)
}

rpcsvc_callback_submit (... iov...) {
   ...
   iobuf = iobuf_new
   iov1 = iobuf-&gt;ptr
   fill iobuf to contain xdrised rpc header - rpchdr
   msg.rpchdr = iov1
   msg.proghdr = iov
   ...
   rpc_transport_submit_request (msg)
   ...
   if (iobuf)
       iobuf_unref (iobuf)
}

rpcsvc_callback_submit assumes that once rpc_transport_submit_request()
returns the msg is written on to socket and thus the buffers(rpchdr, proghdr)
can be freed, which is not the case. In especially high workload,
rpc_transport_submit_request() may not be able to write to socket immediately
and hence adds it to its own queue and returns as successful. Thus, we have
use after free, for rpchdr and proghdr. Hence the clients gets garbage rpchdr
and proghdr and thus fails to decode the rpc, resulting in disconnect.

To prevent this, we need to add the rpchdr and proghdr to a iobref and send
it in msg:
   iobref_add (iobref, iobufs)
   msg.iobref = iobref;
The socket layer takes a ref on msg.iobref, if it cannot write to socket and
is adding to the queue. Thus we do not have use after free.

Thank You for discussing, debugging and fixing along:
Prashanth Pai &lt;ppai@redhat.com&gt;
Raghavendra G &lt;rgowdapp@redhat.com&gt;
Rajesh Joseph &lt;rjoseph@redhat.com&gt;
Kotresh HR &lt;khiremat@redhat.com&gt;
Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
Soumya Koduri &lt;skoduri@redhat.com&gt;

&gt; Reviewed-on: https://review.gluster.org/16613
&gt; Reviewed-by: Prashanth Pai &lt;ppai@redhat.com&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: soumya k &lt;skoduri@redhat.com&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;

Change-Id: Ifa6bf6f4879141f42b46830a37c1574b21b37275
BUG: 1422788
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16638
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Prashanth Pai &lt;ppai@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of https://review.gluster.org/16613

Issue:
When fio is run on multiple clients (each client writes to its own files),
and meanwhile the clients does a readdirp, thus the client which did
a readdirp will now recieve the upcalls. In this scenario the client
disconnects with rpc decode failed error.

RCA:
Upcall calls rpcsvc_request_submit to submit the request to socket:
rpcsvc_request_submit currently:
rpcsvc_request_submit () {
   iobuf = iobuf_new
   iov = iobuf-&gt;ptr
   fill iobuf to contain xdrised upcall content - proghdr
   rpcsvc_callback_submit (..iov..)
   ...
   if (iobuf)
       iobuf_unref (iobuf)
}

rpcsvc_callback_submit (... iov...) {
   ...
   iobuf = iobuf_new
   iov1 = iobuf-&gt;ptr
   fill iobuf to contain xdrised rpc header - rpchdr
   msg.rpchdr = iov1
   msg.proghdr = iov
   ...
   rpc_transport_submit_request (msg)
   ...
   if (iobuf)
       iobuf_unref (iobuf)
}

rpcsvc_callback_submit assumes that once rpc_transport_submit_request()
returns the msg is written on to socket and thus the buffers(rpchdr, proghdr)
can be freed, which is not the case. In especially high workload,
rpc_transport_submit_request() may not be able to write to socket immediately
and hence adds it to its own queue and returns as successful. Thus, we have
use after free, for rpchdr and proghdr. Hence the clients gets garbage rpchdr
and proghdr and thus fails to decode the rpc, resulting in disconnect.

To prevent this, we need to add the rpchdr and proghdr to a iobref and send
it in msg:
   iobref_add (iobref, iobufs)
   msg.iobref = iobref;
The socket layer takes a ref on msg.iobref, if it cannot write to socket and
is adding to the queue. Thus we do not have use after free.

Thank You for discussing, debugging and fixing along:
Prashanth Pai &lt;ppai@redhat.com&gt;
Raghavendra G &lt;rgowdapp@redhat.com&gt;
Rajesh Joseph &lt;rjoseph@redhat.com&gt;
Kotresh HR &lt;khiremat@redhat.com&gt;
Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
Soumya Koduri &lt;skoduri@redhat.com&gt;

&gt; Reviewed-on: https://review.gluster.org/16613
&gt; Reviewed-by: Prashanth Pai &lt;ppai@redhat.com&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: soumya k &lt;skoduri@redhat.com&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;

Change-Id: Ifa6bf6f4879141f42b46830a37c1574b21b37275
BUG: 1422788
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16638
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Prashanth Pai &lt;ppai@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: Fix double free of client fdctx destroy</title>
<updated>2017-02-20T05:14:59+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2017-02-02T11:11:45+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a80c40391ad894f00c46c217092a8a751d29dea6'/>
<id>a80c40391ad894f00c46c217092a8a751d29dea6</id>
<content type='text'>
This patch fixes the race between fd re-open code and fd release code,
both of which free the fd context due to a race in certain variable
checks as explained below:

1. client process (shd in the case of this BZ) sends an opendir to its
children (client xlators) which send the fop to the bricks to get a valid fd.

2. Client xlator loses connection to the brick. fdctx-&gt;remotefd is -1

3. Client re-establishes connection. After handshake, it reopens the dir
and sets fdctx-&gt;remotefd to a valid fd in client3_3_reopendir_cbk().

4. Meanwhile, shd sends a fd unref after it is done with the opendir.
This triggers a releasedir (since fd-&gt;refcount becomes 0).

5. client3_3_releasedir() sees that fdctx--&gt;remotefd is a valid number
(i.e not -1), sets fdctx-&gt;released=1 and calls  client_fdctx_destroy()

6. As a continuation of step3, client_reopen_done() is called by
client3_3_reopendir_cbk(), which sees that fdctx-&gt;released==1 and
again calls client_fdctx_destroy().

Depending on when step-5 does GF_FREE(fdctx), we may crash at any place in
step-6 in client3_3_reopendir_cbk() when it tries to access
fdctx-&gt;{whatever}.

&gt; Reviewed-on: https://review.gluster.org/16521
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
(cherry picked from commit 25fc74f9d1f2b1e7bab76485a99f27abadd10b7b)

Change-Id: Ia50873d11763e084e41d2a1f4d53715438e5e947
BUG: 1422352
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16621
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: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the race between fd re-open code and fd release code,
both of which free the fd context due to a race in certain variable
checks as explained below:

1. client process (shd in the case of this BZ) sends an opendir to its
children (client xlators) which send the fop to the bricks to get a valid fd.

2. Client xlator loses connection to the brick. fdctx-&gt;remotefd is -1

3. Client re-establishes connection. After handshake, it reopens the dir
and sets fdctx-&gt;remotefd to a valid fd in client3_3_reopendir_cbk().

4. Meanwhile, shd sends a fd unref after it is done with the opendir.
This triggers a releasedir (since fd-&gt;refcount becomes 0).

5. client3_3_releasedir() sees that fdctx--&gt;remotefd is a valid number
(i.e not -1), sets fdctx-&gt;released=1 and calls  client_fdctx_destroy()

6. As a continuation of step3, client_reopen_done() is called by
client3_3_reopendir_cbk(), which sees that fdctx-&gt;released==1 and
again calls client_fdctx_destroy().

Depending on when step-5 does GF_FREE(fdctx), we may crash at any place in
step-6 in client3_3_reopendir_cbk() when it tries to access
fdctx-&gt;{whatever}.

&gt; Reviewed-on: https://review.gluster.org/16521
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
(cherry picked from commit 25fc74f9d1f2b1e7bab76485a99f27abadd10b7b)

Change-Id: Ia50873d11763e084e41d2a1f4d53715438e5e947
BUG: 1422352
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16621
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: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/client: Fix potential mem-leaks</title>
<updated>2016-12-21T06:54:35+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2016-12-16T04:01:41+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e470c060351c5c1b477b82bbe18c5adc00241384'/>
<id>e470c060351c5c1b477b82bbe18c5adc00241384</id>
<content type='text'>
        Backport of: http://review.gluster.org/16156

Commit 93eaeb9c93be3232f24e840044d560f9f0e66f71 introduces
leaks in INODELK callback where a dict is unserialized twice,
leading to dict leaks.

Change-Id: I2ad6f4243d78ba30841731d331f5a4a0006827da
BUG: 1405886
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16187
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: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of: http://review.gluster.org/16156

Commit 93eaeb9c93be3232f24e840044d560f9f0e66f71 introduces
leaks in INODELK callback where a dict is unserialized twice,
leading to dict leaks.

Change-Id: I2ad6f4243d78ba30841731d331f5a4a0006827da
BUG: 1405886
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16187
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: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/server: capture offset in seek</title>
<updated>2016-11-29T08:46:45+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2016-11-24T03:01:47+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=31927cd4db62b338f4763ce00ab512d20e4d8c32'/>
<id>31927cd4db62b338f4763ce00ab512d20e4d8c32</id>
<content type='text'>
Problem:
http://review.gluster.org/11482 implemented seek FOP but
http://review.gluster.org/#/c/14137/ 'undid' the change where we pack
the offset returned by seek in server xlator before sending it to the client.
As a result, seek always returns zero to the client for SEEK_HOLE/
SEEK_DATA.

Fix:
I think 14137 removed it unintentionally, hence adding it back again.


&gt; Reviewed-on: http://review.gluster.org/15920
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;

(cherry picked from commit cc37e5929d1e3ea4eaf4c4576a82066bf131ad05)
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Change-Id: I67a1f7b53214b043c5291f5704be4a50b698f91c
BUG: 1399130
Reviewed-on: http://review.gluster.org/15943
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: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
http://review.gluster.org/11482 implemented seek FOP but
http://review.gluster.org/#/c/14137/ 'undid' the change where we pack
the offset returned by seek in server xlator before sending it to the client.
As a result, seek always returns zero to the client for SEEK_HOLE/
SEEK_DATA.

Fix:
I think 14137 removed it unintentionally, hence adding it back again.


&gt; Reviewed-on: http://review.gluster.org/15920
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;

(cherry picked from commit cc37e5929d1e3ea4eaf4c4576a82066bf131ad05)
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Change-Id: I67a1f7b53214b043c5291f5704be4a50b698f91c
BUG: 1399130
Reviewed-on: http://review.gluster.org/15943
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: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/server: readlink rsp xdr will fail while readlink got an error</title>
<updated>2016-09-01T15:20:41+00:00</updated>
<author>
<name>Ryan Ding</name>
<email>ryan.ding@open-fs.com</email>
</author>
<published>2016-08-23T16:41:13+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ffc7d44095ba23c761a034fb713cae05df135f2b'/>
<id>ffc7d44095ba23c761a034fb713cae05df135f2b</id>
<content type='text'>
set gfs3_readlink_rsp.path with an empty string while error happen, to
make xdr_gfs3_readlink_rsp happy. otherwise the original errno will be
lost, and return an rpc internal errno instead.

Change-Id: I36655b66df8b9f164e5bd21eb17244722c2f5a52
BUG: 1370172
Signed-off-by: Ryan Ding &lt;ryan.ding@open-fs.com&gt;
Reviewed-on: http://review.gluster.org/15312
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Pranith Kumar Karampuri &lt;pkarampu@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>
set gfs3_readlink_rsp.path with an empty string while error happen, to
make xdr_gfs3_readlink_rsp happy. otherwise the original errno will be
lost, and return an rpc internal errno instead.

Change-Id: I36655b66df8b9f164e5bd21eb17244722c2f5a52
BUG: 1370172
Signed-off-by: Ryan Ding &lt;ryan.ding@open-fs.com&gt;
Reviewed-on: http://review.gluster.org/15312
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Pranith Kumar Karampuri &lt;pkarampu@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>protocol/client: Unserialize xdata even if lookup fails</title>
<updated>2016-08-22T20:18:30+00:00</updated>
<author>
<name>Anuradha Talur</name>
<email>atalur@redhat.com</email>
</author>
<published>2016-08-09T15:39:11+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=72af868ba4a0ff7e143adaec78168aaccda473ef'/>
<id>72af868ba4a0ff7e143adaec78168aaccda473ef</id>
<content type='text'>
Problem:
AFR relies on xdata returned by lookup to determine if
there are any files that need healing. This info is further
used to optimize readdirp.

In case of lookups with negative return value, client
xlator was sending NULL xdata. Due to absence of xdata,
AFR conservatively assumes that there are files that
need healing, which is incorrect.

Solution:
Even in case of unsuccessful lookups, send the xdata received
by protocol client so that higher xlators can get the info
that they rely on.

        &gt;Change-Id: Id3a1023eb536180888eb2c0b39050000b76f7226
        &gt;BUG: 1366284
        &gt;Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
        &gt;Reviewed-on: http://review.gluster.org/15120
        &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
        &gt;Reviewed-by: Poornima G &lt;pgurusid@redhat.com&gt;
        &gt;Tested-by: Poornima G &lt;pgurusid@redhat.com&gt;
        &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
        &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
        &gt;Reviewed-by: Ashish Pandey &lt;aspandey@redhat.com&gt;
        &gt;Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
        &gt;Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;

Change-Id: Id3a1023eb536180888eb2c0b39050000b76f7226
BUG: 1369187
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/15237
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
AFR relies on xdata returned by lookup to determine if
there are any files that need healing. This info is further
used to optimize readdirp.

In case of lookups with negative return value, client
xlator was sending NULL xdata. Due to absence of xdata,
AFR conservatively assumes that there are files that
need healing, which is incorrect.

Solution:
Even in case of unsuccessful lookups, send the xdata received
by protocol client so that higher xlators can get the info
that they rely on.

        &gt;Change-Id: Id3a1023eb536180888eb2c0b39050000b76f7226
        &gt;BUG: 1366284
        &gt;Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
        &gt;Reviewed-on: http://review.gluster.org/15120
        &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
        &gt;Reviewed-by: Poornima G &lt;pgurusid@redhat.com&gt;
        &gt;Tested-by: Poornima G &lt;pgurusid@redhat.com&gt;
        &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
        &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
        &gt;Reviewed-by: Ashish Pandey &lt;aspandey@redhat.com&gt;
        &gt;Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
        &gt;Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;

Change-Id: Id3a1023eb536180888eb2c0b39050000b76f7226
BUG: 1369187
Signed-off-by: Anuradha Talur &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/15237
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol/server: Fix client/server compatibility</title>
<updated>2016-07-05T11:57:59+00:00</updated>
<author>
<name>Avra Sengupta</name>
<email>asengupt@redhat.com</email>
</author>
<published>2016-06-27T07:10:17+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=50f8fd392badbec83196638045ed213e8f27e514'/>
<id>50f8fd392badbec83196638045ed213e8f27e514</id>
<content type='text'>
The 3.8 client expects a child_up key from the server
indicating the status of the server translators. This
key is not being sent by the servers running older
versions, thereby breaking compatibility.

With this patch we are treating the absence of the said
key as an indication that the server trying to connect
to this client is running an older version and hence
in such a case we are setting conf-&gt;child_up as
_gf_true explicitly. This should suffice in emulating
the older behavior.

Due to the nature of this bug, requiring two version to
be reproducible, there are no testcases added for the same.

&gt; Reviewed-on: http://review.gluster.org/14811
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.org&gt;

(cherry picked from commit 10fa1bcce3b73f630dbc3241722c1af9dee4c414)

Change-Id: I29e0a5c63b55380dc9db8e42852d7e95b64a2b2e
BUG: 1350326
Signed-off-by: Avra Sengupta &lt;asengupt@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14810
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: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 3.8 client expects a child_up key from the server
indicating the status of the server translators. This
key is not being sent by the servers running older
versions, thereby breaking compatibility.

With this patch we are treating the absence of the said
key as an indication that the server trying to connect
to this client is running an older version and hence
in such a case we are setting conf-&gt;child_up as
_gf_true explicitly. This should suffice in emulating
the older behavior.

Due to the nature of this bug, requiring two version to
be reproducible, there are no testcases added for the same.

&gt; Reviewed-on: http://review.gluster.org/14811
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.org&gt;

(cherry picked from commit 10fa1bcce3b73f630dbc3241722c1af9dee4c414)

Change-Id: I29e0a5c63b55380dc9db8e42852d7e95b64a2b2e
BUG: 1350326
Signed-off-by: Avra Sengupta &lt;asengupt@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14810
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: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: Negate all but O_DIRECT flag if present on anon fds</title>
<updated>2016-06-28T05:57:11+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2016-06-07T11:45:56+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=37fa947743d5e56baa617fc2e72485a1907b39d2'/>
<id>37fa947743d5e56baa617fc2e72485a1907b39d2</id>
<content type='text'>
        Backport of: http://review.gluster.org/14665

This is to prevent any unforeseen problems that might arise due to
writevs and readvs being wound with @flag parameter containing
O_TRUNC or O_APPEND especially wrt translators like sharding and ec
where O_TRUNC write or O_APPEND write on individual shards/fragments
is not the same as O_TRUNC write or O_APPEND write as expected by the
application.

 &gt;Change-Id: Ib0110731d6099bc888b7ada552a2abbea8e76051
 &gt;BUG: 1342903
 &gt;Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/14735
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;

Change-Id: I7ffa4fa366f727f7e345ab0bf4c8eb009710074b
BUG: 1347553
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14755
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of: http://review.gluster.org/14665

This is to prevent any unforeseen problems that might arise due to
writevs and readvs being wound with @flag parameter containing
O_TRUNC or O_APPEND especially wrt translators like sharding and ec
where O_TRUNC write or O_APPEND write on individual shards/fragments
is not the same as O_TRUNC write or O_APPEND write as expected by the
application.

 &gt;Change-Id: Ib0110731d6099bc888b7ada552a2abbea8e76051
 &gt;BUG: 1342903
 &gt;Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/14735
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;

Change-Id: I7ffa4fa366f727f7e345ab0bf4c8eb009710074b
BUG: 1347553
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14755
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>core, shard: Make shards inherit main file's O_DIRECT flag if present</title>
<updated>2016-06-27T15:17:55+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2016-05-02T11:21:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=42d6a493570599277ed88b51ab0fb9760840ed1b'/>
<id>42d6a493570599277ed88b51ab0fb9760840ed1b</id>
<content type='text'>
        Backport of: http://review.gluster.org/14191

If the application opens a file with O_DIRECT, the shards'
anon fds would also need to inherit the flag. Towards this,
shard xl would be passing the odirect flag in the @flags parameter
to the WRITEV fop. This will be used in anon fd resolution
and subsequent opening by posix xl.

 &gt;Change-Id: I3a0593fa46cc25e390a5762a0354b469c2a1532d
 &gt;BUG: 1342903
 &gt;Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/14663
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;

Change-Id: Ibfc164aa7f9eecd6993255f1c03557f2ec35ac8c
BUG: 1347553
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14754
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of: http://review.gluster.org/14191

If the application opens a file with O_DIRECT, the shards'
anon fds would also need to inherit the flag. Towards this,
shard xl would be passing the odirect flag in the @flags parameter
to the WRITEV fop. This will be used in anon fd resolution
and subsequent opening by posix xl.

 &gt;Change-Id: I3a0593fa46cc25e390a5762a0354b469c2a1532d
 &gt;BUG: 1342903
 &gt;Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
 &gt;Reviewed-on: http://review.gluster.org/14663
 &gt;Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
 &gt;NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
 &gt;Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;

Change-Id: Ibfc164aa7f9eecd6993255f1c03557f2ec35ac8c
BUG: 1347553
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14754
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>protocol: Add framework to send transaction id with recall</title>
<updated>2016-06-10T11:03:54+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2016-06-05T04:06:11+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=57372682b174c1483c41e8bc2474dcfebf0b86df'/>
<id>57372682b174c1483c41e8bc2474dcfebf0b86df</id>
<content type='text'>
Backport of: http://review.gluster.org/#/c/14647/

Issue:
The upcall(cache invalidation/recall) event is sent from the bricks
to clients. In AFR/EC setup, it can so happen that all the bricks
will send the upcall for the same event, and if AFR/EC doesn't filter
out these duplicate notifications, the logic above cluster xlators
can fail.

Solution:
Use transaction id to filter out duplicate notifications.

This patch adds framework for duplicate notifications.
AFR/EC can build up on this patch for deduping the notifications

Change-Id: I66b08e63b8799bc5932f2b2545376138a5701168
BUG: 1337638
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14648
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: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of: http://review.gluster.org/#/c/14647/

Issue:
The upcall(cache invalidation/recall) event is sent from the bricks
to clients. In AFR/EC setup, it can so happen that all the bricks
will send the upcall for the same event, and if AFR/EC doesn't filter
out these duplicate notifications, the logic above cluster xlators
can fail.

Solution:
Use transaction id to filter out duplicate notifications.

This patch adds framework for duplicate notifications.
AFR/EC can build up on this patch for deduping the notifications

Change-Id: I66b08e63b8799bc5932f2b2545376138a5701168
BUG: 1337638
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14648
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: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
