gsyncd / geo-rep: Fix sendmark() invocation for Normal Mixin

Change-Id: I0ae81ab01418becba83e401ec36c6db5323945e8
BUG: 842330
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.com/3725
Tested-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
features/index: Fix race in this->private initialization

RCA:
In index_worker function at the time of assigning priv from
this->private, this->private may not be set in init() function
of index xlator.

Fix:
Set this->private before creating the thread.

Additional Changes:
Added code to handle error path completely.

Test cases:
Attached the process to gdb and simulated failures.
executed fini in gdb using call fini(this) after init
was successful.

Change-Id: I1874a30d009a35352173b827574cf83daf431453
BUG: 843071
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3728
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
cluster/distribute: Suppress user xattr mismatch log message

Changing the log-level to DEBUG.
Xattr mismatch can occur when parallel setxattr's race, or when
one of the bricks was down. A subsequent setxattr will fix the
condition when all the subvols are up. In this case, the 'user.swift'
xattr used by ufo was out of sync, but did not cause any other error.

Change-Id: I6fdff78869b8ff72c305bbe122033e6c1d9d3cff
BUG: 838197
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.com/3722
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
features/index: make pthread_attr_t local to init()

RC & FIX:
No need to carry around pthread_attr_t in index_priv.
So made it local to init()

Tests:
stepped through init() in gdb, it succeeded.

Change-Id: I0525ac0676f9a329fccb0fd064933594ec117261
BUG: 843071
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3729
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/stripe: don't fail if no fctx on a non-regular file

cluster/stripe broke directory rename. Only check for fctx on regular
files.

BUG: 842652
Change-Id: I8a1e7ff30d57c994082cb10471f610023713ee53
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3720
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/afr: Perform data self-heal for non regular files

RCA:
Data self-heal for non regular files open the files
and then proceeds using that fd. This approach
does not work for symlinks because open on symlink opens
the file resolved by it.

Fix:
If the file is not a regular file then perform self-heal using
loc. It needs to get 'big' lock and then perform lookup to get
changelog then erase data part of chagelog, then unlock.

Test cases:
Automated at
https://github.com/pranithk/gluster-tests/blob/master/afr/special-file-self-heal-test.sh

Change-Id: I924a922f5135872efe2cccf2e712ada082c5689f
BUG: 811317
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3724
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster: fix crash on link of named pipe in stripe/replicate vol

A crash occurs when attempting to link a named pipe on a striped,
replicated volume. The cause for this crash is attempting to deref
a NULL inode pointer in stripe_link_cbk(). The RCA for this bug
uncovered a couple of problems:

- AFR ignores the inode pointer it receives on failure (returning
  NULL).
- stripe assumes the inode pointer is valid on failure.

Either one of these changes addresses the crash, but this patch
includes both changes. AFR is modified to pass along the inode
pointer it receives (which could still be NULL). stripe is
modified to not assume the inode pointer is valid on fop failure.

BUG: 842825
Change-Id: I9cb2cc918552620929c3ecbd69bc66d4635eafdc
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3727
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
performance/write-behind: preserve lk-owner while syncing writes.

  - This patch also makes syncing of non-overlapping but consecutive
    writes parallel. Till now only contiguous writes were synced
    parallely.

Change-Id: Icf0d5ea373f30c79fcdc90ba44b7e7a1bc5f0111
BUG: 765141
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/269
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
performance/write-behind: detect short writes and pend an EIO error

Write-behind returns write requests immediately and queues the request
in memory for merging, etc. If a write is incomplete, pend an EIO
error for the next fop. This ensures that write failures are not
silent and potentially ignored.

BUG: 809975
Change-Id: I0e0e6c8e710efab58ccfaf746501d00e459eb7ef
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3712
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/afr: Filter O_TRUNC in afr-fix-open

RCA:
When open was done while a brick is down, afr opens the file after
the brick comes backup. If this happens after the self-heal on the file
is completed by self-heald etc, the file will end up in truncated state.

Fix:
Filter O_TRUNC while afr-fix-open because afr_open turns O_TRUNC
into truncate transaction, so there will be pending changelog for
the subvolume on which open fails.

Testing:
Had to simulate the race by stopping fix-open until self-heald completes
self-heal on the file after brick online.

Change-Id: I32759cc37f4bb34f206d01606a279f17b246dba4
BUG: 841840
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3705
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>