556 Commits

Author SHA1 Message Date
Amar Tumballi
ea08bf8867 core: remove unused code
BUG: 764890
Change-Id: Ia8bcaa7a4daeb706bcb0bba24b2e634e9ca20d49
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/3657
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-11 16:29:58 -07:00
Amar Tumballi
cb60a046bb xlators/protocol: better filename
3_1 name was used for very first version of GlusterFS which
used RPC for its protocol, even though we changed protocol
after 3.1.x, we kept the name of few files as is. Changed
the file names to something better.

Change-Id: I297f1979e7c7e909e60674eec2e632506bc776f5
BUG: 764890
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/3628
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-04 11:56:59 -07:00
Pranith Kumar K
79aa6092a2 protocol/client: Re-open should not have O_CREAT|O_TRUNC|O_EXCL
RCA
The bug is observed in 3.2.x because posix xlator changes
the uid/gid of file as per frame->root-uid/gid if O_CREAT flag
is set in open fop. Posix does not do this in 3.3.x so that
bug does not appear anymore but this issue exposed the actual
bug in client xlator re-open. Re-open of a file on re-connection
should not perform re-open with the same flags at the time of
open/create/opendir. Imagine a case where a file is opened with
O_TRUNC|O_RDWR and some data is written to it, now if the brick
goes down and comes back the file will be truncated.
When I tested this case, the file is not truncated because locks
xlator resets O_TRUNC unconditionally.
Client xlator re-open bug and locks xlator bug cancel each other.

Fix
Reset O_CREAT|O_TRUNC|O_EXCL flags in re-open.
Locks xlator should not reset O_TRUNC.

Additional changes
Removed wbflags as it is not assigned at all.

Testcases
Automated go program is at:
://bugzilla.redhat.com/show_bug.cgi?id=807976#c2

Change-Id: I0080344fdda2e62e7c976c35a5bf5f1fa8838891
BUG: 807976
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3582
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-19 23:50:30 -07:00
Pranith Kumar K
b8fb6096b9 protocol/client: Remember the gfid of opened fd
This is needed when the fresh lookup triggers self-heal, gfid
won't be present in inode yet. Similar situation happens with
Rebalance as it does not perform inode_link.
Added similar fix for re-opendir.
Removed inode from fdctx and removed some duplication of code.

Change-Id: Ic94e5738c8585ed86801d2eed9ddab1015246710
BUG: 826080
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3517
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-06 12:35:44 -07:00
Amar Tumballi
6eee473eba core: coverity fixes (mostly resource leak fixes)
currently working on obvious resource leak reports in coverity

Change-Id: I261f4c578987b16da399ab5a504ad0fda0b176b1
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 789278
Reviewed-on: http://review.gluster.com/3265
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-05 10:45:10 -07:00
Jeff Darcy
0baa65b651 replicate: default read_child to a local brick if there is one.
Controlled by the "choose-local" option (on by default).

Change-Id: I560f27c81703f2c9c62fdb51532c8eb763826df7
BUG: 806462
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3005
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-05 10:43:34 -07:00
Raghavendra Bhat
2ec55e40ae protocol/client: do not ignore the xdata received for some fops
opendir, fsetattr, fsync, lk were sending NULL xdata to the server
even though it (xdata) had values within it.

Change-Id: Ic274ab903c5c1e443409dd250ede80cd85d10b36
BUG: 826923
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3502
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-03 22:07:30 -07:00
Raghavendra G
7150f4197b protocol/client: provide a buffer for storing reply of readlink.
since a readlink response can be bigger than size of rdma-msges
that can be inlined, we need to provide a buffer where server
can do an rdma-write of response.

Change-Id: I6ab06c3a94702f810ab0c57b409aaaf35cc93057
BUG: 822337
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/3464
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-01 15:58:31 -07:00
Raghavendra Bhat
14c88a7417 protocol/server: do not wind opendir call if fd creation fails
If resolve fails in some fd based operation, then do not use fd to get
gfid (fd might be NULL). Use the gfid present in resolve structure.

