glusterd-volgen: fix rdma volume file path in case of 'tcp, rdma' transport.

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2258 (enhance gluster volume rebalance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
rpc-transport/rdma: don't return '0' in case of un-initiated rdma_connect()

needed to handle the re-configuration of the port in client protocol. If
there is a successful 'connect()' after the query port, the remote-port
value gets reset to '0'. In this case, if the connect() return 0 for
already connected socket, the query_portmap will keep happening in a loop.

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2258 (enhance gluster volume rebalance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
nfs:command to change the transport type of nfs server for volumes of transport tcp, rdma

Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2258 (enhance gluster volume rebalance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
fix multiple transport related portmap issues in client handshake

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2258 (enhance gluster volume rebalance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
stack: make process state dump more debug friendly

store points of stack wind and unwind (function names) for each
frame and dump them in process state dump

Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 1059 (enhancements for getting statistics from performance translators)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1059
afr: bg self-heal must be off if self-heal-count=0.

Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3036 (self-heal problem in replace-brick)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3036
pump: mark pending before notify to children to avoid race in single CPU.

Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3050 ('replace-brick' hangs on vm's)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3050
fuse: consider a lookup as revalidate even if the inode is present in new graph.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041
cluster/afr: fix the range of the lock taken in [f]truncate

Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3077 (afr [f]truncate locks wrong region in transaction)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3077
cluster/afr: set frame local before access wind

Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3072 (Crash in afr_access_cbk)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3072
rpc-transport/rdma: call ibv_fork_init to make rdma work with fork.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
mount/fuse: wait till CHILD_UP event is recieved to do the first lookup.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
mnt/fuse: Do a pthread_cond_broadcast for both CHILD_UP and CHILD_DOWN events.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
cli: Exit if glusterd is not operational in non-prompt modes

Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3120 (Provide connection timeout between cli and glusterd)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3120
nfs-rpc: Use mempool for allocating connection object

Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3039 (NFS RPC leaks memory in client connection creation on showmount -e)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3039
client-handshake: skip CHILD_DOWN notifications when client is querying port using different volume names in the presence of rdma.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
storage/posix: detect race in posix_rename()

detect a race in rename between two clients by checking for
reassigned gfid or presence of dir when not expecting.

checks not necessary for rename of files.

Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
cluster/dht: fix race between two directory renames

let the race get arbitrated at the dst_hashed subvolume.

Change-Id: I140fc5b0176ee752ebef648c539b404653e91bdd
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
nfsrpc: Re-order NFS auth array contents

Some NFS client implementations can default to AUTH_NULL given a certain order
of auth_array in MOUNT reply. We re-order it here to make sure that such
clients (Example - 2.6.26), do not have such security loop holes.

Signed-off-by: Pavan T C <tcp@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3144 (permissions given in fuse mount don't have effect in nfs mount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3144
server: Reassociating 'old' conn can lead to chaos.

Since we moved to a single socket connection b/w client and server,
inherting connection state is unnecessary and can sometimes be
dangerous when clients reconnect even before the server detects
a socket error on the old connection.

Dirty detail: This reassociation results in 'ref count' not decreasing
in tandem with the connection disconnects. This results in a resource
leak.

Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3104 (Self-heal does not work in dis-rep!)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3104