summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* 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>
* glusterd: changes in 'volume create' behaviourKrutika Dhananjay2013-11-265-20/+137
| | | | | | | | | | | | | 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>
* 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-262-0/+47
| | | | | | | | | | | | 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>
* Backport of http://review.gluster.org/6262Vijaykumar M2013-11-191-7/+14
| | | | | | | | | Change-Id: Id93b6755b9a71044a7ed90ac9c779121160a75e0 BUG: 1030208 Signed-off-by: Vijaykumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/6271 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: add option to specify a different base-portKaleb S. KEITHLEY2013-11-064-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | This is (arguably) a hack to work around a bug in libvirt which is not well behaved wrt to using TCP ports in the unreserved space between 49152-65535. (See RFC 6335) Normally glusterd starts and binds to the first available port in range, usually 49152. libvirt's live migration also tries to use ports in this range, but has no fallback to use (an)other port(s) when the one it wants is already in use. libvirt cannot fix this in time for their impending release. This is submitted to gerrit to provide some minimal visibility upstream to justify hacking this change (as a temporary patch) into the glusterfs-3.4.1 RPMs for Fedora 18-21 until libvirt can fix their implementation. Change-Id: Ie77b00ac60730d1e48907dd0b38ddae92f3ac345 BUG: 987555 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6147 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> Reviewed-by: Raghavan Pichai <rpichai@redhat.com>
* dual license: update remaining files with correct license textKaleb S. KEITHLEY2013-10-3025-325/+100
| | | | | | | | | | | | | | | Sayan Saha has previously approved changing everthing to dual license but somehow we have missed changing these files. I am explicitly not updating the copyright dates as nothing else that's copyrightable has changed in these files with the license change Change-Id: I498eb648527a2c55a384df335b555bd5c6087e03 BUG: 951551 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6129 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fix storing volumes on setting global optsKaushal M2013-10-241-3/+6
| | | | | | | | | | | | | | | | Glusterd would not store all the volumes when a global options were set. When setting a global option, like 'nfs.*' options, glusterd used to modify the volinfo for all the volumes, but would store only the volinfo for the named volume. This lead to mismatch in the persisted and the in-memory representation of those volumes, which lead to problems like peers being rejected because of volume mismatches. BUG: 1012400 Change-Id: I49903baaa4c93088d7c0d03553ccab37036b5426 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/6029 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: add node uuid in rebalance and remove brick status xml outputBala.FA2013-10-241-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds node uuid in rebalance/remove-brick status xml output. Output XML will look like <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volRebalance> <op>3</op> <nodeCount>1</nodeCount> <node> <nodeName>localhost</nodeName> ==>> <id>883626f8-4d29-4d02-8c5d-c9f48c5b2445</id> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <status>3</status> <statusStr>completed</statusStr> </node> <aggregate> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <status>3</status> <statusStr>completed</statusStr> </aggregate> </volRebalance> </cliOutput> Change-Id: Ie2eb6e8d024605326d1a710b7c40ee30139f0f22 BUG: 1012296 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/6032 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Disable eager-locks on NetBSD for 3.4 branchEmmanuel Dreyfus2013-10-241-0/+10
| | | | | | | | | | | | | | As described in https://bugzilla.redhat.com/show_bug.cgi?id=1005526 eager-locks are broken on release-3.4, at least for NetBSD. This change disable them by default, leaving the admin the possibility to explicitely enable the feature if needed. BUG: 1005526 Change-Id: I6f1b393865b103ec56ad5eb5143f59bb8672f19c Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6020 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* nfs/mount3: fix crash in subdir resolutionSantosh Kumar Pradhan2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | * __mnt3_resolve_export_subdir_comp: if nfs_entry_loc_fill fails, mres->resolveloc does not contain valid data * gf_log should use 'gfid' instead of mres->resolveloc.inode->gfid * fixes a crash if program flow gets to this line Backport FIX link: http://review.gluster.org/4948 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Change-Id: I6dea17ae3f07210430a0b71bd08be6f59f739c9a BUG: 1018547 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6083 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* posix-acl: fixup extended ACL entries properlyv3.4.1rc1v3.4.1Anand Avati2013-09-252-1/+46
| | | | | | | | | | | | | | Typically when updating cached ACL from backend, we get both iatt and ACL xattrs (like lookup, readdirplus etc.) However in calls like setattr(), the mode would have updated but we receive only iatt and not the ACL xattrs. In such case we need to "spread" the effects of the changed mode properly into the cached ACL xattr ourselves. Change-Id: I23a7bc9c14722ff6848e175ed4bbe863a21ce2c9 BUG: 998967 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6002 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gNFS: avoid double fd unref in opendirSantosh Kumar Pradhan2013-09-241-3/+1
| | | | | | | | | | | | | | | | Noticed that the fd_unref was called on the fd regardless of the return value at nfs3svc_opendir_readdir_cbk(), hence removing an extra unref in the negative case in nfs_inode_opendir_cbk, which fixes the spurious fd_unref(). Back port of: http://review.gluster.org/4943 (Rajesh Amaravathi) Change-Id: Ibddf487c7890407d01befedd65eefb10cb9c989f BUG: 1011761 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/5996 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Treat migration failures due to space constraints as skippedv3.4.1qa3shishir gowda2013-09-194-5/+59
| | | | | | | | | | | | | | | | Currently rebalance/remove-brick op's display migration failed count even for files which failed due to space issues (not enough space for file, or migration leading to cluster imbalance) These will now be counted as skipped, and rebalance/remove-brick status will display the additional counter BUG: 989846 Change-Id: I4efa7ce69dd43680ff47181afed0c561954c5080 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/5977 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli,glusterd: Task parameters in xml outputKaushal M2013-09-193-7/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of 91cd0eae2cc1d96cbafa6457835f146503355238 from master This patch introduces task parameters for the asynchronus task shown in volume status. The parameters are only given for xml output. The parameters shown currently are, - source and destination bricks for replace-brick tasks ...... <tasks> <task> <type>Replace brick</type> <id>3d1a1005-9d2e-4ae0-bd62-577bc1d333a3</id> <status>1</status> <params> <srcBrick>archm:/export/test4</srcBrick> <dstBrick>archm:/export/test-replace1</dstBrick> </params> </task> </tasks> ...... - list of bricks being removed for remove-brick tasks ...... <tasks> <task> <type>Remove brick</type> <id>901c20ca-0da2-41de-8669-5f0caca6b846</id> <status>1</status> <params> <brick>archm:/export/test2</brick> <brick>archm:/export/test3</brick> </params> </task> </tasks> ...... The changes for non-xml output will be done in a subsequent patch. BUG: 916577 Change-Id: Iade8a4974aefc5ffb080553496ae5a3169055090 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5973 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Don't reset rebalance status on add-brickKaushal M2013-09-191-9/+0
| | | | | | | | | | | | | | | | | | | | | | Backport of 67c28b19355c47e96d1420405cc38753a3e5f9be from master The rebalance status was being reset to 'Not started' when add-brick was performed. This would lead to odd cases where a 'rebalance status' on a volume would show status as 'not started' but would also include the rebalance statistics. This also affected the showing of asynchronus task status in 'volume status' command. By not resetting the status prevent the above issues from happening. Since we use the running/not-running of the rebalance process as the check when performing other operations we can safely leave the rebalance stats collected on an add-brick. BUG: 1006247 Change-Id: Idade88d9e5a6f27659490b3e6d85495d426ef0a3 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5971 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: Implement forget in cbks for fuse.Vijay Bellur2013-09-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | With the introduction of inode_ctx_set in fuse as part of 2991503d014, forget cbk gets called for fuse xlator. Though nothing needs to be done inf forget_cbk, excessive log messages of the following kind are observed: [2013-09-16 06:09:50.758063] W [defaults.c:1331:default_forget] (-->/usr/local/lib/glusterfs/3git/xlator/mount/fuse.so(+0xa1f2) [0x7f51432781f2] (-->/usr/local/lib/libglusterfs.so.0(inode_unref+0x3c) [0x7f5144e5 816c] (-->/usr/local/lib/libglusterfs.so.0(+0x2d061) [0x7f5144e58061]))) 0-fuse: xlator does not implement forget_cbk This patch prevents such log messages from being seen. Signed-off-by: Vijay Bellur <vbellur@redhat.com> BUG: 979910 Change-Id: Ie5874138f46822b10ff4213bd1134d78330ec460 Reviewed-on: http://review.gluster.org/5932 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5975 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Calculate volume op-versions only on set/resetv3.4.1qa2Kaushal M2013-09-133-6/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5568 The volume op-versions are calculated during a volume set/reset, reading a volume from disk and importing a volume during probe or volume sync. The calculation of the volume op-version depends on the clusters op-version as some features are enabled automatically depending on the clusters op-version. We also don't store the volume op-versions persistently and don't export the volume op-versions during sync. Due to this, there can occur cases which will lead to inconsistencies in volumes in different peers. One such case is below, Consider, a cluster made up 3 peers P1, P2 and P3, operating at op-version N. The cluster has two volumes V1 and V2, which have volume op-versions N (since volume op-version cannot be greater than cluster op-version). We have, Cluster-op-version = N V1 op-version = N V2 op-version = N A set operation on V1 causes the clusters op-version to be bumped up to N+1. Assume that there exist some features that are automatically enabled on op-version N+1. The op-version of V2 remains at N as no operation has been performed on it. So, Cluster op-version = N+1 V1 op-version = N+1 V2 op-version = N Now, we probe a new peer P4. On the new peer we will have the following op-versions, Cluster op-version = N+1 V1 op-version = N+1 V2 op-version = N+1 This happens because we don't send volume op-versions during the sync after probe. P4 will freshly calculate the op-version of V2 (assuming features have been auto enabled due to the cluster op-version being N+1) as N+1. Another case is when glusterd on a peer restarts. Assume P3 was restarted, glusterd will recalculate the volume op-versions during the restore state. Again, op-version of V2 will be calculated as N+1 assuming auto enabled features. This will lead to inconsistency in the volume representation in memory and on disk, as glusterd will assume the volume contains auto enabled features, but the volfiles don't contain them as they were not regenrated. These kind of issues can be solved by calculating the volume op-version only when features are enabled and disabled (ie. during volume set/reset), persisting the volume-op-versions and exporting/importing them. BUG: 1005043 Change-Id: Id8bb05ba2a77e510739b3b1833f98b4d6d1fa4d7 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Use volume op-versions during volgenKaushal M2013-09-134-19/+14
| | | | | | | | | | | | | | | | | Backport of '3af61d6 glusterd: Use volume op-versions during volgen' from master Instead of using the cluster op-version, volume op-version is used to enable open-behind during volgen. For doing this, the volume op-versions are updated before regenerating the volfiles. BUG: 990830 Change-Id: I07e4a34004816c803fcbb3ee1ddd4b1e4c3a8006 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5831 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Update sub_count on remove brickVijay Bellur2013-09-131-0/+1
| | | | | | | | Change-Id: I7c17de39da03c6b2764790581e097936da406695 BUG: 1002556 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5902 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Allow bumping down a peer's op-version during probev3.4.1qa1Kaushal M2013-09-101-15/+9
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5715 Earlier, a peer running a higher op-version couldn't be probed into a cluster running at a lower op-version. This created issues when trying to expand an upgraded cluster. This patch changes this behaviour. The cluster no longer rejects a peer being probed if its op-version is higher than the cluster op-version. The peer will reduce its op-version if it doesn't have any volumes. If the peer contains volumes and needs to reduce its op-version, it fails the handshake and the probe fails. BUG: 1005038 Change-Id: Iabe790a9f826a4ac63d379eeeba01efcfef01f4d Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5834 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Ignore subvols with error in min-free-disk/inodesAmar Tumballi2013-09-105-17/+86
| | | | | | | | | | | | | | | | | | | Currently when selecting a alternative subvolume when hashed subvol has exceeded min-free-disk/inodes, we do not check if layouts have errors (including decommissioning). This leads to data being written to those subvolumes, and in case of decommissioning, will lead to data loss. BUG: 982919 > Original-Author: shishir gowda <sgowda@redhat.com> > Reviewed-on: http://review.gluster.org/5299 Change-Id: If301a86cf3ca5fad6529bd2e61382f9901663ba0 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/5888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/write-behind: invoke request queue processing ifRaghavendra G2013-09-101-19/+30
| | | | | | | | | | | | | | | | | | | | | we find fd marked bad while trying to fulfill lies. * flush was queued behind some unfulfilled write. * A previously wound write returned an error and hence fd was marked bad with corresponding error. * wb_fulfill_head (invocation probably rooted in wb_flush), before winding checks for failures of previous writes and since there was a failure, calls wb_head_done without even winding one request in head. * wb_head_done unrefs all the requests in list "head". * since flush was last operation on fd (and most likely last operation on inode itself), no one invokes wb_process_queue and flush is stuck in request queue for eternity. Change-Id: I3b5b114a1c401d477dd7ff64fb6119b43fda2d18 BUG: 988642 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/5883 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: release big locks while doing mountAnand Avati2013-09-101-0/+4
| | | | | | | | | | | | Else things can deadlock in getspec v/s glusterd_do_mount() Change-Id: Ie70b43916e495c1c8f93e4ed0836c2fb7b0e1f1d BUG: 997576 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5881 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: save the basefd flags in the new fdRaghavendra Bhat2013-09-101-0/+1
| | | | | | | | | | | | | | Upon graph switch, the basefd's flags were not saved in the new fd created for the new graph upon which all the further requests for the open file would come. Thus posix was treating the fd as a read-only fd and was denying the write on the fds. Change-Id: I781b62b376a85d1a938c091559270c3f242f1a2a BUG: 998352 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5880 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* io-cache: fix unsafe typcasting of pointer to uint64Anand Avati2013-09-101-1/+3
| | | | | | | | | | | | | The typecast of pointer to uint64_t *, followed by setting of 64bit in inode_ctx_get() results in memory corruption on 32bit system. Change-Id: I32fa3bf3b853ed2690a9b9a471099a59b9d7186a BUG: 997902 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5879 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: unlock before aborting transactionAnand Avati2013-09-101-0/+2
| | | | | | | | | | | Else this results in a missing frame causing a hang Change-Id: Ib5f3dc6a3999449faa2853cee2944af2fb065a20 BUG: 1002399 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5878 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: assign layout onto missing directories tooAnand Avati2013-09-101-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | The current self-healing algorithm is ignoring missing directories for assigning new layout. When lookup() is racing against mkdir() or when self-healing a half-done mkdir(), the layout assignment split must happen based on the final number of directories, and not the currently existing number of directories (because we finish mkdir() of missing directories before hash layout assignment). Without this fix, concurrent mkdir() and lookup() will step on each others feet, create a messed up layout on disk, and end up with different in-memory layouts. Once two clients have different in-memory layouts, creation of subdirectory will not arbitrate on the same hashed subvolume and will result in GFID mismatch of the sub-directory. Change-Id: Ia47acad67c265060405984c822b4d37512b9dbb3 BUG: 907072 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5871 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* core: increase the auxillary group limit to 65536Anand Avati2013-09-093-7/+25
| | | | | | | | | | | | Make the allocation of groups dynamic and increase the limit to 65536. Change-Id: I702364ff460e3a982e44ccbcb3e337cac9c2df51 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5172 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* performance/io-threads: fix potential use after free crashBrian Foster2013-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | do_iot_schedule() enqueues the stub and kicks the worker thread. The stub is eventually destroyed after it has been resumed and thus unsafe to access after being enqueued. Though likely difficult to reproduce in a real deployment, a crash is reproducible by running a smallfile benchmark on a replica 2 volume on a single vm. Reorder the debug log message prior to the do_iot_schedule() call to avoid the crash. BUG: 989579 Change-Id: Ifc6502c02ae455c959a90ff1ca62a690e31ceafb Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/5418 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5815 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* system/posix-acl: check for the sticky bit of the parent directoryRaghavendra Bhat2013-09-091-0/+5
| | | | | | | | | | | | | | | * While creating links, check if there is sticky bit set for the parent directory and whether the sticky bit permits the user to create the link. Change-Id: Ic0d09d9ed579c4eb47462c71602a3a60cc7d3bc1 BUG: 958691 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4934 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5813 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* posix-acl: disable permission checks for fd based opsshishir gowda2013-09-091-4/+4
| | | | | | | | | | | Signed-off-by: shishir gowda <sgowda@redhat.com> Change-Id: I9d49537c2c7b51d5598b80627d61f060aaec8549 BUG: 921437 Reviewed-on: http://review.gluster.org/4671 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/5812 Reviewed-by: Anand Avati <avati@redhat.com>
* performance/open-behind: Fix fd-leaks in unlink, renamePranith Kumar K2013-09-091-0/+4
| | | | | | | | | | | Change-Id: Ia8d4bed7ccd316a83c397b53b9c1b1806024f83e BUG: 991622 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/5493 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5810 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* xlator: NULL terminate volume_options structSantosh Kumar Pradhan2013-09-092-5/+7
| | | | | | | | | | | | | | | | | | | Problem: volume_options struct for open-behind and quick-read xlators were not NULL terminated. Fix: Make them NULL terminated. Change-Id: I2615a1f15c6e5674030a219a99ddf91596bf346b BUG: 965995 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/5064 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5809 Reviewed-by: Anand Avati <avati@redhat.com>