Change-Id: I1058274a2f9b4e58a76e4e6019e7c5ce1906d365
BUG: 827376
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3504
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-01 13:09:08 -07:00
Raghavendra Bhat
27620d0f7d protocol/client: do not access the local object after being freed
Change-Id: I2d3aeb084168b9ed68a670b91e09126917f82968
BUG: 826588
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.com/3494
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-31 17:56:55 -07:00
Anand Avati
0fd6f14910 protocol: do not log getxattr/ENODATA as warning
When SELinux is enabled, most of the files do not have labels and
result is a ton of unnecessary logs

Change-Id: I0e781e2fb6bcfb3fb12298175a41f7b981af9c39
BUG: 811217
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3486
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-05-29 22:57:18 -07:00
Amar Tumballi
5f94c61868 server protocol : logging and negative case logic fixes
* log 'resolve' gfid, instead of inode gfid, which fails to log
  for everything which fails to resolve.

* in case of 'op_ret == -1' never look into xdata or any other
  argument.

* bring uniformity in the _cbk() code.

BUG: 821139

This patch is not complete fix for above mentioned bug, but is
useful the debug it properly

Change-Id: I159becdde70720cba072e494f70951395dc6868f
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/3437
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-29 21:34:01 -07:00
Amar Tumballi
89b3466373 rpc: fix the vecsizer issue
* currently, we needed 'base-address' of the header for glusterfs
  writev vecsizer and 'current-address' of the buffer which is
  reading the data on socket, for nfs write vecsizer.

* nfs write issues started coming after http://review.gluster.com/3182
  was pushed into repo, now fixed.

* fixed by sending both as argument for vecsizer from the transport

Change-Id: I6db360ce265ce5f083f1794ebdb3867f8cfad9ec
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 824472
Reviewed-on: http://review.gluster.com/3431
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-24 17:32:32 -07:00
Raghavendra G
69680ec053 protocol/client: use correct xlator object while creating frames
during reopening files and reacquiring locks.

Change-Id: I29f42fcfa9e782ce9e323e53024e5034029914a7
BUG: 822337
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/3420
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-23 13:56:47 -07:00
Raghavendra Bhat
2eb4a5b865 protocol/client: do not print the null gfid when symlink fails
Change-Id: I1a2748768bc30a00c4f7b2e2fda1d282bc581658
BUG: 823880
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/3411
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-22 12:16:48 -07:00
Amar Tumballi
f42dd77fb8 protocol: handle proper vector size for writev()/readv()
* fixes the offset handling issue when 'xdata' is sent in writev/readv fop
  at the transport layer itself.
* client_writev() was not sending xdata on wire, fixed

Change-Id: Ib5ced64c84d415f07032662017979c65d9a1a128
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 808078
Reviewed-on: http://review.gluster.com/3182
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-21 16:50:57 -07:00
Amar Tumballi
4accf58362 protocol/client: free the 'loc2' variable of client_local
in common client_local_wipe(), local->loc2 was not getting freed
up, but its used in few functions for logging purpose.

Change-Id: I05715843b59aa216a79f5164a152c605dc9ad114
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 823133
Reviewed-on: http://review.gluster.com/3388
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-21 01:56:34 -07:00
Amar Tumballi
d37eec9667 protocol/server: fix a crash with NULL dereference
in setxattr() and fsetxattr() _cbk functions

Change-Id: I9798d182e7f68509e8e37d43cb18e4c2f4bd6fab
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 823244
Reviewed-on: http://review.gluster.com/3384
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-20 21:21:20 -07:00
Pranith Kumar K
43d9661f4a protocol/server: del_locker should delete one locker per unlock
Change-Id: Ie3281d693c1b6d1f631c77aece8039a08ad8f8fb
BUG: 771595
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3370
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-19 01:22:27 -07:00
Mohammed Junaid
19394ef5f1 protocol/client: Concatinate the graph uuid along with process uuid in
setlk_version.

Change-Id: Idec06c5ef1d440864e465f008a38c86395b52aba
BUG: 820831
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/3314
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-18 00:50:31 -07:00
Raghavendra Bhat
834fa2fd36 protocol/client: check if the name is NULL before duping it
Change-Id: I1cefc34af6fae2e71b05179824963e06361c35a2
BUG: 822385
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/3353
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2012-05-17 09:07:54 -07:00
Kaushal M
1d02db63ae client/protocol : Changes in client3_1_getxattr()
Copy args->loc to local->loc in client3_1_getxattr(). This prevents logs with
"(null) (--)" in client3_1_getxattr_cbk().
Also save args->name in local->name and print it in the log as well.

