429 Commits

Author SHA1 Message Date
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
Krishnan Parthasarathi
72da7808cb locks: Set flock.l_type on successful F_UNLCK to signal last unlock on fd.
NLM expects a successful F_UNLCK on an fd to set flock.l_type to F_UNLCK
if it were the last unlock else F_RDLCK.

Change-Id: Ib304ac6102664abbb13d1fda649b3da63f1ee97e
BUG: 800300
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3306
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishna Srinivas <krishna@gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-10 15:26:54 -07:00
Amar Tumballi
17b0814243 geo-replication: coverity resource leak fixes
Change-Id: I5739e9c9ae6fe78a6defb640d630e5f918ac1295
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 789278
Reviewed-on: http://review.gluster.com/3266
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-09 00:41:28 -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
Raghavendra G
4213745eba features/quota: update inode ctx in reconfigure.
Till this patch, quota was relying on lookups after reconfigure, for
new limits to be effective. However, this might be restrictive for
users who don't want to change directories after resetting quota
limits.

Change-Id: I236aa31fdc7dcbc01d40d38c9b5b7b0a28a4d2ea
BUG: 802905
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/3022
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-27 00:26:39 -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
Pranith Kumar K
fb9f485db2 features/locks: Find parent-entrylk presence in lookup
Change-Id: I8fc85676827f26b07bf578ea1152d3e251adb4af
BUG: 765551
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3177
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-04-18 22:20:47 -07:00
Amar Tumballi
41bd7281a5 features/marker: fix possible NULL access in strcmp()
for a given setxattr call, loc->path can be NULL now, handle
that case properly

Change-Id: Ic56ec81aa8eb62aafdb524bf22f6d84390ab1d4b
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 812767
Reviewed-on: http://review.gluster.com/3154
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-16 11:39:13 -07:00
shishir gowda
42c06ba048 glusterd/rebalance: Start process with xlator option client-pid -3
This would prevent updation of xtime by the marker.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Change-Id: I11e287511026326271c2926e55993e48b32018f6
BUG: 812287
Reviewed-on: http://review.gluster.com/3144
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-by: Csaba Henk <csaba@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-16 11:21:50 -07:00
Csaba Henk
c238e5073a geo-rep / gsyncd: log sync failures as warnings
Syncing of certain files can fail naturally if changes happen on
master (eg. file gets deleted). Therefore logging an error is
misleading.

Change-Id: I7b54904e5ec7c85e4e0fa1e330123d2c44c78ac5
BUG: 764510
Reported-by: Vijaykumar Koppad <vkoppad@redhat.com>
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/3113
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijaykumar <vkoppad@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2012-04-13 00:25:47 -07:00
Raghavendra G
e46a57fda7 features/quota: don't adjust statfs buffer if size used is already
greater than available limit.

members f_bfree and f_bavail of struct statfs are unsigned types.
A negative value assigned to them is interpreted as some positive
number and resulting in incorrect output of df output.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Change-Id: I4d3d38b9bb6f675958ee38ad4d6c71ebcf4bb9a1
BUG: 773530
Reviewed-on: http://review.gluster.com/3102
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-12 22:18:57 -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
Csaba Henk
73e2c0dec5 geo-rep / gsyncd: shuffle directory entries in crawl
In order to randomize the walk of the file tree.

