md-cache: fix dict memory leak in mdc_inode_xatt_update

We currently either dict_ref() or dict_copy() into mdc->xattr.
The double dict_ref() call path is obvious. Alternatively,
dict_copy() does not ref the dict in the situation where it
creates a new dict, but we only call dict_copy() in this
context when we already have a dict, which should mean the
extra ref is unnecessary.

BUG: 801582
Change-Id: I72e3f1a16f942f04752c033812d13d50ee7c2c2c
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3138
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
libglusterfs: loc_copy should set name only if src->name is set

Change-Id: If06d97dd1ff1293730e0cd4933f6ab3283f0475e
BUG: 788051
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3137
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
storage/posix: Handle gfid-less lookup

Change-Id: I4605dbb1dd8bf8e26de7f253e54a7f4840c8a8be
BUG: 795355
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3128
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/afr: Perform gfid-less lookup in afr

Change-Id: I78d9f0563e25047f392675ae32db38d2c94f6651
BUG: 795355
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3129
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
glusterd/rebalance: Provide option start rebalance with valgrind

Change-Id: Ia7a836425f5dbfe07b2e46563e49aaeaaaaa4e14
BUG: 810836
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3108
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
features/quota: don't adjust statfs buffer if size used is already
greater than available limit.

members f_bfree and f_bavail of struct statfs are unsigned types.
A negative value assigned to them is interpreted as some positive
number and resulting in incorrect output of df output.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Change-Id: I4d3d38b9bb6f675958ee38ad4d6c71ebcf4bb9a1
BUG: 773530
Reviewed-on: http://review.gluster.com/3102
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
glusterd: Removed 'unprotected' concurrent access of priv->volumes on glusterd restart

This must have been removed as part of
afe542eca18888463798747d2a95e5a9d239a4a0 (reverting to non-synctask behaviour).

Change-Id: Ic23c8bbf8f90f4c9af6e68349de63e22d7f25606
BUG: 810829
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3109
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
glusterd: Added volume-id to 'op' dictionary

Volume-id passed in op dictionary would help detect possible split brains
among peers in a cluster. The idea is to check if the volume's id and
the vol-id that was passed are equal.
ie, same volume name, but different volume id indicate that glusterd
'metadata' of one of the participating peers is stale or there is
a split brain.

This is over and above the existing checksum based validation of peer
supplied cluster 'metadata' (ie, volume info file).

Change-Id: I1049ef249e417e540ccb4243e450f92fcd0f46f9
BUG: 797734
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3083
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
mount.glusterfs: multiple fixes

* noticed that the regex to parse the options were not fool proof.
  for example, 'ro' in a logfilename could have made the mount
  point read-only. Now fixed.

* this issue existed for 'acl', 'worm' options.

* log-server/log-server-port options were legacy, and no more
  needed in codebase.

* refactored option processing in general to avoid above issues

Change-Id: I172d24c86ece9a34420ba997fa385e304b4924ae
BUG: 806978
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3058
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
glusterd/rebalance: re-establish conn between rebalance process

Signed-off-by: shishir gowda <shishirng@gluster.com>
Change-Id: Ib13b4b9beebf18632027e4dd7c68f627c311781c
BUG: 810688
Reviewed-on: http://review.gluster.com/3110
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
geo-rep / gsyncd: log sync failures as warnings

Syncing of certain files can fail naturally if changes happen on
master (eg. file gets deleted). Therefore logging an error is
misleading.

Change-Id: I7b54904e5ec7c85e4e0fa1e330123d2c44c78ac5
BUG: 764510
Reported-by: Vijaykumar Koppad <vkoppad@redhat.com>
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/3113
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijaykumar <vkoppad@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
glusterd/remove-brick: Remove support for pause option

Decommissioning through rebalance has no pause option.

Change-Id: I90f165cdb2eccfaefc99365ae4b48d81320fb753
BUG: 811459
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3123
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
dht/rebalance: Handle ASSERT_ON_CHILD_DOWN gracefully

In rebalance process, instead of terminating, send a stop
event. The migration in question will either complete or
be handled as error.
Also, handle few syncop calls as errors, instead of just
logging them.

Change-Id: If6ed54474cb0f1fe0e28a5765e6d90966740dfde
BUG: 811444
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3120
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
glusterd/remove-brick: Replace ABORT with STOP

Remove-brick stop now invokes rebalance stop. This leads
to a graceful stop of decommissioning.
The volfile is also updated (removal of decommission)

Change-Id: I5a8f725c0f54439b810ce32d988c21c02229c703
BUG: 811513
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3126
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
dht/rebalance: Display migration failure count

Change-Id: Ib2f8be2c98eae1b4df5d2090c1f1eec8ab264a35
BUG: 811923
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3135
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
xlator/server,xlator/nfs : Fix authentication for address lists

Fixes authentication problems when address lists are given for
auth.{allow,reject} and nfs.rpc-auth-{allow,reject}.

Change-Id: I9959ebfa6820aef52c883372e1085660560e1e73
BUG: 810179
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3104
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
server: Modified logging information to ease log based analysis

Change-Id: I1bde6505346b5dda37cf88c66f9af8ff48668ed9
BUG: 811864
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3133
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
glusterd: IPv4 auth improvment

Check if last character of an IPv4 address is valid to prevent successful
validation of addresses with '.' as last character.

Change-Id: I0af6c288e12a47986ce3f8b02c317b99767e69e6
BUG: 811458
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3124
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Fix dangling references to examples.

Change-Id: Ic90f332fb6554173a03f7a026fc3677e7cf42eae
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3139
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
libglusterfs: Syncop procs should not exceed SYNCENV_PROC_MAX

Change-Id: I0eb2adac06eae31939c8ed6b544b4be43d1a5885
BUG: 810109
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3146
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>