Change-Id: I1bfd00c6bbbe9f617744af7acd2f07ceafaadb3a
BUG: 812199
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3336
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-16 15:51:57 -07:00
Kaleb KEITHLEY
7319017fae license: dual license under GPLV2 and LGPLV3+
Note that the license was not changed in any of the following:
	.../argp-standalone/...
        .../booster/...
        .../cli/...
        .../contrib/...
        .../extras/...
        .../glusterfsd/...
        .../glusterfs-hadoop/...
        .../mod_clusterfs/...
        .../scheduler/...
        .../swift/...

The license was not changed in any of the non-building xlators. The
license was not changed in any of the xlators that seemed — to me — to
be clearly server-side only, e.g. protocol/server

Note too that copyright was changed along with the license; I did
not change the copyright in files where the license did not change.

If you find any errors or ommissions please don't hesitate to let me know.

The complete list of files with the license change is:
	libglusterfs/src/byte-order.h
	libglusterfs/src/call-stub.c
	libglusterfs/src/call-stub.h
	libglusterfs/src/checksum.c
	libglusterfs/src/checksum.h
	libglusterfs/src/circ-buff.c
	libglusterfs/src/circ-buff.h
	libglusterfs/src/common-utils.c
	libglusterfs/src/common-utils.h
	libglusterfs/src/compat-errno.c
	libglusterfs/src/compat-errno.h
	libglusterfs/src/compat.c
	libglusterfs/src/compat.h
	libglusterfs/src/daemon.c
	libglusterfs/src/daemon.h
	libglusterfs/src/defaults.c
	libglusterfs/src/defaults.h
	libglusterfs/src/dict.c
	libglusterfs/src/dict.h
	libglusterfs/src/event-history.c
	libglusterfs/src/event-history.h
	libglusterfs/src/event.c
	libglusterfs/src/event.h
	libglusterfs/src/fd-lk.c
	libglusterfs/src/fd-lk.h
	libglusterfs/src/fd.c
	libglusterfs/src/fd.h
	libglusterfs/src/gf-dirent.c
	libglusterfs/src/gf-dirent.h
	libglusterfs/src/globals.c
	libglusterfs/src/globals.h
	libglusterfs/src/glusterfs.h
	libglusterfs/src/graph-print.c
	libglusterfs/src/graph-utils.h
	libglusterfs/src/graph.c
	libglusterfs/src/hashfn.c
	libglusterfs/src/hashfn.h
	libglusterfs/src/iatt.h
	libglusterfs/src/inode.c
	libglusterfs/src/inode.h
	libglusterfs/src/iobuf.c
	libglusterfs/src/iobuf.h
	libglusterfs/src/latency.c
	libglusterfs/src/latency.h
	libglusterfs/src/list.h
	libglusterfs/src/lkowner.h
	libglusterfs/src/locking.h
	libglusterfs/src/logging.c
	libglusterfs/src/logging.h
	libglusterfs/src/mem-pool.c
	libglusterfs/src/mem-pool.h
	libglusterfs/src/mem-types.h
	libglusterfs/src/options.c
	libglusterfs/src/options.h
	libglusterfs/src/rbthash.c
	libglusterfs/src/rbthash.h
	libglusterfs/src/run.c
	libglusterfs/src/run.h
	libglusterfs/src/scheduler.c
	libglusterfs/src/scheduler.h
	libglusterfs/src/stack.c
	libglusterfs/src/stack.h
	libglusterfs/src/statedump.c
	libglusterfs/src/statedump.h
	libglusterfs/src/syncop.c
	libglusterfs/src/syncop.h
	libglusterfs/src/syscall.c
	libglusterfs/src/syscall.h
	libglusterfs/src/timer.c
	libglusterfs/src/timer.h
	libglusterfs/src/trie.c
	libglusterfs/src/trie.h
	libglusterfs/src/xlator.c
	libglusterfs/src/xlator.h
	libglusterfsclient/src/libglusterfsclient-dentry.c
	libglusterfsclient/src/libglusterfsclient-internals.h
	libglusterfsclient/src/libglusterfsclient.c
	libglusterfsclient/src/libglusterfsclient.h
	rpc/rpc-lib/src/auth-glusterfs.c
	rpc/rpc-lib/src/auth-null.c
	rpc/rpc-lib/src/auth-unix.c
	rpc/rpc-lib/src/protocol-common.h
	rpc/rpc-lib/src/rpc-clnt.c
	rpc/rpc-lib/src/rpc-clnt.h
	rpc/rpc-lib/src/rpc-transport.c
	rpc/rpc-lib/src/rpc-transport.h
	rpc/rpc-lib/src/rpcsvc-auth.c
	rpc/rpc-lib/src/rpcsvc-common.h
	rpc/rpc-lib/src/rpcsvc.c
	rpc/rpc-lib/src/rpcsvc.h
	rpc/rpc-lib/src/xdr-common.h
	rpc/rpc-lib/src/xdr-rpc.c
	rpc/rpc-lib/src/xdr-rpc.h
	rpc/rpc-lib/src/xdr-rpcclnt.c
	rpc/rpc-lib/src/xdr-rpcclnt.h
	rpc/rpc-transport/rdma/src/name.c
	rpc/rpc-transport/rdma/src/name.h
	rpc/rpc-transport/rdma/src/rdma.c
	rpc/rpc-transport/rdma/src/rdma.h
	rpc/rpc-transport/socket/src/name.c
	rpc/rpc-transport/socket/src/name.h
	rpc/rpc-transport/socket/src/socket.c
	rpc/rpc-transport/socket/src/socket.h
	xlators/cluster/afr/src/afr-common.c
	xlators/cluster/afr/src/afr-dir-read.c
	xlators/cluster/afr/src/afr-dir-read.h
	xlators/cluster/afr/src/afr-dir-write.c
	xlators/cluster/afr/src/afr-dir-write.h
	xlators/cluster/afr/src/afr-inode-read.c
	xlators/cluster/afr/src/afr-inode-read.h
	xlators/cluster/afr/src/afr-inode-write.c
	xlators/cluster/afr/src/afr-inode-write.h
	xlators/cluster/afr/src/afr-lk-common.c
	xlators/cluster/afr/src/afr-mem-types.h
	xlators/cluster/afr/src/afr-open.c
	xlators/cluster/afr/src/afr-self-heal-algorithm.c
	xlators/cluster/afr/src/afr-self-heal-algorithm.h
	xlators/cluster/afr/src/afr-self-heal-common.c
	xlators/cluster/afr/src/afr-self-heal-common.h
	xlators/cluster/afr/src/afr-self-heal-data.c
	xlators/cluster/afr/src/afr-self-heal-entry.c
	xlators/cluster/afr/src/afr-self-heal-metadata.c
	xlators/cluster/afr/src/afr-self-heal.h
	xlators/cluster/afr/src/afr-self-heald.c
	xlators/cluster/afr/src/afr-self-heald.h
	xlators/cluster/afr/src/afr-transaction.c
	xlators/cluster/afr/src/afr-transaction.h
	xlators/cluster/afr/src/afr.c
	xlators/cluster/afr/src/afr.h
	xlators/cluster/afr/src/pump.c
	xlators/cluster/afr/src/pump.h
	xlators/cluster/dht/src/dht-common.c
	xlators/cluster/dht/src/dht-common.h
	xlators/cluster/dht/src/dht-diskusage.c
	xlators/cluster/dht/src/dht-hashfn.c
	xlators/cluster/dht/src/dht-helper.c
	xlators/cluster/dht/src/dht-inode-read.c
	xlators/cluster/dht/src/dht-inode-write.c
	xlators/cluster/dht/src/dht-layout.c
	xlators/cluster/dht/src/dht-linkfile.c
	xlators/cluster/dht/src/dht-mem-types.h
	xlators/cluster/dht/src/dht-rebalance.c
	xlators/cluster/dht/src/dht-rename.c
	xlators/cluster/dht/src/dht-selfheal.c
	xlators/cluster/dht/src/dht.c
	xlators/cluster/dht/src/nufa.c
	xlators/cluster/dht/src/switch.c
	xlators/cluster/stripe/src/stripe-helpers.c
	xlators/cluster/stripe/src/stripe-mem-types.h
	xlators/cluster/stripe/src/stripe.c
	xlators/cluster/stripe/src/stripe.h
	xlators/features/index/src/index-mem-types.h ¹
	xlators/features/index/src/index.c ¹
	xlators/features/index/src/index.h ¹
	xlators/performance/io-cache/src/io-cache.c
	xlators/performance/io-cache/src/io-cache.h
	xlators/performance/io-cache/src/ioc-inode.c
	xlators/performance/io-cache/src/ioc-mem-types.h
	xlators/performance/io-cache/src/page.c
	xlators/performance/io-threads/src/io-threads.c
	xlators/performance/io-threads/src/io-threads.h
	xlators/performance/io-threads/src/iot-mem-types.h
	xlators/performance/md-cache/src/md-cache-mem-types.h
	xlators/performance/md-cache/src/md-cache.c
	xlators/performance/quick-read/src/quick-read-mem-types.h
	xlators/performance/quick-read/src/quick-read.c
	xlators/performance/quick-read/src/quick-read.h
	xlators/performance/read-ahead/src/page.c
	xlators/performance/read-ahead/src/read-ahead-mem-types.h
	xlators/performance/read-ahead/src/read-ahead.c
	xlators/performance/read-ahead/src/read-ahead.h
	xlators/performance/symlink-cache/src/symlink-cache.c
	xlators/performance/write-behind/src/write-behind-mem-types.h
	xlators/performance/write-behind/src/write-behind.c
	xlators/protocol/auth/addr/src/addr.c ¹
	xlators/protocol/auth/login/src/login.c ¹
	xlators/protocol/client/src/client-callback.c
	xlators/protocol/client/src/client-handshake.c
	xlators/protocol/client/src/client-helpers.c
	xlators/protocol/client/src/client-lk.c
	xlators/protocol/client/src/client-mem-types.h
	xlators/protocol/client/src/client.c
	xlators/protocol/client/src/client.h
	xlators/protocol/client/src/client3_1-fops.c

