cluster/afr: remove unused variable

Fix a compiler warning about unused variable. Missed to catch this in
http://review.gluster.org/7723

Change-Id: Iac97051edb97bdd7dbc5f0fd0f2528d4d404d16d
BUG: 1096040
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/7765
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
doc: afr-statistics command  documentation

BUG: 1086748
Change-Id: I67ca9958e4e369b5902fc32d8d9863073da76c77
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/7792
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
doc: zerofill api documentation

Change-Id: I437735d68fdcc4a55f12fd51b1d40cd7a32ad783
BUG: 1086756
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/7800
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7822
Tested-by: Niels de Vos <ndevos@redhat.com>
doc:  Add block device xlator details

> Change-Id: I4c24a7f0a4339364a80e5d1be0fc8de6b9c189c1
> BUG: 1086762
> Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
> Reviewed-on: http://review.gluster.org/7809
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
> Tested-by: Vijay Bellur <vbellur@redhat.com>
(cherry picked from commit 99afc640f27841ec819c0f32c01f567fd0b345f8)
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>

Change-Id: I4ccbc234d0c88674e855d91529e286b24f1bed84
BUG: 1086762
Reviewed-on: http://review.gluster.org/7832
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
libgfapi: Added Handle-based ops to get/set/remove extended attributes in the libgfapi.

Cherry picked from commit Change-Id: I1a8e666018d7b93e0bba2d9882935681da909980
and Change-Id: I62f63da37edf722d6d79c75f72ee7403e93e4936

> BUG: 1089414
> Signed-off-by: Soumya Koduri <skoduri@redhat.com>
> Reviewed-on: http://review.gluster.org/7308
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
> Tested-by: Vijay Bellur <vbellur@redhat.com>

This patch differs a bit from its earlier master patch -
* 'DECODE_SYNCOP_ERR' macro is not defined in this code branch.
So lines where this macro is used are skipped.
* 'syncop_removexattr(..)' definition differs from the one in the master branch.

BUG: 1099878
Change-Id: I1e9cce4efeec038b9736065d39887c35752caead
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/7825
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
rpc: warn and truncate grouplist if RPC/AUTH can not hold everything

The GlusterFS protocol currently uses AUTH_GLUSTERFS_V2 in the RPC/AUTH
header. This header contains the uid, gid and auxiliary groups of the
user/process that accesses the Gluster Volume.

The AUTH_GLUSTERFS_V2 structure allows up to 65535 auxiliary groups to
be passed on. Unfortunately, the RPC/AUTH header is limited to 400 bytes
by the RPC specification: http://tools.ietf.org/html/rfc5531#section-8.2

In order to not cause complete failures on the client-side when trying
to encode a AUTH_GLUSTERFS_V2 that would result in more than 400 bytes,
we can calculate the expected size of the other elements:

    1 | pid
    1 | uid
    1 | gid
    1 | groups_len
   XX | groups_val (GF_MAX_AUX_GROUPS=65535)
    1 | lk_owner_len
   YY | lk_owner_val (GF_MAX_LOCK_OWNER_LEN=1024)
  ----+-------------------------------------------
    5 | total xdr-units

  one XDR-unit is defined as BYTES_PER_XDR_UNIT = 4 bytes
  MAX_AUTH_BYTES = 400 is the maximum, this is 100 xdr-units.
  XX + YY can be 95 to fill the 100 xdr-units.

  Note that the on-wire protocol has tighter requirements than the
  internal structures. It is possible for xlators to use more groups and
  a bigger lk_owner than that can be sent by a GlusterFS-client.

This change prevents overflows when allocating the RPC/AUTH header. Two
new macros are introduced to calculate the number of groups that fit in
the RPC/AUTH header, when taking the size of the lk_owner in account. In
case the list of groups exceeds the maximum possible, only the first
groups are passed over the RPC/GlusterFS protocol to the bricks.
A warning is added to the logs, so that most system administrators will
get informed.

The reducing of the number of groups is not a new inventions. The
RPC/AUTH header (AUTH_SYS or AUTH_UNIX) that NFS uses has a limit of 16
groups. Most, if not all, NFS-clients will reduce any bigger number of
groups to 16. (nfs.server-aux-gids can be used to workaround the limit
of 16 groups, but the Gluster NFS-server will be limited to a maximum of
93 groups, or fewer in case the lk_owner structure contains more items.)

Cherry picked from commit 8235de189845986a535d676b1fd2c894b9c02e52:
> BUG: 1053579
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/7202
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
> Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Change-Id: I8410e59d0fd246d601b54b961d3ae9cb5a858c10
BUG: 1096425
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7829
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
rpc: implement server.manage-gids for group resolving on the bricks

The new volume option 'server.manage-gids' can be enabled in
environments where a user belongs to more than the current absolute
maximum of 93 groups. This option triggers the following behavior:

1. The AUTH_GLUSTERFS structure sent by GlusterFS clients (fuse, nfs or
   libgfapi) will contain only one (1) auxiliary group, instead of
   a full list. This reduces network usage and prevents problems in
   encoding the AUTH_GLUSTERFS structure which should fit in 400 bytes.