Change-Id: I9fc3b83d5804914a50faae8df7dbcfed2ba6f4b4
BUG: 809675
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/3079
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2012-04-05 05:12:59 -07:00
Raghavendra Bhat
3c5aed7d82 locks, stripe: check if dict is NULL before refing it
Change-Id: Ifab58504280ed92e4435f7805052745e56bef5ef
BUG: 808003
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/3073
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-03 04:20:48 -07:00
Raghavendra G
0e4c74861f quota: log msgs indicating NULL parent inode in DEBUG level.
with name-less lookups its common to hit situations where parent
inode is NULL.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Change-Id: I980b14c3d4691e850ae15768f73cf1b7d867e930
BUG: 809032
Reviewed-on: http://review.gluster.com/3071
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-03 00:57:56 -07:00
Pranith Kumar K
96e68adc34 features/locks: INIT the list before insert_merge
Change-Id: I1612565e2bbf1811a85341016b86571bdf6e5062
BUG: 805994
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3047
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-31 05:17:09 -07:00
Raghavendra Bhat
735714edca features/locks: check whether dict is NULL before refing it
Change-Id: I8906b80e584466aceb5a7402e3cee6ac2a552fab
BUG: 808003
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/3036
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-29 07:47:11 -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
Pranith Kumar K
8217148c97 features/locks: Avoid race in pl_inode_get
Change-Id: I6c7b878fb43863137aac6552ee66f091534a6296
BUG: 770080
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2998
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-03-21 11:16:17 -07:00
Pranith Kumar K
b1f1d57ca5 features/locks: Avoid race in creating domains
Thread:1                 |       Thread:2
-----------------------------------------
1) Does inodelk on inode1| 1) Does inodelk on inode1
2) It tries to get the   | 2) It tries to get the
dom object for the volume| dom object for the volume
volname-replicate-0. But | volname-replicate-0. But
the domain list is empty.| the domain list is empty.
3) Create the new domain |
dom1 and add it to head  |
of the list of domains.  |
4) inodelk happens on    | 3) Create the new domain
dom1 on range r1.        | dom2 and add it to head
                         | of the list of domains.
                         | 4) inodelk happens on dom2 on range r2
5) unlock for r1 comes   | 5) Unlock on r2 succeeds.
on inode1.               |
6) It tries to get the   |
domain, of the inodelk   |
for volume               |
volname-replicate-0, gets|
dom2 but the lock on     |
range r1 is not present  |
so it fails.             |

subsequent inode lock, unlocks will keep happening on the domain dom2.
The stale lock present in the dom1 on range r1 will live on.
It wont cause any hangs, but the statedump will always be scary.

Change-Id: I9adc120d33febf685b30859cc307768c2fc63ae5
BUG: 770080
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2993
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-03-21 11:15:15 -07:00
Mohammed Junaid
a2291931d5 features/marker: Replacing -1 with GF_CLIENT_PID_GSYNCD as part of code cleanup.
Change-Id: Ia665060bff636b372904a726aba5249de9ade124
BUG: 769494
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/2971
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Csaba Henk <csaba@redhat.com>
2012-03-20 07:47:21 -07:00
Kaushal M
a77c4a7954 features/quota : Fix timeout min value
Change timeout min value to 0, so that default value of 0 successfully validates
and mounts happen properly.

Change-Id: I579c6192b97ffe2678fa95c912679b514fa7d8c0
BUG: 804509
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/2976
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 05:47:41 -07:00
Pranith Kumar K
1477fe376a Logs: Improved logs in lock/unlock execution path
Statedump will now start showing the lk-owner of the stack.

Change-Id: I9f650ce9a8b528cd626c8bb595c1bd1050462c86
BUG: 803209
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2968
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-03-18 01:53:41 -07:00
Kaushal M
93022c0cc6 mgmt/glusterd : volume set validation fixes
This is the new version of the patch by Kaushik at review.gluster.com/699

The following new option types have been introduced:
 * GF_OPTION_TYPE_INTERNET_ADDRESS_LIST
 * GF_OPTION_TYPE_PRIORITY_LIST
 * GF_OPTION_TYPE_SIZE_LIST
and option types of several options in translators have been updated to use the
new types.

valid_internet_address(), valid_ipv4_address() & valid_ipv6_address() functions
has been updated for * wildcard matching. Previously used standalone wildcard
address checking functions have been removed.

Changes have been done to stripe translator to correctly set, update and use
stripe-blocksize. Also minimum value for block-size has been set to 16KB.

Change-Id: I2aa484ff695f6a915a8fc9a9f965cf0344f41d59
BUG: 765248
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/2899
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-03-18 00:52:40 -07:00
Krishnan Parthasarathi
7bd561996d locks: Fixed incorrect list ptr manipulation in clearing entrylks
Avoided unwinding blocked entry lock frames inside pl_inode->mutex.

Change-Id: I424c4a1762c889c1a567c588d4ca383a6c338886
BUG: 800412
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2878
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-14 05:56:11 -07:00
Raghavendra G
84da099ed3 features/marker: Nameless lookup related fixes
while filling a loc structure, marker should not error out if loc->name
is NULL or loc->path is just a gfid.