¹ Copyright only, license reverted to original

Change-Id: If560e826c61b6b26f8b9af7bed6e4bcbaeba31a8
BUG: 820551
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3304
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-10 22:06:16 -07:00
Pranith Kumar K
11a19ce031 Resolve: Assign correct path while resolving
Change-Id: Ia17ff38a60225dd2e9115aaa298bed42f9e43f56
BUG: 812277
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3248
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-08 13:39:01 -07:00
Kaushal M
44a1857e54 protocol/{client,server} : Log improvements
Make use of gfid in log messages.

Change-Id: I28548be64d19418f99ee9ccdbd3ac4ae67c6c015
BUG: 814666
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3274
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-08 04:06:38 -07:00
Raghavendra G
0caffe52b8 protocol/client: hold lock when cancelling ping_timer in
client_ping_cbk.

Change-Id: I2b4e723ef119c62902f8a692a8a1f424da0d08b4
BUG: 816951
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/3254
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-05 23:49:02 -07:00
Krishna Srinivas
9bd1b291e3 libglusterfs/inode.c: do not link the inode in the dentry cache for "." and ".."
Change-Id: I18c2e090c1ca64f47ce70dc63c9f73ea7def2f86
BUG: 810828
Signed-off-by: Krishna Srinivas <ksriniva@redhat.com>
Reviewed-on: http://review.gluster.com/3220
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-05 12:42:31 -07:00
Amar Tumballi
c204e8c271 protocol: fix memory leak of lk-owner buffer in *lk() calls
Change-Id: I7fb0e1757c5e04b1a2609c9822ac79301808f671
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 768330
Reviewed-on: http://review.gluster.com/3244
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-03 13:03:51 -07:00
Amar Tumballi
170a3a411c log cleanup: in setxattr() path
* in posix we log occassionally if errno is ENOTSUP, added a
  suggestion to mount with 'user_xattr' option.

