protocol/server: print connection-id in fop failure logs.

Currently we have tuple (server-xlator-name, callid) for identifying
a call. However it does not uniquely identify the operation when there
are multiple clients (since operations from all clients go through same
server). Adding connection-id resolves this ambiguity.
Also printing connection-id helps diagnose failures associated with
connection state (like fds, locks).

Change-Id: I13563bd06ee9b72fc1a10d239f77db5183658573
BUG: 963540
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/5011
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
nfs/mount3: fix crash in subdir resolution

* __mnt3_resolve_export_subdir_comp: if nfs_entry_loc_fill fails,
  mres->resolveloc does not contain valid data
* gf_log should use 'gfid' instead of mres->resolveloc.inode->gfid
* fixes a crash if program flow gets to this line

Change-Id: Idb0d6f97ea73eaf9056d28267ad7a42aa8cf6579
Signed-off-by: Michael Brown <michael@netdirect.ca>
Reviewed-on: http://review.gluster.org/4948
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
cluster/afr: Perform delayed changelog wakeups for anon fd

Problem:
Nfs xlator never does open on a file for performing writes,
afr does not perform changelog wakeup for this fd so operations
which do metadata operations as soon as the data operations are
completed perceive a delay of 'post-op-delay-secs'.

Fix:
Perform changelog wakeup on anon-fd if the fd with same pid is
not present in inode-list.

Note:
This approach is a short-term fix. A proper fix needs a new domain
for taking metadata locks so that data/metadata locks don't compete
with each other.

Change-Id: I253afb289eadf30c7951e56fb2c4840d7132f5e4
BUG: 966018
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5066
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
gfapi: fix read past EOF in glfs_preadv()

When syncop_preadv() returns 0, we are returning @size as-is
(without modifying user passed buffer). This results in
junk data being read when read offset is at or beyond EOF.

Change-Id: I8aa9c957359f9a52833b944b452f501b6f5538d3
BUG: 953694
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5236
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: José Rivera <jrivera@redhat.com>
Tested-by: José Rivera <jrivera@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
store: move glusterd_store functions from mgmt/glusterd to libglusterfs

Making the glusterd_store_* functions re-usable will help with future
changes that need to read/write lists of items.

BUG: 904065
Change-Id: I99fb8eced76d12d5a254567eccff9790b43d8da3
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4676
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
glusterfsd: consider xlator type too in topology check

When cluster.nufa option is enabled, we only change the translator
type, but leave the translator name as-is. This results in the
topology change check to conclude that a graph switch is not needed.

Change-Id: I4f4d0cec2bd4796c95274f0328584a4e7b8b5cd3
BUG: 975599
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5244
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
rpc: duplicate request cache for nfs

Duplicate request cache provides a mechanism for detecting
duplicate rpc requests from clients. DRC caches replies
and on duplicate requests, sends the cached reply instead of
re-processing the request.

Change-Id: I3d62a6c4aa86c92bf61f1038ca62a1a46bf1c303
BUG: 847624
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4049
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/dht: In reconfig handle removed decommissioned nodes

If no decommissioned nodes options are set in the options, then
clear the conf->decommissioned_bricks.

Change-Id: I426d2bcc874aab21b2eba0b16a580b9a26672ea2
Signed-off-by: shishir gowda <sgowda@redhat.com>
BUG: 973073
Reviewed-on: http://review.gluster.org/5199
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Merge branch 'master' of github.com:gluster/glusterfs
fix segfaults