mount/fuse: initialize entry and negative timeouts correctly.

There was a typo which resulted in updation of attribute_timeout
for both options.

Change-Id: I6e212eaf3570cadde88d2a2c3b44121c893c9427
BUG: 804592
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/3763
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
event-history: implement gf_log_eh for saving events

Change-Id: I2ddf4e7849bda91bb99423e27082c2bae6800a70
BUG: 795419
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3532
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
performance/read-ahead: use pthread_mutex_trylock to hold mutex in statedumps

Change-Id: I4491c96fc7d9879ba9040dcda3700c81d99ba184
BUG: 843796
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3766
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
core: remove libglusterfs/src/scheduler.[ch]

* as its not part of the build
* confuses with some TAGS and 'git greps'

Change-Id: I1f97307a8ce486ba56a4a3ad0151276b0a72e096
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 764890
Reviewed-on: http://review.gluster.com/3769
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
supportability: print all missing frames

earlier, the statedump and backtrace were printing frames only if
it matched type GF_FOPs or GF_MGMTs (GF_MGMT is not in use now).
This made all the frames from glusterd, or any other frames which
got created outside the scope of 'fops' not getting printed.

now, made two classifications, one as FOPs (which gets logged
with the proper name), and another set is !FOPs (ie, else part),
which gets logged with only the op number.

Change-Id: Ifa18cdb75f7afefe6bb489d319b589cda8e64c1d
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 845114
Reviewed-on: http://review.gluster.com/3768
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
cli: more clear separation of error messages

the intention is to make CLI output more script friendly.
use ':' as field separator per command and each field should
be meaningful.

this is phase-1 of the change, and hence RFC, once I get review
comments, will be doing more changes, if required

Change-Id: I11e70084f78a197ac50f9401dd7af312e63647ef
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 815194
Reviewed-on: http://review.gluster.com/3753
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
mem-pool: remove 'if' by asserting condition directly.

before:

if (!condition) {
    GF_ASSERT (0);
}

after:

GF_ASSERT (condition);

BUG: 764890
Change-Id: I9894fcc609579f5efd3f98dbff41ca1487ce6dd2
Signed-off-by: Jules Wang <lancelotds@163.com>
Reviewed-on: http://review.gluster.com/3762
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/afr: Handle child_up & fd not opened case in xaction

RCA:
When an fd is opened while a brick is down, after the brick
comes back up afr issues open on the other brick. It can
fail for a number of reasons (enoent etc). While the system
is in that state, inode/entrylks pre-op happen only on the
brick that is up and fd is opened for fd-fops. post-op should
consider only the bricks where both pre-op and fop succeeded
as success, rest of them as failures. Code now marks only the
children that are down as failures as opposed to child_down &
fd-not-opened. This makes change-log appear as success on the
subvolume where we did not do any fop leading to no change-log
but differences in data/metadata for reg-files.

Fix:
Mark non-participants of fop as failure. This is tracked in
transaction.pre_op[].

Tests:
Simulated the scenario using err-gen on top of one of the client
xlator which fails all fops always. Performed fops and the changelog
represented pending fops on the brick with err-gen loaded. Tested
the case of brick down and perform entry/metadata/data operations
to confirm they still work as expected.

Change-Id: I41905936126b19abba56ca581c0301a894507e1a
BUG: 844987
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3765
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
rpc-lib: fix rpc_clnt_reconfig log on remote_host change

Change-Id: I5446d7fb975d4fb8105264e026fef165ae73a925
BUG: 764890
Signed-off-by: yinyin <maillistofyinyin@gmail.com>
Reviewed-on: http://review.gluster.com/3773
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
protocol/server: use pthread_mutex_trylock while dumping statedumps

Change-Id: Iec6f539ee7d36c25aca3960abc6d2611707617c8
BUG: 843821
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3774
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
performance/write-behind: maintain a per-inode request queue instead of maintaining per-fd

path based operations like stat etc, whose results will be affected by
writes have to be ordered with writes. With request queues maintained
in inode this can be done naturally, than when they are maintained per
open fd.

Change-Id: Ibdde3b81366f642d07531632fc9062cb44fad2e7
BUG: 765443
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/712
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/afr: Unwind with correct pre/post parent bufs

RCA:
In case of dir fops create, mknod, mkdir, link, symlink, rename
if the fop fails on read-child then unwinds are happening with
all-zero pre/post iatt-bufs. The bug occurs because the parent
bufs are not saved if the response is not from read-child.

Fix:
Save the pre/post-bufs for the first response. If the response
comes from read-child, overwrite whatever we have cached.

Tests:
Attached the mount process to gdb.
Tested that the unwinds happen with proper pre/post iatt bufs in
the following cases:
1) All success case
2) Failure on read-child
3) Failure on non-read-child
4) Failure on all children.

Tested soft-link self-heal to test the change made in that.
Tested errno ENOTEMPTY for rmdir, rename fops.

Change-Id: I82882423d2d766b4f4a3044203bcb5dbcaee1755
BUG: 845242
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3775
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
glusterd: Fix glusterd crash resulting from uninitialised pointer

PROBLEM:
glusterd crashes during replace-brick operation as the
pointer old_brickinfo is dereferenced without being initialised.

FIX:
Have old_brickinfo initialised to point to the brick info of
the brick being replaced before dereferencing it.

TEST:
Ran glusterd in debug mode before and after the fix;
process crash ceased in the latter case.

Change-Id: I53f21b5424f534bbdba3b3fc407d4501a2c0052f
BUG: 844332
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.com/3777
Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
gfapi: missed setting port option

Change-Id: I72790de10cefaae3d3307b6fbb9899907b019ccc
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3733
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Bharata B Rao <bharata.rao@gmail.com>
gfapi: set errno in glfs_init()

save errno from glfs_init_done and set it in glfs_init_wait()

Change-Id: I1a2f43a7e7b0f07f279c175df987ff94d642b629
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3771
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
gfapi: let glfs_init() return on non-RPC errors

Change-Id: Ic3a15044434926127b8de273b1033b8ad452290c
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3732
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
glfsxmp extension

Change-Id: I3859621637025e464bc83d748bae7dff9808643f
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3735
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
performance/quick-read: use pthread_mutex_trylock to hold mutex in statedumps

Do not use pthread_mutex_lock and gf_log functions while dumping information
to statedump, to avoid deadlocks.

Change-Id: I0d30b04ae322f131b7a42d277ebd4385e83769e6
BUG: 843789
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3764
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
glusterd: Made volume set help/help-xml a non-cluster operation.

- Retained apparent redundant checks in stage, commit phase of set
  volume for the help options for backward compatibility

Change-Id: Iaefe3805d6b5eeeced2e7e4870830edf3e61dc87
BUG: 844696
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.com/3761
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
performance/io-cache: use pthread_mutex_trylock to hold mutex in statedumps

Do not use pthread_mutex_lock and gf_log functions while dumping information
to statedump, to avoid deadlocks.

Change-Id: I2bb4592126c5d1eacf614130815a839c4a90c59a
BUG: 843787
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3758
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>