* changed server's *etxattr_cbk to log ENOTSUP in debug level.

* changed client's *etxattr_cbk to log ENOTSUP in debug level.

Change-Id: Icd604050aaa68546011f2c950ecd7883ac6ee820
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 811957
Reviewed-on: http://review.gluster.com/3140
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-02 22:59:11 -07:00
Emmanuel Dreyfus
3dd38a4a35 get rid of ZR_PATH_MAX
As suggested by Amar Tumballi

Change-Id: Id1cd74fd7530e8c846f3be4a88b1fa301a728cf1
BUG: 764655
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.com/3243
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-01 10:24:26 -07:00
Amar Tumballi
29f2de478c core: coverity issues fixed
this is not a complete set of issues getting fixed. Will
address other issues in another patch.

Change-Id: Ib01c7b11b205078cc4d0b3f11610751e32d14b69
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 789278
Reviewed-on: http://review.gluster.com/3145
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-04-23 14:52:57 -07:00
shishir gowda
6b0a44b4df protocol/server: Check if dict arg is NULL in setxattr
Change-Id: I44d199ffa5d08115cc0aa7cb0b99298a9907af60
BUG: 808067
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3164
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-04-17 01:14:58 -07:00
Mohammed Junaid
754112b7b7 protocol/client,server: Lock self healing off by default.
Also, merged the options client.grace-timeout and server.grace-timeout
into one option "features.grace-timeout".

