summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
Commit message (Collapse)AuthorAgeFilesLines
* storage/posix: Add limit to number of hard linksShreyas Siravara2017-12-081-0/+5
| | | | | | | | | | | | Summary: Too may hard links blow up btrfs by exceeding max xattr size (recordign pgfid for each hardlink). Add a limit to prevent this explosion. > Reviewed-on: https://review.gluster.org/18232 > Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Fixes gluster/glusterfs#370 Signed-off-by: ShyamsundarR <srangana@redhat.com> Change-Id: I614a247834fb8f2b2743c0c67d11cefafff0dbaa
* glusterd: Allow volume stop to succeed if certain processes are already deadShreyas Siravara2017-12-081-4/+14
| | | | | | | | | | | | | | Summary: - Sometimes a the process that glusterd is trying to kill is already dead. - In that case, if it can't find the pid, it should just continue on and not fail the entire operation. Change-Id: Ic96952a8d31927446f648830ede6ccd82512663f BUG: 1522968 Reviewed-on: https://review.gluster.org/18234 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Signed-off-by: Ana M. Neri <amnerip@fb.com>
* Fix management client deadlockRichard Wareing2017-12-071-1/+6
| | | | | | | | | | | | | | | | | | | Ping notify is a NOOP for management daemons Reviewers: sshreyas Reviewed By: sshreyas FB-commit-id: ec30b68 Change-Id: I8e121aaaa3ad268e5df057e03aa4b37a403c9ea0 BUG: 1522968 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: https://review.gluster.org/16858 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
* glusterd: Free up svc->conn on volume deleteAtin Mukherjee2017-12-071-0/+5
| | | | | | | | | | Daemons like snapd, tierd and gfproxyd are maintained on per volume basis and on a volume delete we should destroy the rpc connection established for them. Change-Id: Id1440e39da07b990fdb9b207df18da04b1ca8014 BUG: 1522775 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* storage/posix : options to override umaskSubha sree Mohankumar2017-12-021-1/+21
| | | | | | | | | | | | | | | | | | | | | Options "create-mask" and "create-directory-mask" are added to remove the mode bits set on a file or directory when its created. Default value of these options is 0777. Options "force-create-mode" and "force-create-directory" sets the default permission for a file or directory irrespective of the clients umask. Default value of these options is 0000. Command to set option: volume set <volume name> storage.<option-name> <value> The valid value range from 0000 to 0777. Updates #301 Change-Id: Ia33d13f2117202ca55a056c747ccc3674eb8bae1 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* glusterd:buffer_size_warning coverity fixesSubha sree Mohankumar2017-12-021-0/+6
| | | | | | | | Fixes Issues :15,17,18,19,24,38 Change-Id: Ib09d319308e4ef7dfbdd5e49e16064d4f55a54f9 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* posix: Convert posix_fs_health_check asynchrnously to save timestampMohit Agrawal2017-12-011-0/+5
| | | | | | | | | | | Problem: Sometime posix_fs_health_check thread is blocked on write/read call while backend device deleted abruptly. Solution: To resolve it convert code to update timestamp asynchrnously. BUG: 1501132 Change-Id: Id68ea6a572bf68fbf437e1d9be5221b63d47ff9c Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Tier: Stop tierd for detach starthari gowtham2017-12-017-173/+158
| | | | | | | | | | | | | | | | | | | Problem: tierd was stopped only after detach commit This makes the detach take a longer time. The detach demotes the files to the cold brick and if the promotion frequency is hit, then the tierd starts to promote files to hot tier again. Fix: stop tierd after detach start so the files get demoted faster. Note: the is_tier_enabled was not maintained properly. That has been fixed too. some code clean up has been done. Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: I532f7410cea04fbb960105483810ea3560ca149b BUG: 1446381
* cluster/ec: Modify OP_VERSION to 4.0.0 for stripe cache optionAshish Pandey2017-11-291-1/+1
| | | | | | Change-Id: I991eaeb979497a1bf056b5871284274f959f36f2 BUG: 1471753 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* glusterd: revert coverity fix for freeing key_dupAtin Mukherjee2017-11-291-1/+0
| | | | | | | | | key_dup can't be freed here as the same is referenced at the gd_mgmt_v3_unlock_timer_cbk. Change-Id: I85667f98c82d1acebcce59137dfc0dd1ca93b4eb BUG: 789278 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* posix: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for storage.reserveMohit Agrawal2017-11-291-1/+1
| | | | | | | | | | | Problem: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for option storage.reserve Solution: Actually feature was merged in 3.13.0 branch so GD_OP_VERSION needs to change from 3_12_0 to 3_13_0 BUG: 1518508 Change-Id: I3890a3e921847d896465ce456fee003efaeb0c61 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* snapshot : snapshot creation failed after brick reset/replaceSunny Kumar2017-11-283-18/+9
| | | | | | | | | | | | Problem : snapshot creation was failing after brick reset/replace Fix : changed code to set mount_dir value in rsp_dict during prerequisites phase i.e glusterd_brick_op_prerequisites call and removed form prevalidate phase. Signed-off-by: Sunny Kumar <sunkumar@redhat.com> Change-Id: Ief5d0fafe882a7eb1a7da8535b7c7ce6f011604c BUG: 1512451
* afr: coverity fixesRavishankar N2017-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | 1.afr_discover_do: COPY_PASTE_ERROR 2.afr_fav_child_reset_sink_xattrs_cbk: REVERSE_INULL 3.afr_fop_lock_proceed: UNUSED_VALUE 4.afr_local_init: CHECKED_RETURN 5.afr_set_split_brain_choice: REVERSE_INULL 6.__afr_inode_write_finalize: FORWARD_NULL 7.afr_refresh_heal_done: REVERSE_INULL 8.afr_xl_op:UNUSED_VALUE 9.afr_changelog_populate_xdata: DEADCODE 10.set_afr_pending_xattrs_option: RESOURCE_LEAK Note: RESOURCE_LEAK complaints about afr_fgetxattr_pathinfo_cbk, afr_getxattr_list_node_uuids_cbk and afr_getxattr_pathinfo_cbk seem to be false alarms. Change-Id: Ia4ca1478b5e2922084732d14c1e7b1b03ad5ac45 BUG: 789278 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* features/worm: new config option to manage deletion of Worm files.Vishal Pandey2017-11-201-0/+8
| | | | | | | | | | | | | | | | | | | | Add a new configuration option worm-files-deletable to file-level Worm in order to control behaviour of Worm files upon deletion. Steps to Test: 1. Add all the configuration options to a volume to activate file-level-worm 2. Option features.worm-files-deletable is set to 1 by default. 3. Create a new file and wait for the retention time to expire. 4. After retention time expires, do an truncate, rename, unlink, link or write to send the file in Worm state. 5. After that do `rm -f filename`. 6. The file is successfully removed. 7. Repeat from step 2 by setting features.worm-files-deletable 0. This time deletion should not be successful. Change-Id: Ibc89861ee296e065330b93a9f9606be5da40af31 BUG: 1508898 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* tier/glusterd: coverity issues in glusterd-tier.chari gowtham2017-11-171-3/+13
| | | | | | | | | | | | Coverity issues fixed in this patch: 254, 256, 295, 791, 546 from: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/ master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I44b7d307a3434040125d8b1d6fb18221f30f678d BUG: 789278 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* glusterd: Fix coverity issues in handshake moduleSanju Rakonde2017-11-151-10/+6
| | | | | | | | This patch fixes coveruty issues 737,738,172,188,728,198,235,35. Change-Id: I632ddc5edbfb03bc81ce27f02886b8e262c1d946 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: Fix coverity issues in glusterd-handler.cSamikshan Bairagya2017-11-151-9/+26
| | | | | | | | | | | Fixes get-state CLI related coverity issues 477, 511, 515, 523, 526 and 527 from the report at [1] [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: Ieb6f64c9035b4d9338d9515de003d607b7a4e9bc BUG: 789278 Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
* glusterd: checked_return coverity fixKartik_Burmee2017-11-151-1/+1
| | | | | | | | | | | | function: glusterd_store_retrieve_options issue: Calling "gf_store_iter_destroy" without checking return value fix: typecasted the return value of the function to void Change-Id: I6dc4f4308b1eca8d6ee85834a1530ff356c73898 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* cluster/ec: Fix op-version for disperse.other-eager-lockXavier Hernandez2017-11-141-1/+1
| | | | | | | | | The op-version used for the new option was wrong. It has been set to 3.13.0. Change-Id: I88fbd7834e4a8018c8906303e734c251e90be8cf BUG: 1502610 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* glusterd: dead_code coverity fixKartik_Burmee2017-11-141-3/+0
| | | | | | | | | | | | issue: Execution cannot reach this statement: "rsp.op_errno = gf_errno_to_...". function:__server_event_notify fix: removed the if statement and the corresponding actions. Also, the variable was not being used anywhere else, so removed its declaration as well Change-Id: I85259e276c482cc9c98b1a829426bcec7412ce3f BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: DEADCODE coverity fixSanju Rakonde2017-11-141-8/+0
| | | | | | | | | | | Problem: execution cannot enter into if block since the condition !address is always false. Fix: removing if block solves it. Change-Id: I47b4beca7bdc095900b46e3f5a5cb9629aa2a4d7 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: dead code coverity fixKartik_Burmee2017-11-141-2/+0
| | | | | | | | | | | | | | | | function: glusterd_volume_rebalance_use_rsp_dict problem: Execution cannot reach this statement: "goto out;" fix: removed the condition 'if(!ctx_dict)' and the corresponding action 'goto out;' because it will never be executed. reason: if the execution reaches this condition, then the value of '!ctx_dict' will always be false otherwise the execution will reach the 'out' label, skipping the execution of this conditional statement. html link of issue: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-11-10-0f524f07/html/1/99glusterd-utils.c.html#error Change-Id: I7ab6b2386bb01c54edd872f9f83bb8d2a4cd499f BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: checked_return coverity fixKartik_Burmee2017-11-141-1/+1
| | | | | | | | | | issue: Calling "recursive_rmdir" without checking return value fix: typecasted return value of function 'recursive_rmdir' to void Change-Id: Ie95c2a2c503bb247afa69823d0043c3af5e036e8 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: buffer_size_warning coverity fixKartik_Burmee2017-11-131-1/+1
| | | | | | | | | | | | | | function: glusterd_import_volinfo problem: Calling strncpy with a maximum size argument of 256 bytes on destination array "new_volinfo->parent_volname" of size 256 bytes might leave the destination string unterminated. fix: The third argument of strncpy specifies the number of characters to be copied from the source string to the destination string. To make sure that the final string in destination is always null terminated, we copy 1 less character than the total capacity of the destination array and the last element of the array will be filled by '/0' automatically by the strncpy function. html link of issue: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-11-10-0f524f07/html/1/39glusterd-utils.c.html#error Change-Id: I76b0d10e6a932b0885531c9be3c4f4ce7239f3e1 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: Validate changelog on geo-rep volumeKotresh HR2017-11-122-1/+62
| | | | | | | | | If geo-rep is configured on volume, don't allow to disable changelog. Change-Id: I7d1ba8b2939c8fe6ee6c59fb923d9aa1bdab553c BUG: 1503227 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: PW.INCLUDE_RECURSION coverity fixSanju Rakonde2017-11-122-1/+2
| | | | | | | | | | | | | | This patch fixes coverity issue 421 Problem: #include file "glusterd-utils.h" includes itself, glusterd-utils.h -> glusterd-peer-utils.h -> glusterd-utils.h Fix: include of glusterd-utils.h into glusterd-peer-utils.c instead of glusterd-peer-utils.h. Change-Id: I164732dfb1f64636577765124ddc5361ff0f1cc5 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: few coverity fixes in glusterd-handler.cSanju Rakonde2017-11-121-6/+15
| | | | | | | | This patch fixes coverity issues 695,555,263 Change-Id: I3577cbc793b6652b24cc719037db2bdd5e27f196 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* mgmt/glusterd glusterd coverity fixesAshish Pandey2017-11-111-51/+61
| | | | | | | | | | | | | | | | Coverity ID: 498 Coverity ID: 756 Coverity ID: 764 Coverity ID: 553 Coverity ID: 562 Coverity ID: 765 Coverity ID: 731 Coverity ID: 545 Coverity ID: 781 Change-Id: I5922db462ba3f71397ae097d7e56739c335114d3 BUG: 789278 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* cluster/ec: Keep last written strip in in-memory cacheAshish Pandey2017-11-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Consider an EC volume with configuration 4 + 2. The stripe size for this would be 512 * 4 = 2048. That means, 2048 bytes of user data stored in one stripe. Let's say 2048 + 512 = 2560 bytes are already written on this volume. 512 Bytes would be in second stripe. Now, if there are sequential writes with offset 2560 and of size 1 Byte, we have to read the whole stripe, encode it with 1 Byte and then again have to write it back. Next, write with offset 2561 and size of 1 Byte will again READ-MODIFY-WRITE the whole stripe. This is causing bad performance because of lots of READ request travelling over the network. There are some tools and scenario's where such kind of load is coming and users are not aware of that. Example: fio and zip Solution: One possible solution to deal with this issue is to keep last stripe in memory. This way, we need not to read it again and we can save READ fop going over the network. Considering the above example, we have to keep last 2048 bytes (maximum) in memory per file. Change-Id: I3f95e6fc3ff81953646d374c445a40c6886b0b85 BUG: 1471753 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* quota: fixes issue in quota.conf when setting large number of limitsSanoj Unnikrishnan2017-11-091-12/+33
| | | | | | | | | | | | | | | Problem: It was not possible to configure more than 7712 quota limits. This was because a stack buffer of size 131072 was used to read from quota.conf file. In the new format of quota.conf file each gfid entry takes 17bytes (16byte gfid + 1 byte type). So, the buf_size was not a multiple of gfid entry size and as per code this was considered as corruption. Solution: make buf size multiple of gfid entry size Change-Id: Id036225505a47a4f6fa515a572ee7b0c958f30ed BUG: 1510940 Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
* glusterd: display gluster volume status, when quorum type is serverSanju Rakonde2017-11-091-0/+6
| | | | | | | | | | | | | Problem: when server-quorum-type is server, after restarting glusterd in the node which is up, gluster volume status is giving incorrect information. Fix: check whether server is blank, before adding other keys into the dictionary. Change-Id: I926ebdffab330ccef844f23f6d6556e137914047 BUG: 1511339 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* Coverity Issue: PW.INCLUDE_RECURSION in several filesGirjesh Rajoria2017-11-0912-13/+0
| | | | | | | | | | | | | | Coverity ID: 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 423, 424, 425, 426, 427, 428, 429, 436, 437, 438, 439, 440, 441, 442, 443 Issue: Event include_recursion Removed redundant, recursive includes from the files. Change-Id: I920776b1fa089a2d4917ca722d0075a9239911a7 BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* snapshot: fix coverity issue 'UNREACHABLE'Sunny Kumar2017-11-091-34/+1
| | | | | | | | | | | | | | | | Problem : In glusterd-snapshot-utils.c:2778 code path is unreachable as it was intended for n-way replication snapshot support. Fix : Removed code now, will revert back this change in future once we support n-way replication in snapshot. This patch fixes coverity issue 687 from [1]. [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I163f318e62a7e84d211d9930dedee6587d37b2a0 BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd: restart the brick if qorum status is NOT_APPLICABLE_QUORUMAtin Mukherjee2017-11-091-1/+2
| | | | | | | | | | | If a volume is not having server quorum enabled and in a trusted storage pool all the glusterd instances from other peers are down, on restarting glusterd the brick start trigger doesn't happen resulting into the brick not coming up. Change-Id: If1458e03b50a113f1653db553bb2350d11577539 BUG: 1509845 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Coverity Issue FORWARD_NULL fixVishal Pandey2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | Problems: According to Coverity Issue ID 207 issues are as follows- a-) Dereferencing "this" pointer without checking if it points to NULL. b-) The IF condition on line 1750 should check if any *one* of dict, this or peerinfo is NULL and not *all*. Fix: Replace the && operator with || to check if any *one* of this, dict or peerinfo is NULL and then execute out label. Change-Id: I40057d6cade71d3862c8e491bf4137cf25dda327 BUG: 789278 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* snapshot : fix coverity issue in glusterd-snapshot.cSunny Kumar2017-11-081-1/+3
| | | | | | | | | | This patch fixes coverity issue 87 from [1]. [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I5c9c67b4dd43ebf1a5a83532cbd06178000da145 BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* snapshot: lvm cleanup during snapshot removeSunny Kumar2017-11-081-7/+13
| | | | | | | | | | | Problem : During snapshot remove lvm cleanup was skipped for deactivated snapshots by assuming that its mount point is not present. Fix : Do no skip lvm cleanup by checking active mount point. Change-Id: I856d2d647c75db8b37b7f430277daef6eb7580a8 BUG: 1509254 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* xlators/mgmt/glusterd/: Coverity Issue MISSING_BREAK in ↵Girjesh Rajoria2017-11-071-1/+2
| | | | | | | | | | | | | | glusterd_op_stage_rebalance Coverity ID: 297, 298 Issue: Event unterminated_case Added Fall through in comment. Change-Id: Ied742e64d9741cc974906921dcca80f0b738b7d6 BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* rpc: optimize fop program lookupMilind Changire2017-11-061-1/+1
| | | | | | | | | | Ensure that the fop program is the first in the program list so that there's minimum amount of time spent to search the program for the most frequently needed use case. Change-Id: I45c3dcdbf39ec90ba39d914432d13a2ace00a5ee BUG: 1509647 Signed-off-by: Milind Changire <mchangir@redhat.com>
* xlators/mgmt/glusterd/: DEADCODE in client_graph_set_rda_optionsGirjesh Rajoria2017-11-061-1/+1
| | | | | | | | | | | | | Coverity ID: 137 Issue: Event dead_error_begin: Execution cannot reach this statement: "set_graph_errstr(graph, "in...". Assigned return value of gf_string2bytesize_uint64 () to ret. Change-Id: Ibef1b1398b233f6442b23282f5ca205c1869a8ee BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* glusterd: Fix few coverity errorsPrashanth Pai2017-11-066-11/+34
| | | | | | | | | | | Fixes issues 810, 248, 491, 499, 85, 786, 811, 43, and 44 from the report at [1]. [1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ BUG: 789278 Change-Id: I27ebae2ffb2256b8eef0757d768cc46e5a942e9f Signed-off-by: Prashanth Pai <ppai@redhat.com>
* glusterd: Changed default op-version for some optionsShyamsundarR2017-11-062-6/+6
| | | | | | | | | | As 3.13 is branched at a point that includes the features that are changed with this commit, their minimum supported op-versions should also change to 3.13. Change-Id: I7ef8eccc13a16f93939c1edbff9508d1e167c5e4 BUG: 1509412 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* cluster/ec: create eager-lock option for non-regular filesXavier Hernandez2017-11-051-0/+5
| | | | | | | | | A new option is added to allow independent configuration of eager locking for regular files and non-regular files. Change-Id: I8f80e46d36d8551011132b15c0fac549b7fb1c60 BUG: 1502610 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* glusterd: coverity fixesSanju Rakonde2017-11-031-2/+15
| | | | | | | | This patch fixes coverity issue 780, 88, 692, 747, 357 Change-Id: I44b0fe9119853a6d2210507c7247e168d7c3ae0a BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd/mgmt: coverity fixesSanju Rakonde2017-11-031-12/+6
| | | | | | | | | | | | | | | | | | | This patch fixes coverity issues 179, 59. Problem: control flow won't enter into if block as volname is always NULL and return value of function synctask_barrier_init is unchecked. Fix: remove condition checking which is always resulting in false, and removing if block which is always unreachable. As a result of removal of condition checking volname became a unused variable, so remove declaration of volname. assign return valur of synctask_barrier_init to ret, if it nonzero value goto out. Change-Id: I870aeb020034e97a761e9314f7ace7573f7c520c BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* core: make gf_boolean_t a C99 bool instead of an enumJeff Darcy2017-11-031-1/+3
| | | | | | | | | | | | This reduces the space used from four bytes to one, and allows new code to use familiar C99 types/values interoperably with our old cruft. It does *not* change current declarations or code; that will be left for a separate - much larger - patch. Updates: #80 Change-Id: I5baedd17d3fb05b38f0d8b8bb9dd62824475842e Signed-off-by: Jeff Darcy <jdarcy@fb.com>
* glusterd: UNUSED VALUE coverity fixSanju Rakonde2017-11-021-0/+2
| | | | | | | | | ret is overwritten before it is used, adding a line for checking its value solves it. Change-Id: I4ac4ad33bc236d9294da64b19d16b3bc9bb8807b BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: PW.INCLUDE_RECURSION coverity fixSanju Rakonde2017-11-021-1/+0
| | | | | | | | | | | Problem: #include file "glusterd.h" includes itself, glusterd.h -> glusterd-pmap.h -> glusterd.h Fix: remove inclusion statement Change-Id: I28f2043a73a50ae2c7b670e2dece4a3f3fffbcd6 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd/pmap: UNUSED VALUE coverity fixSanju Rakonde2017-11-021-1/+0
| | | | | | | | | | | Problem: port value is assigned to p, which is overwritten before using it. Fix: remaoval of assignment line. Change-Id: If007167f37b0325c7bfe12f8e9075ca68524e40a BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: fix brick restart parallelismAtin Mukherjee2017-11-016-32/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | glusterd's brick restart logic is not always sequential as there is atleast three different ways how the bricks are restarted. 1. through friend-sm and glusterd_spawn_daemons () 2. through friend-sm and handling volume quorum action 3. through friend handshaking when there is a mimatch on quorum on friend import. In a brick multiplexing setup, glusterd ended up trying to spawn the same brick process couple of times as almost in fraction of milliseconds two threads hit glusterd_brick_start () because of which glusterd didn't have any choice of rejecting any one of them as for both the case brick start criteria met. As a solution, it'd be better to control this madness by two different flags, one is a boolean called start_triggered which indicates a brick start has been triggered and it continues to be true till a brick dies or killed, the second is a mutex lock to ensure for a particular brick we don't end up getting into glusterd_brick_start () more than once at same point of time. Change-Id: I292f1e58d6971e111725e1baea1fe98b890b43e2 BUG: 1506513 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>