geo-rep: Avoid duplicate stat in xsync changelog processing

When A file/dir is identified for metadata sync, it was doing
duplicate stat to get the metadata to sync.

With this patch it avoids doing one additional stat call. Xsync
performance will improve.

rsync will copy files metadata, so no need to include for
processing.

BUG: 1111490

Change-Id: I79dad6375fa4742d9aaca7d9856993c184a744dc
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8124
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
client_t: Fix memory leaks

- Assign frame->root->client so that gf_client_unref happens
  in server_connection_cleanup_flush_cbk
- Avoid taking extra ref in gf_client_get

TODO:
The whole reason why there are two types of refs
bind, ref-count is to avoid lock inside lock which
is not the case now. I will be sending one more patch
which will accomplish that as well as changing the
tablearray to list

Change-Id: Ic9971cf248c5ee2cdbfdef8e9ff6d54e3ec60ced
BUG: 1116672
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8247
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
rpc: Do not reset @ping_started to 0 in ping callback

This is to avoid indefinite recursion of the following kind, that could
lead to a stack overflow:

rpc_clnt_start_ping() -> rpc_clnt_ping() -> rpc_clnt_submit() ->
rpc_clnt_start_ping() -> rpc_clnt_ping() -> rpc_clnt_submit() ...
and so on,

since it is possible that before rpc_clnt_start_ping() is called a
second time by the thread executing this codepath, the response to
previous ping request could ALWAYS come by and cause epoll thread to
reset conn->ping_started to 0.

This patch also fixes the issue of excessive ping traffic, which was
due to the client sending one ping rpc for every fop in the worst case.

Also removed dead code in glusterd.

Change-Id: I7c5e6ae3b1c9d23407c0a12a319bdcb43ba7a359
BUG: 1116243
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8257
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
tests: Print EXPECT style error messages rather than 'not ok'

Change-Id: Ib23426c5ede0ab71387a6a112b313aa448b872cd
BUG: 1092850
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8263
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
libgfapi: succeed lookup of "/.."

For the root dir, ".." should resolve to itself.

i.e. when
        glfs_h_lookupat (fs, NULL, "/..", &stat)
(or)
        glfs_h_lookupat (fs, root, "..", &stat)

is performed, stat must contain root dir's information.

Change-Id: I1c92091cdc4ff00e6b17e5fa349009c6dfc441c1
BUG: 1114814
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/8207
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Merge remote-tracking branch 'origin/master' into better-peer-identification
Hostnames in peer status

Change-Id: I2e1a4f7ffb1025407ddcb142df8a033bfdeba515