Change-Id: Icb9f0809f89379de673f8c9f7ca4725bc113797f
BUG: 812760
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/3153
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-16 11:35:49 -07:00
Krishnan Parthasarathi
362c5283ac server: Modified logging information to ease log based analysis
Change-Id: I1bde6505346b5dda37cf88c66f9af8ff48668ed9
BUG: 811864
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3133
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-04-13 00:59:14 -07:00
Kaushal M
28f373d89f xlator/server,xlator/nfs : Fix authentication for address lists
Fixes authentication problems when address lists are given for
auth.{allow,reject} and nfs.rpc-auth-{allow,reject}.

Change-Id: I9959ebfa6820aef52c883372e1085660560e1e73
BUG: 810179
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3104
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-13 00:55:51 -07:00
Amar Tumballi
dde9cfcaf3 protocol/client: in link_cbk() try to print valid information in case of error
currently there is a chance we don't have a source 'loc_t' path information
instead we would have gfid. Need to print destination information too.

Change-Id: I7a5edbdc9abe18fdb330fc7ed49c9946cf7fe382
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 810146
Reviewed-on: http://review.gluster.com/3122
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-04-11 10:09:58 -07:00
Amar Tumballi
0bfadb56d0 protocol/server: validate connection object before dereferencing
in 'release()' and 'releasedir()' fops the check for 'connection object'
was not done before dereferencing it. the check was in place for all
other fops. handling the missing cases now.

also removed some warnings related to 'set-but-unused'

Change-Id: I47b95318e8f2f28233179be509ce090b2fb7276d
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 801411
Reviewed-on: http://review.gluster.com/3125
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-04-11 10:07:52 -07:00
Jeff Darcy
7f5c1e5777 Fix compiler warnings and typos from Debian build.
Mostly to do with "-Werror=format-security" being buggy, but while we're
here we might as well fix some typos and such.  Credit goes to Patrick
Matthäi <pmatthaei@debian.org> for pointing these out.

Change-Id: Ia32d1111d7c10b1f213df85d86b17a1326248ffd
BUG: 811387
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/3117
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-04-10 14:37:29 -07:00
Kaleb KEITHLEY
69f7003817 Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.

OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.

I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)

Now resubmitting with a BZ

Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-04-04 16:13:21 -07:00
Amar Tumballi
db501c7370 core: fix all the iobuf related refs and unrefs
reviewed the code against all the possible places where
iobuf/iobref ref unref are present, and hopefully fixed most of
the issues around memory leaks with respect to iobuf

Change-Id: I9aa30326962991f8e23acedd389a0e962e097885
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 797875
Reviewed-on: http://review.gluster.com/2994
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-29 07:54:34 -07:00
Kaushal M
3360fca3f3 cli, glusterd: "volume set help" additions
"auth.allow/reject" and "server.statedump" options are included in "volume set
help" now.