Change-Id: Ie3a9cffde2d17da0377f1e41de93b099a9133abe
BUG: 801364
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/2938
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-03-14 02:56:12 -07:00
Raghavendra G
6a8fcff3fb features/quota: store quota context even for the cases where loc.name
is NULL

with name-less lookups, loc.name is NULL.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Change-Id: Ie3914924896c90a7fb7251cb0184c8e561ef7f4f
BUG: 801364
Reviewed-on: http://review.gluster.com/2917
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-03-12 13:06:14 -07:00
Pranith Kumar K
f75277b12a features/locks: Make inodelk ref-counted
Ref when the object is allocated.
Unref after the response is submitted to that inodelk.

Ref when the lock is granted.
Unref when the lock is unlocked.

Change-Id: I2bfe9182b67bea7dc7b9d0ed9f99f1c7fa0b8a3c
BUG: 783449
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2891
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-10 02:24:30 -08:00
Csaba Henk
e1ab347720 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>
2012-03-07 23:05:37 -08:00
Raghavendra G
f6a779ffc5 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>
2012-03-07 21:12:41 -08:00
Rajesh Amaravathi
6756245b15 fops/removexattr: prevent users from removing glusterfs xattrs
* Each xlator prevents the user from removing xlator-specific
  xattrs like trusted.gfid by handling it in respective removexattr
  functions.

* For xlators which did not define remove and fremovexattr,
  the functions have been implemented with appropriate checks.

xlator         |     fops-added
_______________|__________________________
               |
1. stripe      |     removexattr and fremovexattr
2. quota       |     removexattr and fremovexattr

Change-Id: I98e22109717978134378bc75b2eca83fefb2abba
BUG: 783525
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2836
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-05 09:17:47 -08:00
Csaba Henk
5b9d47a3a3 geo-rep / syncdaemon: determine suitable xattr namespace based on privilege
Change-Id: I91fe16d7e5e4c21f138eab4ee0b9334aec40e41b
BUG: 765433
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/2838
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2012-03-05 07:52:54 -08:00
Csaba Henk
316e694d53 geo-rep / syncdaemon: make the timeout for establishing the connection to slave configurable
It can be set through the connection-timeout tunable but we keep it hidden,
intended as a workaround for some special scenarios not for general use.

Change-Id: I31f9fa3873afa7babc2106ee34484123a01bdc57
BUG: 789078
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/2839
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-03-01 09:26:53 -08:00
Krishnan Parthasarathi
c1e3d3b963 locks/glusterd: Fixed clearing of posix locks from failing always.
Change-Id: Ieaf636c6f0d2aa1d001143a2d1433fce85dc8c7a
BUG: 797042
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2812
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-02-27 04:39:34 -08:00
Krishnan Parthasarathi
728de5be7c locks: Made dump locks formatting more 'readable'.
Also,
Added inode's path to dump locks.
Added basename to entrylk dump output.
Added whence field of range locks to dump output.

Change-Id: Ifd3f8b585a52de7ff68cd54506619ac3eaedeecc
BUG: 789858
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/798
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-24 05:13:50 -08:00
Vijay Bellur
4ac06a1699 features/marker: Use loc.inode to obtain parent if loc.parent isn't set.
Change-Id: I89dddb19168a3ffb269afc9f6bcb2d7e7c9a69cd
BUG: 790389
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Reviewed-on: http://review.gluster.com/2802
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
2012-02-22 23:16:59 -08:00
Amar Tumballi
67104b716a mempool: adjustments in pool sizes
* while creating 'rpc_clnt', the caller knows what would be the ideal
  load on it, so an extra argument to set some pool sizes

* while creating 'rpcsvc', the caller knows what would be the ideal
  load of it, so an extra argument to set request pool size

* cli memory footprint is reduced

