summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* storage/posix: lgetxattr called with invalid keys on the bricksKaleb S. KEITHLEY2014-02-161-110/+112
| | | | | | | | | | | | | | More invalid keys have crept in since this was fixed. We need a better strategy for avoiding this than the current noticed-in-an-strace... Cleaning tabs while I'm at it. Change-Id: I2ea97f6d1ab2a9fd569b5b5e01a4de891401fb81 BUG: 765202 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7003 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: Use gf_strdup instead of assigning a literal.Raghavendra Talur2014-02-161-1/+1
| | | | | | | | | | | Fix for coverity bug CID:1124340 Change-Id: Ibf8700bdeaaddade02e63470a773c5fe2aabc645 BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6984 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: Fix a crash due to NULL dereferenceVijay Bellur2014-02-161-2/+2
| | | | | | | | | Change-Id: Ib2bf6dd564fb7e754d5441c96715b65ad2e21441 BUG: 1065611 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/7007 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/client: Fix the possible resource leaks.Poornima2014-02-151-7/+10
| | | | | | | | | | Change-Id: Ib86dee366f5a6f0971c6472d1fb2c32dbf7f0102 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6985 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Free dup_value when error path is taken.Ira Cooper2014-02-141-4/+8
| | | | | | | | | | | | | | | | | When the error path is taken here, the data that was allocated for dup_value is never freed. This patch frees it. Thanks to Kaleb Keithley <kkeithle@redhat.com> for his suggestions on how to fix this. Change-Id: Iad88b9ab035602d15961b46c4954d54d54e0d65e CID: 1124705 BUG: 789278 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-on: http://review.gluster.org/6780 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libgfapi: Add proper NULL checksJose A. Rivera2014-02-142-18/+44
| | | | | | | | | | | | | | | | | | Two spots check for NULL after the pointer in question has already been dereferenced. Checked for NULL (and set errno when needed) at appripriate spots, added a few NULL checks further up the stack, and some whitespace cleanup. BUG: 789278 CID: 1124800 CID: 1124805 Change-Id: I1dd4ad3f285cca36f4e3f739288f154ec120aebb Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6908 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd: Check for NULL before dereference.Jose A. Rivera2014-02-141-1/+2
| | | | | | | | | | | BUG: 789278 CID: 1124805 Change-Id: I5926a4e59790f142d65f034726c9c369c2ad7808 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6909 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/Vol-Locks : Moving globals into glusterd priv and code refactoringAvra Sengupta2014-02-1410-102/+295
| | | | | | | | | | | | | | | | | | | | | | Moved globals(vol_lock and txn_opinfo dicts and global_txn_id) into glusterd priv Moved glusterd_op_send_cli_response() out of gd_unlock_op_phase as gd_unlock_op_phase and glusterd_clear_txn_opinfo should only be called if the txn id has been successfully generated. The cli resp should be sent irrespective of that. Changed log levels from ERROR to WARNING for some volume lock logs where the logs are expected and is not an error Added logs for better transparency of transaction ids. Change-Id: Ifac9b23aa9f1648c9ae252cfd3ac50bb2ed46728 BUG: 1011470 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/6976 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* add build-gfid option to enable pgfid tracking ...Krishnan Parthasarathi2014-02-144-4/+55
| | | | | | | | | | | .. for inode to pathname mapping Change-Id: I0486d85b02e86d739fc1d8ea16d118fb666abf60 BUG: 1064863 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6989 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Removed the old and unused non-Glupy Python bindings codeJustin Clift2014-02-138-540/+0
| | | | | | | | BUG: 1064096 Change-Id: Ifd34f46f0f0b45bbc27d35953e6ecbca36753886 Signed-off-by: Justin Clift <jclift@redhat.com> Reviewed-on: http://review.gluster.org/6980 Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* Clean up some weirdness with the gf_resolve inet definesJustin Clift2014-02-132-8/+2
| | | | | | | | Change-Id: I6bf6101aa0b5d6624891a8ebed2ac1fec2e11e1c Reviewed-on: http://review.gluster.org/6948 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncops: add support for custom PIDAnand Avati2014-02-132-2/+49
| | | | | | | | | | | | AFR self-heal needs to issue syncops with special PID. Extend the custom UID/GID support to include custom PIDs Change-Id: I736c0e177f862b029f203acc87f9eb46c8cb839b BUG: 1021686 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* storage/posix: calculate checksum only over read dataAnand Avati2014-02-131-2/+2
| | | | | | | | | | | | | | If the last block of a file is not aligned to the requested size, checksum is calculated over junk data in the iobuf. Or it could be zeroes, resulting in a spurious checksum match in self-heal. Change-Id: I41422e08de90013dabfc348ec6fbb8ecdd4f8fb8 BUG: 1021686 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6932 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* core: add @xdata parameter to syncop_[f]removexattr()Anand Avati2014-02-136-13/+15
| | | | | | | | | | | To be used in afr metadata self-heal Change-Id: I8dac4b19d61e331702427eeb5b606aab3d20b328 BUG: 1021686 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6941 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* Use libglusterfs wrapper to make setxattr portableEmmanuel Dreyfus2014-02-131-3/+4
| | | | | | | | | BUG: 764655 Change-Id: I332922521bef5684f18d5f7b226cb36d5303ae47 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6982 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/stripe: Fix the possible resource leaks.Poornima2014-02-121-4/+5
| | | | | | | | | Change-Id: Ic6fbc8c843f80edd7458d15229eb72a5609973a5 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6986 Reviewed-by: Amar Tumballi <amarts@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* xlators/rot-13: Free memory when returning on error.Christopher R. Hertel2014-02-121-0/+2
| | | | | | | | | | | | | | Added GF_FREE() calls to free allocated memory that was left behind otherwise. BUG: 789278 CID: 1124725 Change-Id: I5aa086d6b13a93e14de50e47e02b0e9813af9572 Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6940 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fix possible leaks on failure code pathSantosh Kumar Pradhan2014-02-122-1/+22
| | | | | | | | | | | | | | | Fix the memory leaks in socket and glusterd in failure code paths reported by Coverity. CIDs: 1124777, 1124781, 124782 Change-Id: I63472c6b5900f308f19e64fc93bf7ed2f7b06ade BUG: 789278 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6954 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep: Fix gsyncd restart issue.Kotresh H R2014-02-121-7/+111
| | | | | | | | | | | | | | | | | | | | | | | New function 'glusterd_gsync_op_already_set' is written which compares the geo-rep configuration value in gsync.conf with the one sent from cli. The generic function is written to compare op_value for any op_name sent from cli as this issue can happen with any configuration setting other than use-tarssh also. This routine is used to avoid restart of gsyncd if the configuration value is set to same as in gsyncd.conf. Also added error checking when glusterd_gsync_configure fails. Earlier, eventhough 'glusterd_gsync_configure' fails, error was not getting catched and success message was shown. Change-Id: If4dcd0ffc09e6e67c79ba86238f03eff1b7c7645 BUG: 1060797 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/6897 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-cache: Fix dereferencing of freed pointerPoornima2014-02-121-2/+6
| | | | | | | | | Change-Id: Ic4276c6d76c36f4eb77282dc06d2b8b212b58f08 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6822 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/stripe: Fix the resource leaks.Poornima2014-02-121-0/+2
| | | | | | | | | Change-Id: Ieb1fe112686f4932a6272a0117c1373e736d5b4e BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6951 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: CFLAGS was being polluted by python flagsLuis Pabon2014-02-122-23/+35
| | | | | | | | | | | | | | | | | The CFLAGS were being polluted by the python test for glupy. The test also sets CFLAGS -NDEBUG even when passing --enable-debug to configure. To fix it, the patch now saves the necessary python flags into new makefile flags which can now be used by the glupy Makefile.am. BUG: 1063541 Change-Id: I8546a64b8ad4fe9318a97fb6a2f0c36087be1b29 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6957 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* gfapi: Set log level to GF_LOG_NONE after closing log file in glfs_finiPoornima2014-02-121-3/+4
| | | | | | | | | | | | | | | | | | | Currently any logs that are logged after calling glfs_fini will appear on stderr. Ideally to the end of the glfs_fini all the operations will be complete and there should be no further logging. But it appears that the client translator is still up and prints some log messages even after calling glfs_fini. In this patch the log level is set to GF_LOG_NONE once the log file is closed. This fix is not required if wait for "CHILD_DOWN" event is implemented in glfs_fini. Change-Id: Idde80e9a89f3a5264d02b7e6fc2a84d67550b20a BUG: 1054696 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6726 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount.glusterfs: backward compatible option for root-squashingRaghavendra Bhat2014-02-121-0/+7
| | | | | | | | | Change-Id: I74fa6686cff84cfad4a2587a0061e6bb2beea081 BUG: 954057 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/6975 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: perform chmod after chown.Ravishankar N2014-02-112-6/+51
| | | | | | | | | | | | | | | | | | | | | | | Problem: When a replica brick is added to a volume, set-user-ID and set-group-ID permission bits of files are not set correctly in the new brick. The issue is in the posix_setattr() call where we do a chmod followed by a chown. But according to the man pages for chown: When the owner or group of an executable file are changed by an unprivileged user the S_ISUID and S_ISGID mode bits are cleared. POSIX does not specify whether this also should happen when root does the chown(). Fix: Swap the chmod and chown calls in posix_setattr() Change-Id: I094e47a995c210d2fdbc23ae7a5718286e7a9cf8 BUG: 1058797 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/6862 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gNFS: Coverity fix for possible memory leakSantosh Kumar Pradhan2014-02-111-3/+7
| | | | | | | | | | | | | | | | | | | | In nfs_gfid_dict(), if dict_new() fails, the control goes to out: block and dyngfid resource (dynamically allocated by GF_CALLOC()) is leaked. Add a validation for memory returned by GF_CALLOC() Drop unnecessary "goto" statements Coverity CID: 1124764 Change-Id: Idda7923cc1c32260b3353f7a9141aa1cf43e4fe1 BUG: 789278 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6852 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* dht: Modified dht-statedump to print all subvolume_statusVenkatesh Somyajulu2014-02-111-12/+33
| | | | | | | | | | | Change-Id: I1aae33472bd15fc2bd7a170544f2994534fdf246 BUG: 1058204 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/6800 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs/client_t.c: rhel5/i386 atomic, link failureKaleb S. KEITHLEY2014-02-111-40/+26
| | | | | | | | | | | RHEL5's gcc-4.1.2 on i386 does not have built-in atomic __sync_*() Change-Id: If7b1027570a6c8c962392871b002be0a37258ed3 BUG: 1060703 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6894 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/server: do not do root-squashing for trusted clientsRaghavendra Bhat2014-02-1017-9/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * As of now clients mounting within the storage pool using that machine's ip/hostname are trusted clients (i.e clients local to the glusterd). * Be careful when the request itself comes in as nfsnobody (ex: posix tests). So move the squashing part to protocol/server when it creates a new frame for the request, instead of auth part of rpc layer. * For nfs servers do root-squashing without checking if it is trusted client, as all the nfs servers would be running within the storage pool, hence will be trusted clients for the bricks. * Provide one more option for mounting which actually says root-squash should/should not happen. This value is given priority only for the trusted clients. For non trusted clients, the volume option takes the priority. But for trusted clients if root-squash should not happen, then they have to be mounted with root-squash=no option. (This is done because by default blocking root-squashing for the trusted clients will cause problems for smb and UFO clients for which the requests have to be squashed if the option is enabled). * For geo-replication and defrag clients do not do root-squashing. * Introduce a new option in open-behind for doing read after successful open. Change-Id: I8a8359840313dffc34824f3ea80a9c48375067f0 BUG: 954057 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4863 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Volume locks and transaction specific opinfosAvra Sengupta2014-02-1026-250/+2329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch we are replacing the existing cluster-wide lock taken on glusterds across the cluster, with volume locks which are also taken on glusterds across the cluster, but are volume specific. So with the volume locks we are able to perform more than one gluster operation at the same time, as long as the operations are being performed on different volumes. We maintain a global list of volume-locks (using a dict for a list) where the key is the volume name, and which saves the uuid of the originator glusterd. These locks are held and released per volume transaction. In order to acheive multiple gluster operations occuring at the same time, we also separate opinfos in the op-state-machine, as a part of this patch. To do so, we generate a unique transaction-id (uuid) per gluster transaction. An opinfo is then associated with this transaction id, which is used throughout the transaction. We maintain a run-time global list(using a dict) of transaction-ids, and their respective opinfos to achieve this. Upstream Feature Page: http://www.gluster.org/community/documentation/index.php/Features/glusterd-volume-locks Change-Id: Iaad505a854bac8de8f83beec0357eb6cde3f7ea8 BUG: 1011470 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/5994 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep: Config file upgradeAravinda VK2014-02-102-1/+55
| | | | | | | | | | | | | | | | | | | When old config file is used with new geo-rep, config item like 'georep_session_working_dir' was missing in old config file. With this patch geo-rep sets the default value for new items. Following config options supported: - georep_session_working_dir - gluster_params - ssh_command_tar BUG: 1036539 Change-Id: I389c62e749f3b567f9ecf96d4b41367ef962c025 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/6934 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* performance/io-cache: Fix for the bugs reported by coverityPoornima2014-02-101-0/+2
| | | | | | | | | | Change-Id: I24c10d874511a2f24dda2fb84d31f5074da1616f BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6869 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: Fix NULL dereference error reported by coverity.Poornima2014-02-101-0/+4
| | | | | | | | | Change-Id: I48c1ebcb3261fa5da721e5b48d17c6c873df256d BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6907 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* spec: geo-rep: Include hooks and upgrade scriptsAravinda VK2014-02-102-0/+30
| | | | | | | | | | | | | | Added hook script S56glusterd-geo-rep-create-post.sh to %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/ and upgrade scripts added to %{_datadir}/glusterfs/scripts/ BUG: 1036539 Change-Id: Id114b827824e55516181ab8f564d419c258be3e2 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/6926 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: goto statements may cause exit before memory is freed.Christopher R. Hertel2014-02-101-9/+28
| | | | | | | | | | | | | | | | | | | | | | | Memory is allocated for pump_priv and for pump_priv->resume_path, but if an error is detected the references to that memory go out of scope and the memory is never freed. This patch assures that the memory is freed on error. Patchset 2: These are Kaleb's recommended changes which, compared to my original fix, are more comprehensive and provide a more complete resolution to the memory leakage bugs in this function. The bug reported by Coverity was limited to a single memory allocation. BUG: 789278 CID: 1124737 Change-Id: Ie239e3b5d28d97308bf948efec6a92f107bc648b Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6929 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Set hard and soft timeouts to 0 to ensure enforcement.Vijay Bellur2014-02-091-0/+4
| | | | | | | | | Change-Id: Ib233d00ea73e4141a404a2abadf9f6f81896c14d BUG: 1038598 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6942 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota : changes in quota list commandAnuradha2014-02-083-28/+139
| | | | | | | | | | | | | | | Changes are made to quota list command such that it also shows whether hard-limit and soft-limit are exceeded or not. A test case to check the same is added. Change-Id: Idb365acfc5d1f2d9f3373dd5f98573d5fe87b50f BUG: 1038598 Signed-off-by: Anuradha <atalur@redhat.com> Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/6441 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: add volinfo to the list data structure in an orderVijaykumar M2014-02-085-3/+34
| | | | | | | | | | | | | | | | Currently volinfo is added at the end of the list while creating a volume. On gluster restart, readdir will not provide the ordered list and the data is populated in the same order as readdir. Solution is to insert the volinfo to the list in an order Change-Id: I1716ac6abbd7dd301a7125425fc413c6833f7a48 BUG: 1039912 Signed-off-by: Vijaykumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/6472 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* performance/quick-read: Allocated memory not freed when not used.Christopher R. Hertel2014-02-081-2/+3
| | | | | | | | | | | | | | | If memory is successfully allocated in the call to qr_content_extract(), but is not used, it is not being freed. This patch frees the allocated memory if it is not passed to qr_content_refresh(). BUG: 789278 CID: 1124735 Change-Id: I1c1f03a3b92fa26321ec6ee8822e6fa41da79875 Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6827 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: If hashed_subvol is NULL, do not failSusant Palai2014-02-081-3/+3
| | | | | | | | | | | | | | | | | | | | | Problem: With the current implementation we are allowing unlink of a file if hashed subvol is down and cached subvol is up. For the above op to work we should have the info of hashed_subvol. But incase we do remount of the volume we will have a zeroed layout for the disconnected subvol(start=0, stop=0, err=ENOTCONN) which will result into hashed_subvol being NULL and failing unlink op. Solution: Dont fail if hashed_subvol is NULL. Check cached subvol and unlink in cached subvol. The linkto file in the hashed subvol can be remove later. Change-Id: Ic1982c15c8942a1adcb47ed0017d2d5ace5c9241 BUG: 983416 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/6851 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Increase Expect Within time so that valid patches passRaghavendra Talur2014-02-081-1/+1
| | | | | | | | | | | | | In some cases it is observed that fix-layout takes more than 20 seconds to complete, causing test to fail. Increasing it to a safe value of 30. Change-Id: I4ac8769e3a1594240ecda96700944ab3702daacc BUG: 1004744 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6855 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/marker-quota: more stringent error handling in rename.Raghavendra G2014-02-082-11/+19
| | | | | | | | | | | | | | | If an error occurs and op_errno is not set to non-zero value, we can end up in loosing a frame resulting in a hung syscall. This patch adds code setting op_errno appropriately in storage/posix and makes marker to set err to a default non-zero value in case of op_errno being zero. Change-Id: Idc2c3e843b932709a69b32ba67deb284547168f2 BUG: 833586 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/5032 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs..xlator.c: Close a library handle.Christopher R. Hertel2014-02-081-0/+3
| | | | | | | | | | | | | | Simple fix to ensure that a library handle is closed if it is not actually used. BUG: 789278 CID: 1124783 Change-Id: Ia3e734c46e1ad8c97cb8cc7f1a5616606bfbc550 Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6933 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libgfapi: Don't ignore return value of glfs_loc_touchup()Jose A. Rivera2014-02-081-1/+1
| | | | | | | | | | | | BUG: 789278 CID: 1124353 Change-Id: I7d2958cbc98faf45d723f17868c515762c50c618 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6931 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Fix memory leak.Poornima2014-02-081-0/+1
| | | | | | | | | Change-Id: I811d104684905a5a9a794cde8e925bd1a97f6546 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6906 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: fix crash in error handling after building ancestry.Raghavendra G2014-02-081-1/+1
| | | | | | | | | Change-Id: Ifbebf1aa496d49a6c4bb30258b83aaf9792828e5 BUG: 1059833 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6923 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fix a memory leak.Raghavendra Talur2014-02-081-0/+2
| | | | | | | | | | | | errmsg may have malloc'ed memory, free it before leaving function. Change-Id: I4ab3b9db7a48a5e256eb8a08b8ab49818ce6ca1b BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6902 Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gverify: Correcting variable namesAvra Sengupta2014-02-071-2/+2
| | | | | | | | | | Change-Id: I851a50e0ebb7554b821fb591375bb6ebd6240ade BUG: 1036539 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/6939 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/index: Close directories left open on error.Christopher R. Hertel2014-02-071-3/+17
| | | | | | | | | | | | | | | | | | | | | | Two directory streams are opened, but not always closed if the function exits with an error. This patch aims to ensure that the directories are closed in call cases. Some return values may be explicitly discarded. This is done to avoid having a successful call to closedir() overwrite the value of ret. Also, the errno value is preserved in case a calling function needs to check errno. BUG: 789278 CID: 1124710 CID: 1124711 Change-Id: I6bf3b5c9c6a1ec9a99cc9178243ea98572c2bac2 Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6883 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* quick-read: Remove unref of a freed iobuf.Poornima2014-02-071-1/+0
| | | | | | | | | Change-Id: Ie21414658db571c9a483730b6d5e8997f04255c1 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6823 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>