Change-Id: I7f9ba89d1782c26792347ffd2cd4042c3c396934
BUG: 783390
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3025
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-28 11:45:22 -07:00
Mohammed Junaid
b8c4da2ce0 protocol/client: Set grace_timer_needed flag to false on a disconnect.
A grace timer is registered on a disconnect, but a reconnect timer sends a
connect request after every 3sec and if the server is down, the client protocol
receives disconnect and a grace timer will be registered which on timeout will
increase the lk-version value. Its enough to register the grace timer once after
the first disconnect and later just ignore other psuedo disconnects until the
next successful reconnect.

Change-Id: I7f34a98a79fdc25370ef15a6712bfa316a9b7c7c
BUG: 807271
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/3020
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-28 02:59:34 -07:00
Amar Tumballi
9d3af972f5 core: adding extra data for fops
with this change, the xlator APIs will have a dictionary as extra
argument, which is passed between all the layers. This can be
utilized for overloading in some of the operations.

Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 782265
Reviewed-on: http://review.gluster.com/2960
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-03-22 16:40:27 -07:00
Raghavendra G
c40b9975d0 protocol/client: memory leak fixes.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Change-Id: I804c934d79ed13ded9d1b741cef6597bc238e476
BUG: 803675
Reviewed-on: http://review.gluster.com/2987
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-03-20 22:37:18 -07:00
Raghavendra Bhat
e8f9aabb78 protocol/server: remove the transport from the list irrespective of lock-heal is on/off
Upon getting disconnect, remove the transport from the list of transports that
protocol server maintains irrespective of whether lock-heal is on or off, since
upon reconnect a new transport would be created.

Change-Id: I18a269a93487d6e2cb11c345b6dde813d089809c
BUG: 803815
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/2980
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-03-20 07:49:01 -07:00
Mohammed Junaid
2ffefd720a protocol/client: Handle failures in lock self healing gracefully (part2).
During reopening of fd's and reacquiring of locks on the fd (after a
reconnect), a release on a fd on which reacquiring of locks is in progress
will free up fdctx. This patch will keep fdctx valid until the reacquiring
of locks is in progress.

Change-Id: I0fae27544a7f8ddaa26def4ee4d41a8a2b322521
BUG: 795386
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/2819
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-19 09:16:23 -07:00
Amar Tumballi
d98c3e1934 rpc-clnt: separate out connection_cleanup() from destroy()
noticed that there are possibilities where one would like to do a
connection_cleanup() before destroying a RPC connection itself, also
current code is such that, rpc_clnt_connection_cleanup() does
rpc_clnt_ref() and unref(), creating a race window/double unref
possibilities in the code.

by separating out the functions, this race window/double fault can be
prevented.

Change-Id: I7ebd3392efa891232857b6db9108b0b19e40fc12
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 802403
Reviewed-on: http://review.gluster.com/2979
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-19 09:14:40 -07:00
Mohammed Junaid
55c22fbfae protocol/client: Handle failures in lock self healing gracefully (part 1).
During reopening of fd's and reacquiring of locks on the fd (after a
reconnect), a release on a fd on which reacquiring of locks is in progress
will free up fdctx. This patch will keep fdctx valid until the reacquiring
of locks is in progress.

Change-Id: I0464c751a5aa986abac0b72b48b261fceeba24e8
BUG: 795386
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/2937
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-19 09:05:58 -07:00
Mohammed Junaid
83277598bd protocol/server: Handle server send reply failure gracefully.
Server send reply failure should not call server connection cleanup because
if a reconnection happens with in the grace-timeout the connection object is
reused. We must cleanup only on grace-timeout.

Change-Id: I7d171a863382646ff392031c2b845fe4f0d3d5dc
BUG: 803365
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/2947
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-19 08:11:43 -07:00
Vijay Bellur
f076c23f38 protocol/client: Avoid STACK_DESTROYing more than once in RELEASE fops.
Change-Id: I435327c6133aa6739731dabddde860b0b43c1497
BUG: 804607
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Reviewed-on: http://review.gluster.com/2978
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-03-19 05:58:30 -07:00