Change-Id: Ie245216525b450e3373ef55b654b4cd30741347f
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 765336
Reviewed-on: http://review.gluster.com/2784
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-22 04:23:48 -08:00
Pranith Kumar K
2b52b096a7 features/locks: Don't access free'd memory
Change-Id: I4e22ede84622f2c9c46cc0bc9f17bef73afa815c
BUG: 796069
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2791
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-22 03:26:24 -08:00
Pranith Kumar K
311de6f96c features/index: Set correct ret value in index_add
Change-Id: I6314ea25ef26920593a3113eb2951d18255db34f
BUG: 763820
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2786
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-02-21 22:20:03 -08:00
Pranith Kumar K
6a6abb5367 features/index: Fix fd leak
Change-Id: Ib01d03999b099369674495ce500f48d492758f91
BUG: 763820
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2781
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-21 02:50:49 -08:00
Amar Tumballi
0ef7e763c8 core: utilize mempool for frame->local allocations
in each translator, which uses 'frame->local', we are using
GF_CALLOC/GF_FREE, which would be costly considering the
number of allocation happening in a lifetime of 'fop'. It
would be good to utilize the mem pool framework for xlator's
local structures, so there is no allocation overhead.

Change-Id: Ida6e65039a24d9c219b380aa1c3559f36046dc94
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 765336
Reviewed-on: http://review.gluster.com/2772
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-02-21 02:42:09 -08:00
Pranith Kumar K
1979cee471 features/index: Add release, releasedir cbks
Change-Id: Ice45a0b4e953e270273aa4155a895d6ec033fda8
BUG: 763820
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2780
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-21 02:36:59 -08:00
Pranith Kumar K
12480df27b features/index: Index translator implementation
Change-Id: If8a11ecbdd010f64fb4409add5751080f4b59086
BUG: 763820
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2722
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-20 08:52:33 -08:00
Krishna Srinivas
ed20369794 NLM - Network Lock Manger V4
Change-Id: Ic31b8bb10a28408da2a623f4ecc0c60af01c64af
BUG: 795421
Signed-off-by: Krishna Srinivas <ksriniva@redhat.com>
Reviewed-on: http://review.gluster.com/2711
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-02-20 07:26:51 -08:00
Raghavendra Bhat
c8d47f056e features/marker: copy the gfid to loc from oplocal->loc.inode
Change-Id: I8cfb70c163a3c4a0bd682678f71b38b5bae20ab4
BUG: 790393
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/2750
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-02-14 22:20:07 -08:00
Krishnan Parthasarathi
b27512e006 locks: Added a getxattr interface to clear locks on a given inode.
getxattr returns a summary of no. of inodelks/entrylks cleared.
cmd_structure: trusted.glusterfs.clrlk.t<type>.k<kind>[.{range|basename}]
where,
type = "inode"| "entry"| "posix"
kind = "granted"| "blocked" | "all"
range = off,a-b, where a, b = 'start', 'len' from offset 'off'

Change-Id: I8a771530531030a9d4268643bc6823786ccb51f2
BUG: 789858
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2551
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-14 02:48:59 -08:00
Amar Tumballi
58a538e998 features/quota: fix a crash in fgetxattr() by checking for NULL arg
'name' can be NULL in getxattr() as it is overloaded in glusterfs
code to support listxattr() too.

Change-Id: I70ccee027828e9b2b08da770f513c4edc5c7a46b
BUG: 772601
Signed-off-by: Amar Tumballi <amar@gluster.com>
Reviewed-on: http://review.gluster.com/2743
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-14 02:43:26 -08:00
Vijay Bellur
b0e28fe222 features/marker: set loc->gfid in setxattr initiated from marker.
Change-Id: I7abb62272b7c8bb25ad37cbc13da7b4713924b7a
BUG: 787151
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Reviewed-on: http://review.gluster.com/2736
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-02-14 01:57:30 -08:00
Amar Tumballi
0e6df0100e core: add an extra flag to readv()/writev() API
needed to implement a proper handling of open flag alterations
using fcntl() on fd.

Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 782265
Reviewed-on: http://review.gluster.com/2723
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-02-14 01:09:02 -08:00
Csaba Henk
aec6d5d892 geo-rep: gsyncd: fix up fallback xtime for orphans on master side
Change-Id: I2fa543b4bd317e06ea621ae968300ffb7223a68a
BUG: 771787
Signed-off-by: Csaba Henk <csaba@gluster.com>
Reviewed-on: http://review.gluster.com/2580
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushik BV <kaushikbv@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-07 09:50:05 -08:00