libgfapi: Fixed few memory leaks in glfs_h_getxattr, glfs_h_setxattr calls.
          Also replaced the tabs with spaces in that entire file.

Change-Id: Iee6dc031d27fe8d26caf90736d4b2ac7bc8c5206
BUG: 1089414
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/7841
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
cluster/dht: Fix min-free-disk calculations when quota-deem-statfs is on

PROBLEM:

As part of file creation, DHT sends a statfs call to all of its
sub-volumes and expects in return the local space consumption and
availability on each one of them. This information is used by DHT to
ensure that atleast min-free-disk amount of space is left on each
sub-volume in the event that there ARE other sub-volumes with more
space available.
But when quota-deem-statfs is enabled, quota xlator on every brick
unwinds the statfs call with volume-wide consumption of disk space.
This leads to miscalculation in min-free-disk algo, thereby misleading
DHT at some point, into thinking all sub-volumes have equal available
space, in which case DHT keeps sending new file creates to subvol-0,
causing it to become 100% full at some point although there ARE other
subvols with ample space available.

FIX:

The fix is to make quota_statfs() behave as if quota xlator weren't
enabled, thereby making every brick return only its local consumption
and disk space availability.

Change-Id: I211371a1eddb220037bd36a128973938ea8124c2
BUG: 1099890
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7845
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
NetBSD qemu build fixes

Fix NetBSD build for glusterfs built in qmeu sources

BUG: 764655
Change-Id: I4428a88b1e0d7c5f6740022861ffe230dbbd84bd
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/7815
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
glusterd: Fetching the txn_id before performing glusterd_op_bricks_select in glusterd_brick_op()

In glusterd_brick_op(), the txn_id mut be fetched before
failing the transaction for any other reason. Moving
the fetching of txn_id to the beginning of the function.

Also initializing txn_id to priv->global_txn_id where it
wasn't initialized.

Change-Id: I44d7daa444f00a626f24670c92324725f6c5fb35
BUG: 1102656
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7926
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>