2. The single group in the RPC Calls received by the server is replaced
   by resolving the groups server-side. Permission checks and similar in
   lower xlators are applied against the full list of groups where the
   user belongs to, and not the single auxiliary group that the client
   sent.

Cherry picked from commit 2fd499d148fc8865c77de8b2c73fe0b7e1737882:
> BUG: 1053579
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/7501
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
> Reviewed-by: Anand Avati <avati@redhat.com>

Change-Id: I9e540de13e3022f8b63ff893ecba511129a47b91
BUG: 1096425
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7830
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
doc: changelog consumer library

Change-Id: I1e641e1a61b78c84ed610a56eabdad1075865cd3
BUG: 1086758
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/7856
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7863
tests/rpm: always run ./autogen.sh to create missing files

In some occasions 'install-sh' seems to be missing in the 'make dist'
tarball when ./autogen.sh has not been run (skipped when 'configure'
exists). With this changes, 'autogen.sh' is always run so that missing
files should get added to the tarball.

Also write the logs from mock to a known location, and copy them to the
'/var/log/' directory that Jenkins archives after a regression test
failure. This makes it easier to find build issues that mock detects.

Cherry picked from commit 79de5b63775f1ab8e2e498fd51b55509a30cd896:
> Change-Id: I8d0cf1afef61ebab0137aa0d20521e75a35ddbdd
> BUG: 1038391
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/7786
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
> Reviewed-by: Anand Avati <avati@redhat.com>

Change-Id: I8d0cf1afef61ebab0137aa0d20521e75a35ddbdd
BUG: 1089054
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7850
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
doc: distributed geo-replication

Change-Id: Id89089aa52066634e8a6428c2bf00ea4f30f1943
BUG: 1086758
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/7864
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
logging: remove unused message-id scripts

The current unused implementation for message-ids in the logs depends on
automatically generated files. The generated files are not included in
the distributed tarball. This causes issues when distributions build
packages, they need to re-run ./autogen.sh to create the needed files.

I thought of including the generated files in the distribution tarball.
However, the contents of these files are not actively used, so it seems
to make more sense to drop it all together. These functions were the
only users of libintl and gettext too, so dropped the requirement
checking from configure.ac.

A replacement for the message-id logging framework is in progress. Any
changes that this patch makes, can be reverted in the submission of
patches for the new framework.

Cherry picked from commit cec37c9b66b8711b213f114875d215f56b8120aa:
> Reference: http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6212
> Change-Id: Iea82dd3910944a5c6be3ee393806eccabd575e11
> BUG: 1038391
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/7714
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Change-Id: Iea82dd3910944a5c6be3ee393806eccabd575e11
BUG: 1089054
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7851
Tested-by: Gluster Build System <jenkins@build.gluster.com>
doc:Adding documentation for glusterfs and ovirt integration

Change-Id: Ie3b42a74198150c7e353d360ad38ac127d1a5ca2 
BUG: 1086782
> Signed-off-by: Kasturi Narra <knarra@redhat.com>
> Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
> Reviewed-on: http://review.gluster.org/7772
> Reviewed-by: Sahina Bose <sabose@redhat.com>
> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Reviewed-by: Shubhendu Tripathi <shtripat@redhat.com>
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
> Tested-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Change-Id: Ie3b42a74198150c7e353d360ad38ac127d1a5ca2
Reviewed-on: http://review.gluster.org/7891
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
transport/rdma: Add rdma connection manager documentation

Change-Id: I15ad9cafbe607074ddb9b36f9e879c8421f6eae2
BUG: 1086743
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/7900
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
doc: quota-scalability documentation

Change-Id: Ia6516293a7d6dc2643bb05767875b0cb651a65ef
BUG: 1086754
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/7882
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7907
Reviewed-by: Niels de Vos <ndevos@redhat.com>
feature/gfid-access: Adding documentation

Adding documentation to feature 'gfid-access' translator.

Change-Id: Ib70c0957ea22580cef2c7219a31dd9df33e9cd37
BUG: 1086751
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/7861
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
doc: Add details on qemu glusterfs integration

Change-Id: Ib3cd71f278c29483a467ee5afdd1aeb9e5f54547
BUG: 1086783
>Signed-off-by: Bharata B Rao <bharata.rao@gmail.com>
>Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
>Signed-off-by: Satheesaran S <satheesaran@gmail.com>
>Reviewed-on: http://review.gluster.org/7834
>Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
>Reviewed-by: Niels de Vos <ndevos@redhat.com>
>Tested-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/7908
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
doc: update details about posix acl on nfs mount

Change-Id: I591f2393a11893c77990a5b994196cb0a01358aa
BUG: 1086774
> Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
> Reviewed-on: http://review.gluster.org/7871
> Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
> Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
> Tested-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/7909
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
doc: fix brick port ranges in admin guide.

Change-Id: Ie6ac43ea435b7b21ac2b7975cbfe38126b170100
BUG: 1095595
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/7855
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7910
doc: add readdir-ahead documentation

Change-Id: Ib6fc3c9b59b498bfe3fb3dfc23dca874bdc0d21d
BUG: 1086755
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/7904
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
doc/rdmacm: fix formatting errors.

BUG: 1086743
Change-Id: I24798ef1e359dc2508d495e244151e93537b52a4
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/7915
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>