cluster/afr:  Change errno to op_errno

Changed errno to op_errno

Change-Id: I357987af352cf1d9abda4188d392f17d10b12aec
BUG: 1037501
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/6541
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
crypt: On calloc failure follow goto statement

At
--------------------------------------------
1423	if (local->vec.iov_base == NULL) {
--------------------------------------------

This condition being true leads to NULL pointer
to be passed into `memcpy` later at

----------------------------------------------------
1432	memcpy((char *)local->vec.iov_base + copied,
----------------------------------------------------

Avoid this by clean exit through a goto statement with
in the conditional.

Change-Id: I95260767f96107aa96191b18db10908ddda82ee6
BUG: 1030058
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6617
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
bd: Check for capabilities for creating thin lv

Check capabitlies of the volume before trying to create thin LV.

BUG: 1028672

Change-Id: Ie4e2281265e193458ccd16736960daf69d3e1b29
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/6590
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Updating extras/Ubuntu with latest upstart configs (BUG: 1047007)

Change-Id: Ia769589f6af1d7ca3577185fd4c56eb9f43b3e2e
BUG: 1047007
Signed-off-by: Louis Zuckerman <me@louiszuckerman.com>
Reviewed-on: http://review.gluster.org/6611
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6621
mount/fuse: Remove duplicate GET_STATE call

BUG: 952029
Change-Id: I4aa87ffe70f2b56182666981956d7d1d62048e2f
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6580
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Use linkat() instead of link() for portability sake

This is a backport of Iccd27ac076b7a74e40dcbaa1c4762fd3ad59da5f

POSIX does not says wether link(2) on symlink should link on
symlink itself or on target. Linux use symlink, most other
systems use target. Using linkat(2) allows the behavior to be
specified, so that the behavior is portable.

Also fix configure test for NetBSD linkata(2), which ceased to work.

BUG: 764655
Change-Id: I7cf9e62ea19c7eb356935c11b480cf637c83126b
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6594
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Use linkat() instead of link() for portability sake

This is a backport of Iccd27ac076b7a74e40dcbaa1c4762fd3ad59da5f

POSIX does not says wether link(2) on symlink should link on
symlink itself or on target. Linux use symlink, most other
systems use target. Using linkat(2) allows the behavior to be
specified, so that the behavior is portable.

Also fix configure test for NetBSD linkat(2), which ceased to work.

BUG: 764655
Change-Id: Ifcabda5e81b15cd80982bcfc05afda4c9e5370ef
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6612
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
glusterd: Save/restore/sync rebalance dict

A dictionary was added to store additional information of a rebalance
process, like the bricks being removed in case of a rebalance started
by remove-brick. This dictionary wasn't being stored/restored or synced
during volume sync, leading to errors like a volume status command
failing. These issues have been fixed in this patch. The rebalance dict
is now stored/restored and also exported/imported during volume sync.

Also, this makes sure that the rebalance dict is only create on
remove-brick start. This adds a bricks decommissioned status to the
information imported/exported during volume sync.

BUG: 1040809
Change-Id: I46cee3e4e34a1f3266a20aac43368854594f01bc
Signed-off-by: Kaushal M <kaushal@redhat.com>
Backport-of: http://review.gluster.org/6492
Reviewed-on: http://review.gluster.org/6524
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>