NetBSD missing loff_t portability fix

define loff_t as off_t, is is already long long anyway.

BUG: 764655
Change-Id: I99edda9b804475a8696c2d32ccf8eae152851e21
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6286
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Have #include <signal.h> for kill(2)

BUG: 764655
Change-Id: I4d18c9a6c00cb4696645fcb437398562f00b9d24
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6284
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Fixes for ZF reported by coverity

BUG: 1028673
Change-Id: I7c75738cca22c81c5629d579ef5bea24000e622e
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/6291
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
BD fixes for coverity scan

BUG: 1028672
Change-Id: I2e7889fb113cedd2d5928b210149d3fd7b8b22ab
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/6292
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Fix xml compilation error

Compiling GlusterFS without xml package results in following build error

cli-rpc-ops.o: In function `gf_cli_status_cbk':
/home/mohan/Work/glusterfs/cli/src/cli-rpc-ops.c:6430: undefined
reference to `cli_xml_output_vol_status_tasks_detail'

Change-Id: I49b3c46ac3340c40e372bef4690cedb41df20e8a
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/6295
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
autogen.sh portability fixes

- Do not assume tar has --version, as BSD tar does not
- Allow specifying python binary through PYTHONBIN in case it is e.g. python2.7

BUG: 764655
Change-Id: I71f0f4830e10915782775de811c92db8e6ab4c55
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6281
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Search gettext() in -lintl

If gettext() is not found in libc, look it up in libintl (this is where
NetBSD has it)

BUG: 764655
Change-Id: Ifba8681b8603ead5d0b8587b71457250982077e1
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6287
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
NetBSD missing backtrace(3) portability fix

Implement backtrace(3) and backtrace_symbols(3) which do not exist in NetBSD
While there, remove duplicate #include <stdio.h>

BUG: 764655
Change-Id: Iccd695765906e085c3f8fcb670506d4fea68fa39
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6285
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Python build flag detection

Ask python-config for proper python build flags

BUG: 764655
Change-Id: I7aede0f93637c61dbafc43580bff46af60f0f0d3
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6283
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Do not build fallocate FUSE FOP if the system call does not exist

BUG: 764655
Change-Id: Ica310e75bee16741b837e658981238c1b99c254f
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6288
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
mgmt/glusterd: fix undefined sybmol error related to BD

Change-Id: I2210f1ac7de04c6025c0ec02d998b626d41466ae
BUG: 1028672
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6303
Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
cli: List only nodes which have rebalance started in rebalance status

Listing the nodes on which rebalance hasn't been started is just giving
out extraneous information.

Also, refactor the rebalance status printing code into a single function
and use it for both rebalance and remove-brick status.

BUG: 1031887
Change-Id: I47bd561347dfd6ef76c52a1587916d6a71eac369
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/6300
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
glusterd: Start rebalance only where required

Gluster was starting rebalance processes on peers where it wasn't
required in two cases.
- For a normal rebalance command on a volume, rebalance processes were
  started on all peers instead of just the peers which contain bricks of
  the volume
- For rebalance process being restarted by a volume sync, caused by a
  new peer being probed or a peer restarting, rebalance processes were
  started on all peers, for both a normal rebalance and for remove-brick
  needing rebalance.

This patch adds a new check before starting rebalance process in the
above two cases.
- For rebalance process required by a rebalance command, each peer will
  check if it contains atleast one brick of the volume
- For rebalance process required by a remove-brick command, each peer
  will check if it contains atleast one of the bricks being removed

Change-Id: I512da16994f0d5482889c3a009c46dc20a8a15bb
BUG: 1031887
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/6301
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
gNFS: Coverity fix for CID 1128906

Fix the Coverity issue introduced in RFE: NFS volume set/reset
commit i.e.  http://review.gluster.org/6236

Change-Id: I817b9da03a3ce7f5511303faea0c50dfdad60ff4
BUG: 1027409
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/6307
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
mount/fuse: handle --gid-timeout=0 properly

Fix the bug which was using the timeout value as a flag to indicate
if it was set (and hence would fail when timeout=0 would evaluate
as False)

Change-Id: Ie9a8f28d35603458cdac26c9a4e0343e7eda7344
BUG: 1032438
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6308
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
bd: Add Zerofill FOP support

BUG: 1028673
Change-Id: I9ba8e3e6cf2f888640b4d2a2eb934a27ff903c42
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/6290
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Build storage/posix xlator if fallocate() does not exists

If fallocate() does not exists, just return EOPNOTSUPP

BUG: 764655
Change-Id: I808114f733c88985519dc47fb7537e1ced1db077
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6289
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
libglusterfs: use correct check for linux falloc.h availability

We should check for HAVE_LINUX_FALLOC_H rather than HAVE_FALLOC_H
to determine whether to include linux/falloc.h.

Change-Id: I05eca4de2893a88d6b9cc5ebfce738708b9960d4
BUG: 1032378
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/6314
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
Add description for git based installations.

Change-Id: I60e445539f255b3220f885bd790f800e4c1ea55a
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6333
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Lalatendu Mohanty <lmohanty@redhat.com>
cli: fix possible memory leaks

BUG: 955548
Change-Id: Iae410712e7e6d7a76cd537c77f1919e3b4cdf6bb
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/6328
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>