summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* performance/quick-read: Handle unwinding of frameRaghavendra G2011-07-291-115/+220
| | | | | | | | | | | | | | | | | corresponding to read fop properly, while validating cache. - there was a possibility of double unwind in case of errors. - use a new frame to do open in fd-based fops. In case of errors, qr_resume_pending_ops will be called to resume all the fops waiting on open. Hence if we use frame corresponding to fop (without creating a new one), there is a possibility of frame being freed by the time open would've returned to quick-read. Change-Id: I45a528e02b0886d22161ac24ab3e147a26d5ee7d BUG: 3168 Reviewed-on: http://review.gluster.com/53 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* quick-read: Fix dirname(3) usageAnand Avati2011-07-291-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | glibc dirname() modify the string it is given and returns it. glusterfs takes this behavior for granted, and assume that if it gives a malloc'ed string to dirname(), then it can free()) the return value. Here is what SUSv2 says: http://opengroup.org/onlinepubs/007908799/xsh/dirname.html "The dirname() function may modify the string pointed to by path, and may return a pointer to static storage" At least NetBSD returns a static storage. glusterfs will return it to a calling function that has the responsability to free it, causing a SIGSEGV. Thanks to: Emmanuel Dreyfus <manu@netbsd.org> Change-Id: I8b1b946a005ee487b4b9fb23c0f85a41facfe7c4 BUG: 2923 Reviewed-on: http://review.gluster.com/52 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* performance/quick-read: Perform error handling only when GF_CALLOC failsVijay Bellur2011-07-291-1/+1
| | | | | | | | Change-Id: I7a1e2cae3de8794b252ebbf0de7ffab5ba2900d1 BUG: 3011 Reviewed-on: http://review.gluster.com/51 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* performance/quick-read: dump inode and fdctx during statedump.Raghavendra G2011-07-291-0/+126
| | | | | | | | Change-Id: I8641e1f2e9e031c1b443821b16ef4a365926a8a8 BUG: 1059 Reviewed-on: http://review.gluster.com/50 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* performance/quick-read: propagate errors during open back to actual fops.Raghavendra G2011-07-293-360/+867
| | | | | | | | | | | | | | - If open fails and there are any other fops waiting on that open, those fops should also unwind with appropriate errors. Before this patch, irrespective of success/failure of open, fops waiting on it were stack_wound and since fd was invalid, they would fail with EBADFD errors. Due to this actual error would've got masked by EBADFD. Change-Id: I65f88a681ea573a964fae132073696d32701882f BUG: 2346 Reviewed-on: http://review.gluster.com/49 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* rpc: in client connection init(), return the proper error codeAmar Tumballi2011-07-281-0/+1
| | | | | | | | | | | without the proper error code, rpc won't know if transport is successfully loaded or not. Change-Id: Idc3ad56d2f47cf1e81ba39f90a7f7b47305d7d9a BUG: 3260 Reviewed-on: http://review.gluster.com/114 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* libglusterfs: Bring in os_daemon() routine to replace FreeBSD codeVijay Bellur2011-07-285-102/+65
| | | | | | | | Change-Id: I72dda0bb9e3b6cfa8b8ecffe85cc606f5a682313 BUG: 3206 Reviewed-on: http://review.gluster.com/119 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd: handle replace-brick in paused state.v3.1.6qa2Krishnan Parthasarathi2011-07-273-31/+109
| | | | | | | | | | | This change ensures that glusterd retains 'state' information of an ongoing replace brick operation even if it went down midway. Change-Id: I01d5f86c22c91a3e8801614ea172956719061a05 BUG: 3252 Reviewed-on: http://review.gluster.com/110 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/dht: dht_rename() - handle GFID situationsAnand Avati2011-07-251-4/+51
| | | | | | | | | | | | | In the pre-GFID era, the linkfile of the destination file could be reused the linkfile for the renamed file when dst_cached == src_cached. This patch handles this situation and reverts the previous (wrong) fix. Change-Id: Iba57b5eb91cf8b1fb40e74f6399cdf99b8b00410 BUG: 2464 Reviewed-on: http://review.gluster.com/88 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Joe Julian <joe.julian.prime@gmail.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* dht: use gfid of the actual file while recreating the proper linkfilesRaghavendra Bhat2011-07-231-1/+4
| | | | | | | | Change-Id: Ia024fd136c936c5a73e2cdacdb738e5d2912d619 BUG: 2464 Reviewed-on: http://review.gluster.com/78 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: use lstat() instead of stat()Amar Tumballi2011-07-191-6/+6
| | | | | | | | | | | | so the symlinks pointing to directories are not considered as directories themself and the control flows outside gluster's scope Change-Id: Iae910ce6c68886d34ae6e5efe46062481b40cd25 BUG: 3191 Reviewed-on: http://review.gluster.com/28 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: feature to migrate extended attributes addedAmar Tumballi2011-07-191-0/+110
| | | | | | | | | | | | currently when a file gets migrated, the extended attributes of the files are getting lost (which should be treated as data-loss). Change-Id: Ic417afbdbe0390491055bb0126eb4f48e6588f88 BUG: 3069 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/9 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* s/Patchwork/Gerrit/Anand Avati2011-07-183-64/+104
| | | | Change-Id: I228295f1c33e2c4d991ef6810e2332c3299ca2b7
* fuse: fix inode-leaks in fuse_lookup_and_resume codepath.Raghavendra G2011-07-172-12/+31
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2525 ([glusterfs-3.1.3qa8]: inode leak in rdma) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2525
* cluster/afr: previous read_child should take precedence over priv->read_childPranith K2011-07-172-2/+10
| | | | | | | | | | | | Lookup uses the sources array to decide if a child is read_child or not. So if afr_mark_sources returns 0 i.e. all children are sources, explicitly mark them as sources. Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3138 ([release-3.2]: ls shows 2 entries) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3138
* cluster/afr: save xattr of all the children in lookup_cbkPranith K2011-07-171-2/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3138 ([release-3.2]: ls shows 2 entries) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3138
* protocol/client: changes in volume_options to assistKaushik BV2011-07-171-9/+40
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* write-behind: changes in volume_options to assistKaushik BV2011-07-171-4/+40
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* quick-read: changes in volume_options to assist volume set help/help-xmlKaushik BV2011-07-171-1/+20
| | | | | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041 BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* io-threads: changes in volume_options to assist volume set help/help-xmlKaushik BV2011-07-171-8/+26
| | | | | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041 BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* io-cache: changes in volume_options to assist volumeKaushik BV2011-07-171-22/+97
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* stripe: changes in volume_options to assist volume setKaushik BV2011-07-171-5/+47
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* dht: changes in volume_options to assist volume setKaushik BV2011-07-171-3/+26
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* afr: changes in volume_options to assist volume setKaushik BV2011-07-171-4/+40
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* mgmt/Glusterd: Implementation volume set help/help-xmlKaushik BV2011-07-1710-60/+541
| | | | | | | | Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
* io-threads: Initialize mutex and condshishir gowda2011-07-171-0/+12
| | | | | | | | | | Thanks to Emmanuel Dreyfus for sending out the fix. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3170 (Uninitialized mutex and cond in io-threads) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3170
* posix: perform readdir filling in locked regionAnand Avati2011-07-161-85/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two application threads share an open dir fd (DIR *) and issue readdirs, storage/posix will receive separate readdir fops in separate threads in parallel. This has two-fold issues 1. In the following pair of operations - entry = readdir(dir) and strcpy (gf_dirent->name, entry->d_name) @entry is a static buffer in libc which can get reused by another thread to get filled with a longer name. This can cause the second operation to overflow the buffer as the allocation was for the smaller name. 2. In the following pair of operations - seekdir (dir, offset) and entry = readdir(dir) If two threads are executing these sequence in parallel in separate threads, then one of them will end up reading wrong/unexpected entries. It would be sufficient to fix 1. by using readdir_r but that still keeps the second race open. Hence the patch moves all the set of operations to a locked region which solves both races. Change-Id: I36e596a96e254d3a82ff5f3669fa67ec72ef0833 Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3171 (Crash in server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3171
* performance/quick-read: reset open_in_transit to zero in case of an error.v3.1.6qa1Raghavendra G2011-07-121-0/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3011 (Uninterruptible processes writing(reading ? ) to/from glusterfs share) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3011
* mnt/fuse: generate uuids in fuse_lookup, not in fuse_lookup_resume.Raghavendra G2011-07-121-1/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041
* server: Reassociating 'old' conn can lead to chaos.Krishnan P2011-07-121-19/+10
| | | | | | | | | | | | | | | | | Since we moved to a single socket connection b/w client and server, inherting connection state is unnecessary and can sometimes be dangerous when clients reconnect even before the server detects a socket error on the old connection. Dirty detail: This reassociation results in 'ref count' not decreasing in tandem with the connection disconnects. This results in a resource leak. Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3104 (Self-heal does not work in dis-rep!) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3104
* nfsrpc: Re-order NFS auth array contentsPavan T C2011-07-121-6/+6
| | | | | | | | | | | | Some NFS client implementations can default to AUTH_NULL given a certain order of auth_array in MOUNT reply. We re-order it here to make sure that such clients (Example - 2.6.26), do not have such security loop holes. Signed-off-by: Pavan T C <tcp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3144 (permissions given in fuse mount don't have effect in nfs mount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3144
* cluster/dht: fix race between two directory renamesAnand Avati2011-07-121-17/+89
| | | | | | | | | | let the race get arbitrated at the dst_hashed subvolume. Change-Id: I140fc5b0176ee752ebef648c539b404653e91bdd Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
* storage/posix: detect race in posix_rename()Anand Avati2011-07-121-0/+23
| | | | | | | | | | | | detect a race in rename between two clients by checking for reassigned gfid or presence of dir when not expecting. checks not necessary for rename of files. Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2522 ([glusterfs-3.1.3qa8]: rm -rf shows invalid argument) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2522
* client-handshake: skip CHILD_DOWN notifications when client is querying port ↵Raghavendra G2011-07-121-0/+2
| | | | | | | | | | using different volume names in the presence of rdma. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
* nfs-rpc: Use mempool for allocating connection objectShehjar Tikoo2011-07-112-3/+19
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3039 (NFS RPC leaks memory in client connection creation on showmount -e) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3039
* cli: Exit if glusterd is not operational in non-prompt modesVijay Bellur2011-07-113-0/+9
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3120 (Provide connection timeout between cli and glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3120
* mnt/fuse: Do a pthread_cond_broadcast for both CHILD_UP and CHILD_DOWN events.Raghavendra G2011-07-012-6/+7
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
* mount/fuse: wait till CHILD_UP event is recieved to do the first lookup.Raghavendra G2011-07-011-9/+2
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
* rpc-transport/rdma: call ibv_fork_init to make rdma work with fork.Raghavendra G2011-07-011-0/+1
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
* cluster/afr: set frame local before access windPranith K2011-07-011-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3072 (Crash in afr_access_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3072
* cluster/afr: fix the range of the lock taken in [f]truncatePranith K2011-07-011-4/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3077 (afr [f]truncate locks wrong region in transaction) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3077
* fuse: consider a lookup as revalidate even if the inode is present in new graph.Raghavendra G2011-06-221-10/+12
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041
* pump: mark pending before notify to children to avoid race in single CPU.Krishnan P2011-06-221-2/+2
| | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3050 ('replace-brick' hangs on vm's) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3050
* afr: bg self-heal must be off if self-heal-count=0.Krishnan P2011-06-221-3/+3
| | | | | | | | Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3036 (self-heal problem in replace-brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3036
* stack: make process state dump more debug friendlyv3.1.5qa4v3.1.5Anand Avati2011-06-192-208/+238
| | | | | | | | | | store points of stack wind and unwind (function names) for each frame and dump them in process state dump Signed-off-by: Anand Avati <avati@gluster.com> BUG: 1059 (enhancements for getting statistics from performance translators) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1059
* fix multiple transport related portmap issues in client handshakeAmar Tumballi2011-06-199-8/+137
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
* nfs:command to change the transport type of nfs server for volumes of ↵Amar Tumballi2011-06-194-18/+98
| | | | | | | | | | | transport tcp, rdma Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
* rpc-transport/rdma: don't return '0' in case of un-initiated rdma_connect()Amar Tumballi2011-06-191-4/+1
| | | | | | | | | | | | | needed to handle the re-configuration of the port in client protocol. If there is a successful 'connect()' after the query port, the remote-port value gets reset to '0'. In this case, if the connect() return 0 for already connected socket, the query_portmap will keep happening in a loop. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
* glusterd-volgen: fix rdma volume file path in case of 'tcp, rdma' transport.Amar Tumballi2011-06-191-1/+1
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
* build : with rpm install invoke glusterd upgrade option to modify vol files ↵Lakshmipathi2011-06-171-0/+18
| | | | | | | | | | and start Signed-off-by: Lakshmipathi.G <lakshmipathi@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2904 (glusterd should have upgrade/downgrade xlator options) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2904