cluster/afr: Print self-heal log when self-heal succeeds

Change-Id: I95e47e589419dc6a032cbd8ba01964b6c176c2d5
BUG: 927146
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5408
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
mgmt/glusterd: Fix a minor typo.

Thanks to Patrick Matthäi <pmatthaei@debian.org> for the patch.
Signed-off-by: Vijay Bellur <vbellur@redhat.com>

Change-Id: I59da74298894ccc2ab30967ffe44cc844aa73f82
BUG: 814534
Reviewed-on: http://review.gluster.org/5436
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
cluster/dht: Fix non-regular file ownership during rebalance

Currently non-regular files were created as root:root, and
their ownership never healed during rebalance process.

Also, in dht_linkfile_attr_heal, we have to heal the linkfiles
as default, as currently linkfiles are created as root:root.

That check existed, as earlier linkfiles were created as
frame->root->uid/gid

Change-Id: I6cd88361b81bdd500e15bc47b623f5db8eec88e9
BUG: 990154
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/5434
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
gfapi: fix glfs_readlink()

glfs_readlink() is supposed to memcpy the buffer pointer
returned by syncop_readlink(). Fix it.

Change-Id: I5936b07abbd93cf02b354233dc60f6623e30a38b
BUG: 953694
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5439
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
mount.glusterfs: remove use of LD_LIBRARY_PATH

BUG: 989858
Change-Id: Id7c3929a179e151b6d60d3382bd5310187bb2aa6
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/5423
Reviewed-by: Bala FA <barumuga@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
glusterd : initiating gsyncd restart during add-brick

During add-brick, when a new brick is added in one of the
nodes that was already a part of the existing volume, and
gsyncd was already running on that node, then all gsyncd
processes running on that node, for that particular master
and any slave sessions will be restarted

If a new brick is added in a new node, then after adding the
brick, the user has to perform the following steps:

1. gluster system:: execute gsec_create
2. gluster volume geo-replication <master-vol> <slave-vol> create push-pem force
3. gluster volume geo-replication <master-vol> <slave-vol> start force

Change-Id: I4b9633e176c80e4a7cf33f42ebfa47ab8fc283f1
BUG: 989532
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5416
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
glusterd : Checking session created or not in case of geo-rep stop

Performing statefile check in case of geo-rep stop, so as to provide
proper error message in case session is not created.

However in case of geo-rep stop force, we allow the command to succeed
even in case that the session is not created, because the stop command
is a failsafe command to stop running geo-rep sessions on any nodes.

Change-Id: I2b6a0253de977633606c422cbbc9e37cede9a268
BUG: 989541
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5417
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
cluster/dht: Re-initialize skipped file count in glusterd

Change-Id: I42d08b3a6a7a3839f5e9953e1f83959222c080f8
Signed-off-by: shishir gowda <sgowda@redhat.com>
BUG: 989846
Reviewed-on: http://review.gluster.org/5446
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
gfapi: perform open() on pre-existing inode in glfs_creat()

Performing syncop_create() on a pre-existing file can result
in opening the linkfile if DHT has a linkfile for the file.
This is because dht_create() will perform the op on the
hashed_subvol() and overwrite the layout in dht_create_cbk.

Change-Id: I7a0db56921ec9fc3e278e0418db3b967f81e5598
BUG: 990410
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5447
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
dht: make linkfile creation mode explicitly get set

Because of posix default_acl on parent directory, the mode
of linkfile can get masked with the mode in the default acl.

This breaks DHT integrity. So let the mode get explicitly reset
after mknod().

Change-Id: Ia7328e1ee7b4430bda308f9da293dba78405e081
BUG: 990410
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5440
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Fix broken parallel install

There is an automake bug when using _LTLIBRARIES, breaking parallel
`make install` (see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328)

Change-Id: I06aea1dc4c3e6cb0ae9aee5a04dd61881c8b6a7e
BUG: 981888
Signed-off-by: Tiziano Müller <tiziano.mueller@stepping-stone.ch>
Reviewed-on: http://review.gluster.org/5448
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Merge branch 'master' of github.com:gluster/glusterfs
build: Better configure control & messages for xml output

Users were not given a correct indication to whether xml output was
going to be built on running configure as the only information was lost
in the checks output. This would lead to conditions where the user would
assume gluster was compiled with xml output, when it wasn't the case.

With this change, a new line is added to the end of the configure output
which indicates if xml output is being built or not. Also, a new
configure flag, '--disable-xml-output', has been introduced which can be
used to explicitly disable xml outpu from being built.

Change-Id: Ie80ba0372b4c3967a836769c61b60263c8e5e350
BUG: 947226
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4793
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
nfs: Fix for NFS crash during blocking NLM call.

Bug 990887: During a blocking NLM call NFS server is crashing.

Cause: When nlm4_establish_callback function is called from nlm4svc_send_granted the cs->req->trans
pointer is NULL. Thus using this pointer will result in a crash. Whereas cs->trans points to a
valid transport object. NLM should use cs->trans instead of cs->req->trans.

Fix: Replaced cs->req->trans with cs->trans.

Change-Id: I425e48e0aafc9a6c130912edf2e801d8c4c9472d
BUG: 990887
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/5452
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
fuse-bridge: update to fuse protocol minor version 16 (Linux)

7.14
- Splice write support to fuse device node. No gluster changes
  required besides header update.

7.15
- Store/retrieve notification support. No gluster changes
  required besides header update.

7.16
- BATCH_FORGET request support. Implement a handler for
  BATCH_FORGET requests and update the header.
- Updated ioctl() ABI. No gluster changes required besides
  header update.

BUG: 990744
Change-Id: If3061a720ba566ee6731ad8b77cdc665d8fbf781
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5449
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
performance/io-threads: fix potential use after free crash

do_iot_schedule() enqueues the stub and kicks the worker thread.
The stub is eventually destroyed after it has been resumed and thus
unsafe to access after being enqueued.

Though likely difficult to reproduce in a real deployment, a crash
is reproducible by running a smallfile benchmark on a replica 2
volume on a single vm. Reorder the debug log message prior to the
do_iot_schedule() call to avoid the crash.

BUG: 989579
Change-Id: Ifc6502c02ae455c959a90ff1ca62a690e31ceafb
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/5418
Reviewed-by: Santosh Pradhan <spradhan@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
storage/posix: Enable Open-fd-count query in writev

Change-Id: I86bdf865730416150c10617dcbad5c037579acde
BUG: 910217
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5433
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
store: Add (un)locking functionality

Some configuration/cache files (like the NFS rmtab) can be stored on
a GlusterFS volume and be used by multiple storage servers. This
requires suitable locking for the gf_store_handle_t structure. Introduce
gf_store_lock() and gf_store_unlock() for this purpose. The
gf_store_locked_local() function can be used to check if the
gf_store_handle_t has been locked by the current process.

This change also includes an unrelated correction where a FILE* was
getting leaked. Krishnan Parthasarathi identified this while reviewing
the new locking functionality.

Change-Id: I431b7510801841d4bad64480b4bb99d87e2ad347
BUG: 904065
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4677
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
cluster/afr: Disable eager-lock if open-fd-count > 1

Lets say mount1 has eager-lock(full-lock) and after the eager-lock
is taken mount2 opened the same file, it won't be able to
perform any data operations until mount1 releases eager-lock.
To avoid such scenario do not enable eager-lock for transaction
if open-fd-count is > 1. Delaying of changelog piggybacking is
avoided in this situation.

Change-Id: I51b45d6a7c216a78860aff0265a0b8dabc6423a5
BUG: 910217
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5432
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: venkatesh somyajulu <vsomyaju@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>