performance/io-cache: check the inode context to be NULL before accessing

Change-Id: I475af7f8ffd5e5d8adbd2a74af20e56ad7751f69
BUG: 958108
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4916
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.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
nfs: handle stable write with @flags rather than fsync()

stable writes can be "made stable" by simply setting O_SYNC (or
O_DSYNC, accordingly) in the write flags or fd->flags. Performing
fsync() at the end of the write is extremely inefficient and completely
messes up eager-locking logic in AFR.

Change-Id: I4d954c133641e246b2ab4df874bad0282667561f
BUG: 916372
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4591
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
storage/posix: honor O_SYNC and O_DSYNC sent in @flags of writev()

Historic bug - posix_writev() has been inspecting pfd->flushwrites for
performing fsync() after write, instead of @flags for O_SYNC|O_DSYNC.

pfd->flushwrites was never set anywhere and is unused completely. This
is behavior from the time before anonymous FD where open() had @wbflags
param. This is a leftover from that cleanup.

Change-Id: Id9bfe562a60db4eb3bd0a7705bdba91f2df2f3ec
BUG: 916372
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4738
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Fix spurious brick disconnects

Spurious disconnect were caused by a race condition inside
rpc_transport_ref()/rpc_transport_unref() that allowed the refcount
to drop to zero while the transport was still in use. The race
condition is made possible because of an uninitiaized mutex
produced when socket_server_event_handler() copies the transport

This is a backport of I34fe097a0ac21b0dbf58f5eed84880e3fd9814f2

BUG: 764655
Change-Id: Ib6a7c736f28ccc67d05be45629cddc18a642c11f
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/4908
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>