summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* performance/io-cache: fix deadlock in ioc_fault_cbkv3.1.6qa4Raghavendra G2011-08-051-21/+2
| | | | | | | | Change-Id: I899abecd17025c299819b36c2d39adc52adb1bd6 BUG: 3340 Reviewed-on: http://review.gluster.com/177 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* save even more treesAnand Avati2011-08-051-1/+10
| | | | | | | | | | | make the build even more quiet. make anush even more happy by saving even more trees. Change-Id: I301aba34e4470805114989650a13f9fe35f42d35 BUG: 3255 Reviewed-on: http://review.gluster.com/174 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* save more treesAnand Avati2011-08-052-0/+9
| | | | | | | | | | make the build more silent Change-Id: Ied4c87c40af4b1f1034af4a13c1153d82883751b BUG: 3255 Reviewed-on: http://review.gluster.com/172 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* mgmt/glusterd: Minor fixes for volume set help/help-xmlKaushik BV2011-08-054-8/+52
| | | | | | | | | | | | - Overallocate the buffer-size of the xmlBuffer to 16KB - Introduce synthetic options in xlators - Change the tags of XML output Change-Id: I8c9ab466973b5c12accba4741c336e380a180bed BUG: 2041 Reviewed-on: http://review.gluster.com/168 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* use GIT_EDITOR env variable instead of EDITORVenky Shankar2011-08-041-1/+1
| | | | | | | | Change-Id: I90be06e1051ed5005d10e4ca248029ef776d0224 BUG: 3326 Reviewed-on: http://review.gluster.com/159 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* nfs: fix default values of volume options for a much saner output in volume ↵v3.1.6qa3Kaushik BV2011-08-031-4/+54
| | | | | | | | | | set help/help-xml Change-Id: I083f760b63fc96f938d64a61f193f7426640966b BUG: 2041 Reviewed-on: http://review.gluster.com/132 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: handle a race condition while starting a rebalanceAmar Tumballi2011-08-031-2/+1
| | | | | | | | | | | | | due to the race, there was a possibility of having two (or more) threads doing glusterd_defrag_start(), which would cause different thread to access same pointer, and at some point making it NULL, causing other threads to crash with SEGV. Change-Id: Id05b99dd6f33329027b8a07f1c8da5a65fd6dae9 BUG: 3295 Reviewed-on: http://review.gluster.com/140 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* DHT rename: Recreate linkfile after unlinkshishir gowda2011-08-033-144/+50
| | | | | | | | | | | | | This is done, so that there is no gfid mismatch. Unlink the older linkfile if it exists, and recreate it with the correct gfid. Also removed unused rename related code. BUG: 2522 Change-Id: Ic1c5f7ff66090e9147d75530b6ab3f9ef123f4ae Reviewed-on: http://review.gluster.com/143 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* mgmt/glusterd: Ignore case in friend find by hostnamePranith Kumar K2011-08-031-4/+4
| | | | | | | | Change-Id: Id09f42f55a08b6990b4d63e6c708af17a42662d4 BUG: 3309 Reviewed-on: http://review.gluster.com/147 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* IO-threads: Support for loading io-threads xlator on client sideshishir gowda2011-08-011-1/+5
| | | | | | | | | | | | New set option performance.client-io-threads added to enable/disable it. Default behavior is io-threads is off on client side Loaded only on fuse volume below io-stats. BUG: 3122 Change-Id: I9a4852e0ded3e8b4adcb5b5930bc3e17d1beb10a Reviewed-on: http://review.gluster.com/134 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* glusterd rebalance: handle the write failure properlyAmar Tumballi2011-07-311-10/+53
| | | | | | | | | | | also, make sure the sizes are same before renaming the target file to the original file, hence prevent a possible data-loss. Change-Id: Ie88224ba62a4604f8c0149f84fa462abfbd6ad78 BUG: 3193 Reviewed-on: http://review.gluster.com/29 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterfsd: initialize sigset_t in sigwaiterAnand Avati2011-07-311-0/+1
| | | | | | | | | | Thanks to kkeithle@redhat.com for pointing out. Change-Id: I8167ffffddbdbc3dc09f7474bd834dbf4a49db9b BUG: 3280 Reviewed-on: http://review.gluster.com/131 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
* nfs: free the allocated string after its usageRaghavendra Bhat2011-07-291-0/+3
| | | | | | | | Change-Id: Ia29eb582963317538865fbc461dfb942ba45da5c BUG: 3039 Reviewed-on: http://review.gluster.com/122 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* performance/io-cache: hold lock on ioc_inode whereever a page is being ↵Raghavendra G2011-07-295-1592/+1697
| | | | | | | | | | accessed/modified Change-Id: Idbec92e3ffb838a0ac866fb42ceb6ee26a0b8a87 BUG: 2939 Reviewed-on: http://review.gluster.com/25 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* 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