summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fuse: fix memory leak in fuse_getxattr()v3.4.5beta1Justin Clift2014-06-251-13/+14
| | | | | | | | | | | | | | | | | The fuse_getxattr() function was not freeing fuse_state_t resulting in a memory leak. As a result, when continuous writes (run dd command in a loop) were done from a FUSE mount point, the OOM killer killed the client process (glusterfs). Manual backport of: http://review.gluster.org/#/c/5392/, provided by Martin Svec <martin.svec@zoner.cz>. BUG: 1112844 Change-Id: Ic723675c53384d48c79ad1b11b21c1b17fb56866 Reviewed-on: http://review.gluster.org/8164 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* doc: Fix peer probe deficienciesJoe Julian2014-06-201-4/+27
| | | | | | | | | | Added the command to probe the first server to assign it a hostname Change-Id: I67f35553df74718f23cd8453dc7854a44c61be11 BUG: 1095596 Reviewed-on: http://review.gluster.org/7854 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* cluster/dht: Don't do extra unref in dht-migration checksVijay Bellur2014-06-181-5/+2
| | | | | | | | | | | | | | | | | | | Problem: syncop_open used to perform a ref in syncop_open_cbk so the extra unref was needed but now syncop_open_cbk does not take a ref so no need to do extra unref. Fix: remove the extra fd_unref and let dht_local_wipe do the final unref. Change-Id: Ibe8f9a678d456a0c7bff175306068b5cd297ecc4 BUG: 961615 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/8029 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Joe Julian <joe@julianfamily.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* release-notes: 3.4.4v3.4.4beta1v3.4.4Kaleb S. KEITHLEY2014-05-251-0/+12
| | | | | | | Change-Id: I9553500016a6a56d1aaf7bc7f90249bed95fa1b1 BUG: 1095324 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7866
* core: fix Ubuntu code audit (cppcheck) resultsKaleb S. KEITHLEY2014-05-2516-55/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These block inclusion in Ubuntu Main repo. AFAICT these are false positives: [rpc/rpc-transport/rdma/src/rdma.c:3074]: (error) Address of local auto-variable assigned to a function parameter. [xlators/features/marker/utils/src/gsyncd.c:99]: (error) Memory leak: str [xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv [xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde The remainder are fixed with this change-set: [api/src/glfs-fops.c:700]: (error) Possible null pointer dereference: gio [api/src/glfs-fops.c:702]: (error) Possible null pointer dereference: frame [xlators/cluster/afr/src/afr-inode-write.c:375]: (error) Possible null pointer dereference: frame [xlators/cluster/afr/src/afr-self-heal-common.c:1522]: (error) Possible null pointer dereference: local [xlators/cluster/dht/src/dht-rebalance.c:1574]: (error) Possible null pointer dereference: ctx [xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local [xlators/mgmt/glusterd/src/glusterd-mountbroker.c:675]: (error) Possible null pointer dereference: cookieswitch [xlators/mgmt/glusterd/src/glusterd-mountbroker.c:677]: (error) Possible null pointer dereference: cookieswitch [xlators/mgmt/glusterd/src/glusterd-replace-brick.c:924]: (error) Resource leak: file [xlators/mgmt/glusterd/src/glusterd-replace-brick.c:1008]: (error) Resource leak: file [xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx [xlators/mgmt/glusterd/src/glusterd-store.c:1250]: (error) Possible null pointer dereference: handle [xlators/mgmt/glusterd/src/glusterd-utils.c:4272]: (error) Possible null pointer dereference: this [xlators/mgmt/glusterd/src/glusterd-utils.c:5113]: (error) Possible null pointer dereference: this [xlators/mount/fuse/src/fuse-bridge.c:4432]: (error) Uninitialized variable: finh [xlators/mount/fuse/src/fuse-bridge.c:2927]: (error) Possible null pointer dereference: state [xlators/mount/fuse/src/fuse-bridge.c:3226]: (error) Possible null pointer dereference: state [xlators/storage/bd_map/src/bd_map.c:1504]: (error) Possible null pointer dereference: bd_fd [xlators/storage/bd_map/src/bd_map.c:1728]: (error) Possible null pointer dereference: n_entry [xlators/storage/bd_map/src/bd_map.c:1741]: (error) Possible null pointer dereference: n_entry [xlators/performance/quick-read/src/quick-read.c:585]: (error) Possible null pointer dereference: iobuf rerunning cppcheck --force afterwards: Test code, don't care: [extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments. False positive after fix [xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local Still false positive: [xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv [xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde Not built, don't care: [xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv Change-Id: I1fb849e9c042d3a3701cb05121d413e58e73d505 BUG: 1086460 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7583 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* storage/posix: do not dereference gfid symlinks before ↵Xavier Hernandez2014-05-223-8/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | posix_handle_mkdir_hashes() Whenever a new directory is created, its corresponding gfid file must also be created. This was done first calling MAKE_HANDLE_PATH() to get the path of the gfid file, then calling posix_handle_mkdir_hashes() to create the parent directories of the gfid, and finally creating the soft-link. In normal circumstances, the gfid we want to create won't exist and MAKE_HANDLE_PATH() will return a simple path to the new gfid. However if the volume is damaged and a self-heal is running, it is possible that we try to create an already existing gfid. In this case, MAKE_HANDLE_PATH() will return a path to the directory instead of the path to the gfid. To solve this problem, every time a path to a gfid is needed, a call to MAKE_HANDLE_ABSPATH() is made instead of the call to MAKE_HANDLE_PATH(). BUG: 1099955 Change-Id: I5bcd2b3c38d172c75946f33519e057e76d960a24 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/6737 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* nfs: exit when all volumes are disabledKaleb S. KEITHLEY2014-05-141-8/+9
| | | | | | | | | | | | | | | Instead of triggering 4-5 error logs, when nfs is disabled for all volumes, exit the process. backport from 3.5 Change-Id: I191294232f5848a4a01609b477289d628cf89ba5 BUG: 1095330 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7699 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* nfs: Fix for NFS crash during blocking NLM call.Rajesh Joseph2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | Bug 990887: During a blocking NLM call NFS server is crashing. Cause: When nlm4_establish_callback function is called from nlm4svc_send_granted the cs->req->trans pointer is NULL. Thus using this pointer will result in a crash. Whereas cs->trans points to a valid transport object. NLM should use cs->trans instead of cs->req->trans. Fix: Replaced cs->req->trans with cs->trans. Backport of: http://review.gluster.org/#/c/5452/ BUG: 990887 Change-Id: I33d4b6634752333d6791b1a47ebf10c787c22120 Signed-off-by: Justin Clift <justin@gluster.org> Reviewed-on: http://review.gluster.org/7478 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* doc/release-notes: release notes for 3.4.3v3.4.3Kaleb S. KEITHLEY2014-04-021-0/+18
| | | | | Change-Id: I3fd10b57d826e1cbb9018392d8dd5a703dc2e3f7 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* storage/posix: lgetxattr called with invalid keys on the bricksv3.4.3beta2Kaleb S. KEITHLEY2014-03-241-1/+3
| | | | | | | | | | | | | | | 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... Cleaned tabs while I'm at it. Change-Id: I00bd10471c4e4caf32b8a5b38660268324aa7a10 BUG: 765202 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7005 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* dht: dht_lookup_dir_cbk should set op_errno as local->op_errnov3.4.3beta1shishir gowda2014-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Two glusterfs clients return inconsistent errnos when the bricks of the volume were down. Consider two gluster mounts. Mount 1 was done when the bricks were online. Mount 2 was done after the bricks were killed, (using the 'glusterfs' command instead of the mount script). For any request, mount 1 will return ENOTCONN, where as mount 2 will return ENOENT. This happens because for the 2nd mount, a fuse would send a lookup on '/' for any request, as it hadn't been done yet. The client xlator returns ENOTCONN, but the dht_lookup_dir_cbk changed this to ENOENT unconditionally when aggregating. So, fuse returned ENOENT, even though the errno should have been ENOTCONN. backporting http://review.gluster.org/6072 BUG: 1019095 Change-Id: Iaa40dffefddfcaf1ab7736f5423d7f9d2ece1363 Original-author: Kaushal M <kaushal@redhat.com> Signed-off-by: shishir gowda <gowda.shishir@gmail.com> Reviewed-on: http://review.gluster.org/6471 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Anand Avati <avati@redhat.com>
* libxlator: fix memleak in cluster_markerxtime_cbk and cluster_markeruuid_cbkLukas Bezdicka2014-02-201-0/+2
| | | | | | | | | Change-Id: Ide3574bf9f661b077f707990d47821feda18b1a3 BUG: 841617 Reviewed-on: http://review.gluster.org/6873 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Treat FOOL condition as split-brain for entry self-healv3.4.3alpha1Pranith Kumar K2014-02-121-0/+48
| | | | | | | | | | BUG: 1057846 Change-Id: I19051c19a54c8aab37eb7cb32dde9f7e9e77c073 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6854 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* protocol: pass the size of the data in the WRITE on-wire FOPNiels de Vos2014-02-102-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Capturing GlusterFS traffic with tcpdump and displaying it in Wireshark shows that the size of all WRITEs are 0 bytes. It seems that the attribute is not used, and the size is calculated an other way. Even if the size attribute is not used (yet), it should be set correctly to prevent confusing while debugging network traffic with Wireshark or other tools. Note that the on-wire format is not being changed with this patch. The size is already part of the structure that is exchanged between the client and server. Master-Change-Id: I9d67fe17bf203672116dea4948328e2af4004677 Master-Reviewed-on: http://review.gluster.org/6766 Change-Id: I1168461601f725021e4b12a90bbf5afc83fe1d3d BUG: 1057264 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6775 Reviewed-by: Vikhyat Umrao <vumrao@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* cluster/dht: Make sure loc has gfidPranith Kumar K2014-01-132-0/+3
| | | | | | | | | | | | | | | | | Problem: In some code paths neither loc->gfid nor loc->inode->gfid is populated which leads to EINVAL for linkfile setattr in dht_linkfile_attr_heal. Fix: Populate loc->gfid before dht_linkfile_attr_heal. BUG: 971805 Change-Id: I8e4b7510ee5c38aa9ccf5283c7165c7df25ec62b Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6691 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: the main glusterfs package should not provide glusterfs-libsNiels de Vos2014-01-071-2/+3
| | | | | | | | | | | | | | | Because of this incorrect provides, there is no requirement to update glusterfs-libs. Most users will get a newer glusterfs-libs when updating anyway, but users that manually select RPMs for updating my skip the package, which will break their system. Change-Id: I2458ff9c993dc069baf2de8d6e99aa2ede1d5969 BUG: 950083 Fedora-BUG: 1048489 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6644 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* doc: Release Notes for 3.4.2v3.4.2Vijay Bellur2014-01-031-0/+94
| | | | | | | | Change-Id: I47759c63605ff49ad13e7b805d0aaacc2d1451d9 BUG: 811311 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6639 Reviewed-by: Niels de Vos <ndevos@redhat.com>
* Updating extras/Ubuntu with latest upstart configs (BUG: 1047007)Louis Zuckerman2014-01-013-9/+10
| | | | | | | | | | Change-Id: Ia769589f6af1d7ca3577185fd4c56eb9f43b3e2e BUG: 1047007 Signed-off-by: Louis Zuckerman <me@louiszuckerman.com> Reviewed-on: http://review.gluster.org/6611 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6622
* gfapi.py: support dynamic loading of versioned librariesv3.4.2qa5Niels de Vos2013-12-247-15/+76
| | | | | | | | | | | | | | | | | | | | | | | | Currently gfapi.py only loads libraries by filename ending in ".so". On an installed system without development packages, the <lib>.so filenames are not available. ctypes.util.find_library() can be used to detect the files dynamically. In addition to this, also fixing some minor indention errors and package the library into the Python site-packages path. Python applications and libraries can now access libgfapi through 'from glusterfs import gfapi'. Change and review in the master branch: > Change-Id: I71e38dabd3ade5dcf24813bf2fc25cda91b571c6 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/5835 > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> BUG: 1005146 Change-Id: Id7665fe5140111be7bf2038454fb775c70b15993 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6581 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Ignore ENOENT errors for unlink of linkfilesAnand Avati2013-12-241-2/+4
| | | | | | | | | | | | | | | Backport of http://review.gluster.org/4971 If unlink of linkfile returns ENOENT, do not fail unlink. Proceed with unlinking of cached file. Change-Id: If7cec92b40c39d68dd9c3606c6c2c3a6bd67d27b BUG: 966848 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6586 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Revert "core: fix errno for non-existent GFID"Vijay Bellur2013-12-249-23/+12
| | | | | | | | | This reverts commit 837422858c2e4ab447879a4141361fd382645406 Change-Id: I0909f26ce088454bb14b3694b489c672286a4ae6 Reviewed-on: http://review.gluster.org/6575 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: interim fix for reverting 837422858cVijay Bellur2013-12-241-1/+1
| | | | | | | | Change-Id: I74818a03f7c5d7891561515af2fa35ea3775255c BUG: 1032894 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6582 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tests: Don't use stripe-replicate volume in bug-905864.tKrishnan Parthasarathi2013-12-241-1/+1
| | | | | | | | | | | | | | | Today, stripe doesn't follow a deterministic order in sending posix locks to its subvolume. This may lead to dead locks. To avoid intermittent test failures, we modify bug-905864.t to run on replicate volume. Change-Id: I38b72f30bc31576d3ca642f0029cc8749314b1dd BUG: 905864 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5072 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6588
* cli: Throw a warning during replace-brickPranith Kumar K2013-12-231-0/+14
| | | | | | | | | Change-Id: Iae59365f09bf64a5927edeeb4c3c052e237eee38 BUG: 1039954 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6560 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Throw a warning during creation of rdma volumes.Vijay Bellur2013-12-221-0/+20
| | | | | | | | | Change-Id: I75e5383dc7401886c6afe435488de0368050e4e4 BUG: 1017176 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6558 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mgmt/glusterd: Fix a memory leak in glusterd_is_local_addr()v3.4.2qa4Vijay Bellur2013-12-161-2/+5
| | | | | | | | | Change-Id: Id41d828e1cc56005f5e2a1e75b6d858703dd79c9 BUG: 1032122 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6518 Reviewed-by: Lukáš Bezdička <lukas.bezdicka@gooddata.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* posix: if brick-uid or brick-gid is not specified, do not setAnand Avati2013-12-161-10/+27
| | | | | | | | | | | | | | | | Current code would set owner uid/gid explicitly to 0/0 on start even if none was specified. Fix it. Change-Id: I72dec9e79c51bd1eb3af5334c42b7c23b01d0258 BUG: 1040275 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6476 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Lukáš Bezdička <lukas.bezdicka@gooddata.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6519 Reviewed-by: Lukáš Bezdička <lukas.bezdicka@gooddata.com>
* cluster/dht: Ignore decommissioned subvol in overlap optimizationshishir gowda2013-12-161-0/+7
| | | | | | | | | | | | | Change-Id: Ib727948c6e21b19fd509f258ff0aea1c5d1a84d1 BUG: 966845 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/5056 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/6517 Reviewed-by: Shishir Gowda <gowda.shishir@gmail.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Fix anomaly checkv3.4.2qa3shishir gowda2013-12-141-3/+11
| | | | | | | | | | | | | | | We were wrongly detecting holes/overlaps for already accounted errors. Additionally, sort should also handle zero'ed out layout Change-Id: Ic3d13e1d735b914f9acc01fe919bc90656baea48 BUG: 1003851 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/5762 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6469 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Del GF_READDIR_SKIP_DIRS key from dict for first_upshishir gowda2013-12-142-4/+12
| | | | | | | | | | | | | | | | | Currently, we sent GF_READDIR_SKIP_DIRS for all subvolumes if first_subvol != first_up_subvolume. Also first_up_subvolume can change with-in the life of a call and cbk. Saving the first_up_subvol in dht_local for checks. Back porting fix http://review.gluster.org/5577 BUG: 996474 Change-Id: I67b5bbe781e12812557b569b7d0a0beba4224159 Signed-off-by: shishir gowda <gowda.shishir@gmail.com> Reviewed-on: http://review.gluster.org/6468 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Do migration inprog/complete check only if ENOENTAnand Avati2013-12-132-1/+7
| | | | | | | | | | | | | | Additionally, update op_errno to the lasted failure. If failures found in complete_check, error returned would be EUCLEAN instead of the right failure (in this case ENOENT) Change-Id: Ib813867f4b817af651627b9ea07b0b09fa2b26ce BUG: 966852 Original-author: shishir gowda <sgowda@redhat.com> Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6495 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: set layout in inode ctx even if linkfile failsshishir gowda2013-12-101-1/+1
| | | | | | | | | | | | | | | | | Creating linkfile could have failed, but we dont care about linkfile for setting layout in the inode ctx (could be EEXIST etc.) So ignore @inode in cbk and pick it up from local->loc.inode Backporting http://review.gluster.org/6319 BUG: 1032859 Change-Id: Ic95e303a4c060900d041820d4faa68d1c4685b6a Original-author: Anand Avati <avati@redhat.com> Signed-off-by: shishir gowda <gowda.shishir@gmail.com> Reviewed-on: http://review.gluster.org/6470 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* distribute: Rebalance should provide even disk space distributionshishir gowda2013-12-101-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier disk space check had an issue which didn't provide the needed functionality to avoid migration when the destination had lesser available space, scenario we need to avoid is stated below : During rebalance `migrate-data` - Destination subvol experiences a `reduction` in 'blocks' of free space, at the same time source subvol gains certain 'blocks' of free space. A valid check is necessary here to avoid errorneous move to destination where the space could be scantily available. This patch provides a proper fix in place by subtracting necessary file blocks from destination and adding those blocks to source. backporting fix http://review.gluster.org/5961 BUG: 982919 Original-author: Harshavardhana <harsha@harshavardhana.net> Signed-off-by: shishir gowda <gowda.shishir@gmail.com> Change-Id: If5808eaa89e66d7bcaeee7268fe3fe5b1b56f51d Signed-off-by: shishir gowda <gowda.shishir@gmail.com> Reviewed-on: http://review.gluster.org/6461 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: backport handles to 3.4 for nfs-ganeshav3.4.2qa2Kaleb S. KEITHLEY2013-12-0415-44/+3229
| | | | | | | | | | | | nfs-ganesha-2.0 will ship shortly. It depends on the gfapi handle support, which won't otherwise be released until 3.5 sometime in 2014. Change-Id: I104d6fb275bb2c710790340fdc7d998446403026 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6394 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: handle NULL check before strlen/strcmp in fgetxattrAnand Avati2013-12-041-1/+1
| | | | | | | | | | | xattr name can legally be NULL. Handle that case without crashing. Change-Id: Ie214cb05ccd52565dc247a9234ad83ae799d3866 BUG: 1036879 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6420 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: submit RPC requests without holding big lockAnand Avati2013-12-041-4/+27
| | | | | | | | | | | | | If the endpoint of an RPC is not connected, the callback is called synchronously within rpc_clnt_submit(). Since callbacks typically hold the big lock, give up the big lock before calling rpc_clnt_submit and acquire it freshly after the call. Change-Id: Id89d8dd86c1a4012739ef4af7ea0935492b1a02b BUG: 1037849 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6414 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/client: handle network disconnect/reconnect properlyAnand Avati2013-12-031-0/+1
| | | | | | | | | | | | | if client/server state versions match, we still need to notify parent xlators of reconnection (CHILD_UP) because they were notified of CHILD_DOWN at the time of disconnection. Change-Id: I36c4bde6d8c3db9cb0c48eeb10663b56897c932e BUG: 1037267 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6397 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/dht: handle NULL check before strlen/strcmp in fgetxattrAnand Avati2013-12-031-0/+1
| | | | | | | | | | | @key can legally be NULL. Handle that case without crashing. Change-Id: Iaae293caa7eeb24afc9cd2580799173e2ce00911 BUG: 1036879 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6402 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd: fix small memory leaks in glusterfsd-mgmt.cKaleb S. KEITHLEY2013-12-011-0/+5
| | | | | | | | | | | | | | | | | E.g. In glusterfs_volfile_fetch(), req.xdata.xdata_val is allocated in dict_allocate_and_serialize() but not freed after mgmt_submit_request(). A survey of dict_allocate_and_serialize/_submit_request in glusterfsd-mgmt.c shows no consistent pattern of freeing the xdata_val and also the dict, which is a little disturbing. (Yes, clearly not every place this occurs needs to be freed the same way.) Change-Id: I8f31179ae12c05c9b5406d8e9e28110fcbfac1c7 BUG: 1036102 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6381 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Change 'volume create' to 'volume create force'v3.4.2qa1Krutika Dhananjay2013-11-261-4/+6
| | | | | | | | | | | | | | | Using 'force' when creating volumes prevents errors when creating bricks in the root partition. This fixes test bug-823081.t for bug-962226 Change-Id: I210ffda6bdc2cced4bd54755a2b44fdfd05b813b Original-author: John Smith <lbalbalba@gmail.com> BUG: 962226 Signed-off-by: John Smith <lbalbalba@gmail.com> Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6356 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: changes in 'volume create' behaviourKrutika Dhananjay2013-11-2610-27/+445
| | | | | | | | | | | | | Backport of http://review.gluster.org/4740 Note: This patch is needed by oVirt's Gluster Integration Project BUG: 948729 Change-Id: I7a9d7c36b7e15269f95637cd9061abac6f8a97de Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6355 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: write 'volume rebalance' error message in xml format whenDawit Alemu2013-11-261-4/+12
| | | | | | | | | | | | | | | | | | | | | | --xml is specified When 'volume rebalance' encounters an error the cli prints the error message in plain text independent of whether --xml is specified. This throws off client application that expect xml output (as mentioned in bz1026143). Now, if the --xml flag is supplied, the cli print 'volume rebalance' error messages in xml format. (cherry picked from commit cbb47056ab09ae09eed2550584f190fd5a42fb12) Change-Id: Iec266d56cb2ac34be0ac05a473ae3a08988cca38 BUG: 1026143 Signed-off-by: Dawit Alemu <dalemu@redhat.com> Reviewed-on: http://review.gluster.org/6250 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: set layout in inode ctx even if linkfile failsAnand Avati2013-11-261-1/+1
| | | | | | | | | | | | | Creating linkfile could have failed, but we dont care about linkfile for setting layout in the inode ctx (could be EEXIST etc.) So ignore @inode in cbk and pick it up from local->loc.inode Change-Id: I2952799d7ae0d3441b84b2ca2981afd75d7576e2 BUG: 1032859 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6358 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli: add peerid to volume status xml outputBala.FA2013-11-263-0/+57
| | | | | | | | | | | | This patch adds <peerid> tag to bricks and nfs/shd like services to volume status xml output. BUG: 955548 Change-Id: I0e58e323534a19d485c9523466bce215bd466160 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/6267 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: use proper copy to set node-nameBala.FA2013-11-261-2/+13
| | | | | | | | | | | | Previously node-name is set to point to node-uuid which could cause memory leak. This is fixed by having memory copy of node-uuid. BUG: 1012296 Change-Id: I4a7123771e2d8c31c5db4f78d022a9f4fbfc2667 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/6331 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: fix errno for non-existent GFIDAnand Avati2013-11-269-12/+23
| | | | | | | | | | | | | | | | When clients refer to a GFID which does not exist, the errno to be returned in ESTALE (and not ENOENT). Even though ENOENT might look "proper" most of the time, as the application eventually expects ENOENT even if a parent directory does not exist, not returning ESTALE results in resolvers (FUSE and GFAPI) to not retry resolution in uncached mode. This can result in spurious ENOENTs during concurrent path modification operations. Change-Id: I7a06ea6d6a191739f2e9c6e333a1969615e05936 BUG: 1032894 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6322 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: remove unnecessary call to glfs_resolve_base()Anand Avati2013-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling glfs_resolve_base() on the root inode for every resolver invocation is unnecessary and wasteful. Here are the results from running a test program which performs path based operations (creates and deletes 1000 files): Without patch: [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m4.314s user 0m1.923s sys 0m1.144s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m4.383s user 0m1.940s sys 0m1.177s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m4.339s user 0m1.863s sys 0m1.129s With patch: [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m3.005s user 0m1.162s sys 0m0.816s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m3.188s user 0m1.222s sys 0m0.867s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m2.999s user 0m1.131s sys 0m0.832s Change-Id: Id160a24f44b4dccfcfce99a6f69ddb8938523cd5 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6321 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: use native STACK_WIND for read _async() callsAnand Avati2013-11-261-10/+81
| | | | | | | | | | | | | There is little value in using synctask wrappers for async IO requests, as STACK_WIND is asynchronous by nature already. Skip going through synctask for read/write async calls. Change-Id: Ifde331d7c97e0f33426da6ef4377c5ba70dddc06 BUG: 1009134 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6325 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: Fix iobuf leaks in gfapiPoornima2013-11-261-5/+5
| | | | | | | | | | | | In glfs_readv, if syncop_readv() fails with return value <= 0 the iobref was not being unrefd which would cause iobuf leaks. Change-Id: I9850ae149e53cf75ba26f8b5f4c5446cce4b5991 BUG: 1018176 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6324 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: wake migration waiters after migrationAnand Avati2013-11-261-0/+3
| | | | | | | | | | | | | Wake call threads which are waiting on migration to complete with a cond_broadcast. Else if any call which arrives right when migration is attempted will end up hanging indefinitely. Change-Id: I7df5298f93998d9a54fb12c16654e62333018ece BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6323 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>