xlator/lib: Drain out sent requests to avoid multiple STACK_UNWINDs

Change-Id: If28e4b6e157ac0cb9e1f325bbba39f6c3f1c2b45
BUG: 789078
Reviewed-on: http://review.gluster.com/2881
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
nlm: call nlm4_cancel_fd_resume instead of nlm4_unlock_fd_resume when CANCEL proc is called.

Change-Id: Id4c74165f24cccb46ca5de406dd7e47e4a8b99e1
BUG: 798222
Signed-off-by: krishna <ksriniva@redhat.com>
Reviewed-on: http://review.gluster.com/2877
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
nfs: fcntl lock self healing.

Change-Id: Ic3e00e8ea3b873acbc3abb5155aecdaac848a3e5
BUG: 795386
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/2884
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishna Srinivas <krishna@gluster.com>
protocol/client: Free readdirp xdr leak

Change-Id: I5e46deedd93e852a483693de42e4bec0082bc08b
BUG: 796186
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2886
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
cluster/distribute: send proper 'dict' in readdirp()

if we do the STACK_WIND from readdirp_cbk(), we were not sending
the right dictionary which made our linkfile determination a
failure.

Change-Id: Ie3f26748608f1a81123fe475d8a42bf2717475c3
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 799887
Reviewed-on: http://review.gluster.com/2869
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
protocol/client: Added lk_ctx info in fdctx dump

- Added a brief explanation as to why we can't use gf_log
  when in statedump.

- Removed gf_log messages from client_priv_dump since
  it can cause a 'deadlock' - See statedump.c for explanation

- Added try-lock based accessors for fd_lk_list for dump purposes.

Change-Id: I1d755a4ef2c568acf22fb8c4ab0a33a4f5fd07b4
BUG: 789858
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2882
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
libglusterfs/fd: fixed fd_anonymous() leak

fd was getting leaked whenever there was a overlapping operations,
which caused memory leak, and process fd leaks, which made most of
the operations on NFS mount of a replicate volume not work. With
the fix, things are back to normal.

Change-Id: I2d2158b2972ba5dae270d6ff7b1a827403653c04
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 787368
Reviewed-on: http://review.gluster.com/2892
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
cluster/distribute: fix log level of few messages

Change-Id: Ibdeeb705e75a94bb96a1ae259be32ddd2ca5fec8
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 797715
Reviewed-on: http://review.gluster.com/2885
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
glusterd: Append internal mount logs of clear-locks command to a single file

To ensure logs of all clear-locks commands executed from a
'peer' (glusterd) are in one place.

Change-Id: I9f531a1e24d4502769740010da73b3d4adb5c5c9
BUG: 799267
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2861
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
features/marker: GFID file handle based backend related fixes

* make sure loc->gfid is filled.

Change-Id: I5304e650d9fc181ee1f3b65be7f2ff3847d9722e
BUG: 790389
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/2888
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
glusterd/rebalance: Bring in support for parallel rebalance

This patch, enables rebalance processes to be started on all
nodes where the volume is spread across (1 process per node)

node-uuid xattr identifies which node takes ownership of the
task to migrate the file. The model employed is push (src pushes
to dst)

Change-Id: Ieacd46a6216cf6ded841bbaebd10cfaea51c16d6
BUG: 763844
Signed-off-by: shishirng <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/2873
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
cleanup and fix xattr namespace flip

- function of actual flipping made static
- clean out references to particular namespaces from flipping logic
- namespaces involved in flipping defined at single location
- fix fnmatch(3) invocation with reversed pattern and string arguments
- instead of "user", use "system" to flip from, because latter is
  free from supervision of the VFS layer (cf. attr(5))

Change-Id: I3cc5836fadcad5b237fd5c67d0dcaea63aee9164
BUG: 798716
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/2890
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
renaming hdfs -> glusterfs-hadoop

Change-Id: Ibb937af1231f6bbed9a2d4eaeabc6e9d4000887f
BUG: 797064
Signed-off-by: M S Vishwanath Bhat <vishwanath@gluster.com>
Reviewed-on: http://review.gluster.com/2811
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
xlator/lib: fix spurious STACK_UNWIND

Change-Id: If37eba97710fc79713f70c4117015d49f93ad137
BUG: 801285
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.com/2898
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
performance/io-cache: move mem-pool initialisation to init.

mem-pool is global structure which is stored in ioc-inode-table and hence
can be initialised in init.

Change-Id: I4bc88fe3e8c729312e41f62c98f665af5fb26a62
BUG: 765340
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/2895
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
performance/io-cache: pass appropriate op_errno even during successful
reads.

An op_errno equal to ENOENT with op_ret equal to zero is used by
storage/posix xlator to indicate EOF. NFS relies on this protocol
for correct functioning.

Change-Id: I136fbf429a829bd7bd75ce8ce236f9557a418a5d
BUG: 795789
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/2894
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
syncop: Make syntask scalable

At the moment, synctask uses task->frame to perform
all the syncops, this will lead to high-memory usage if the task
crawls millions of directories. i.e millions of STACK_WINDS/UNWINDS.
To prevent this, in each task a new stack is created to perform
the fops which is reset after every syncop.

Change-Id: I53c262ec348be9b1d91af73da01f1c217f31ce6e
BUG: 798907
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2850
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
cluster/dht: Replace ftruncate call with truncate in rebalance

ftruncate call seems to be broken as of now (marker).

Signed-off-by: shishir gowda <shishirng@gluster.com>
Change-Id: Ib49ced0471e1b8e9ee411eb5a9ff1b83c4d82bec
BUG: 801658
Reviewed-on: http://review.gluster.com/2905
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
nlm: support ipv4 only

Change-Id: I0d8381b7d4da0e961677cca63d6d2c82836c1632
BUG: 800735
Signed-off-by: krishna <ksriniva@redhat.com>
Reviewed-on: http://review.gluster.com/2909
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
nfs/server: allow deletion of files by default

this is needed for Micrsoft Windows-based Nfs clients
which do not ignore ACCESS3_DELETE permission not being
granted, while linux/unix systems ignore the same.
behaviour on linux/unix systems remains unchanged

Change-Id: I67f5f66a7486b93163aebedec5fbaa303173964e
BUG: 790781
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2875
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishna Srinivas <krishna@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>