summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* socket: fix counting of socket total_bytes_read and total_bytes_writeZhang Huan2019-01-171-4/+4
| | | | | | Change-Id: If35d0dbae963facf00ab6bcf07c6e4d1706ed982 updates: bz#1666143 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* core: Resolve memory leak for brickMohit Agrawal2019-01-163-1/+12
| | | | | | | | | | | Problem: Some functions are not freeing memory allocated by xdr_to_genric so it has become leak Solution: Call free to avoid leak Change-Id: I3524fe2831d1511d378a032f21467edae3850314 fixes: bz#1656682 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* gfapi : making glfs_setattr/glfs_fsetattr as publicArjun2019-01-167-64/+135
| | | | | | | | | | Initially glfs_fsetattr and glfs_setattr, both functions accepted iatt as arguements but now they accept stat and later in the function the stat is being converted to iatt so that it can be passed to syncop_fsetattr/syncop_setattr. Change-Id: I41a9e0124785a32ca19ef4d492c5ed5002e66ede updates: #389 Signed-off-by: Arjun Sharma <arjsharm@redhat.com>
* posix: Convert several posix_private members to gf_atomicMohit Agrawal2019-01-155-48/+18
| | | | | | Change-Id: I629698d8ddf6f15428880bdc1501d36bc37b8ebb fixes: bz#1657607 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* core: glusterd/add-brick-and-validate-replicated-volume-options.t is crashMohit Agrawal2019-01-141-6/+2
| | | | | | | | | | | | | Problem: Sometime brick is getting crash at the time of handling pmap signin request Solution: glusterfs_mgmt_pamp_signin is using same frame to send pmap signin request so to avoid crash send signin request on separate frame Change-Id: I443f854171ec4372e8d5f84bdc576c468e92c493 fixes: bz#1665656 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* core: Resolve dict_leak at the time of destroying graphMohit Agrawal2019-01-1410-20/+117
| | | | | | | | | | | | Problem: In gluster code some of the places it call's get_new_dict to create a dictionary without taking reference so at the time of dict_unref it has become a leak Solution: To resolve the same call dict_new instead of get_new_dict updates bz#1650403 Change-Id: I3ccbbf5af07079a4fa09aad2cd0458c8625b2f06 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* cluster/afr: fix zerofill transaction.startXiubo Li2019-01-141-1/+1
| | | | | | | | This maybe one mistake when coding. Fixes: bz#1665332 Change-Id: Ia8f8dadf4a71579240ff9950b141ca528bd342b3 Signed-off-by: Xiubo Li <xiubli@redhat.com>
* glusterd: fix crashSanju Rakonde2019-01-131-3/+2
| | | | | | | | | | | | | | | | | | Problem: running "gluster get-state glusterd odir /get-state" resulted in glusterd crash. Cause: In the above command output directory has been specified without "/" at the end. If "/" is not given at the end, "/" will be added to path using "strcat", so the added character "/" is not having memory allocated. When tried to free, glusterd will crash as"/" has no memory allocated. Solution: Instead of concatenating "/" to output directory, add it to output filename. Change-Id: I5dc00a71e46fbef4d07fe99ae23b36fb60dec1c2 fixes: bz#1665038 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* features/index: Correct incorrect definition in headerVijay Bellur2019-01-111-2/+2
| | | | | | | | | s/QUIESCE/INDEX/ fixes: bz#1665363 Change-Id: I6dc4fde682cedeaa10d870267b8909af1a9449c0 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* fix 32-bit-build-smoke warningsIraj Jamali2019-01-1115-35/+39
| | | | | | | fixes: bz#1622665 Change-Id: I777d67b1b62c284c62a02277238ad7538eef001e Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* features/shard: Fix launch of multiple synctasks for background deletionKrutika Dhananjay2019-01-112-71/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: When multiple sharded files are deleted in quick succession, multiple issues were observed: 1. misleading logs corresponding to a sharded file where while one log message said the shards corresponding to the file were deleted successfully, this was followed by multiple logs suggesting the very same operation failed. This was because of multiple synctasks attempting to clean up shards of the same file and only one of them succeeding (the one that gets ENTRYLK successfully), and the rest of them logging failure. 2. multiple synctasks to do background deletion would be launched, one for each deleted file but all of them could readdir entries from .remove_me at the same time could potentially contend for ENTRYLK on .shard for each of the entry names. This is undesirable and wasteful. FIX: Background deletion will now follow a state machine. In the event that there are multiple attempts to launch synctask for background deletion, one for each file deleted, only the first task is launched. And if while this task is doing the cleanup, more attempts are made to delete other files, the state of the synctask is adjusted so that it restarts the crawl even after reaching end-of-directory to pick up any files it may have missed in the previous iteration. This patch also fixes uninitialized lk-owner during syncop_entrylk() which was leading to multiple background deletion synctasks entering the critical section at the same time and leading to illegal memory access of base inode in the second syntcask after it was destroyed post shard deletion by the first synctask. Change-Id: Ib33773d27fb4be463c7a8a5a6a4b63689705324e updates: bz#1662368 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* configure: fix the duplicate CFLAGS optionsAmar Tumballi2019-01-111-27/+11
| | | | | | updates: bz#1193929 Change-Id: I403878719a3f81fb2ea951a951f84880fb54f3cc Signed-off-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs/common-utils.c: Fix buffer size for checksum computationVarsha Rao2019-01-112-2/+37
| | | | | | | | | | | | | | Problem: When quorum count option is updated, the change is not reflected in the nfs-server.vol file. This is because in get_checksum_for_file(), when the last part of the file read has size less than buffer size, the read buffer stores old data value along with correct data value. Solution: Pass the bytes read instead of fixed buffer size, for calculating checksum. Change-Id: I4b641607c8a262961b3f3da0028a54e08c3f8589 fixes: bz#1657744 Signed-off-by: Varsha Rao <varao@redhat.com>
* doc: fix wrong description of localtime-logging in manpagesKinglong Mee2019-01-113-6/+6
| | | | | | | | | -L is the short option of --log-level, not --localtime-logging, and also, --localtime-logging does not contain an argument. Change-Id: I7e1163cb88b84ab5faecd0a65a1f7257e731d2a7 updates: bz#1664551 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* extras/systemd: Remove socket activated syslog.target and add documentation keysVijay Bellur2019-01-112-1/+4
| | | | | | | | | | Adopting patch provided by Patrick Matthäi <pmatthaei@debian.org> at: https://bugzilla.redhat.com/attachment.cgi?id=1470751 fixes: bz#1560561 Change-Id: I363a049c743c65823e6c4f153cbe20b47fcb64fb Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* core: brick process is crashed at the time of spawn threadMohit Agrawal2019-01-113-18/+35
| | | | | | | | | | | | | Problem: brick is getting crashed at the time of calling pthread_detach after just call gf_thread_create.If sufficient resources are not available on the system pthread_create returns EAGAIN (non-negative) but the caller function expects negative error code in case of failure Solution: Change the condition in caller function to avoid the crash Change-Id: Ifeaa49f809957eb6c33aa9792f5af1b55566756d fixes: bz#1662906
* performance/md-cache: Fix a crash when statfs caching is enabledVijay Bellur2019-01-112-2/+26
| | | | | | | | | | | | | mem_put() in STACK_UNWIND_STRICT causes a crash if frame->local is not null as md-cache obtains local from CALLOC. Changed two occurrences of STACK_UNWIND_STRICT to MDC_STACK_UNWIND as the latter macro does not rely on STACK_UNWIND_STRICT for cleaning up frame->local. fixes: bz#1632503 Change-Id: I1b3edcb9372a164ef73119e99a49e747765d7166 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* tests: increase the timeout for distribute bug 1117851.tAmar Tumballi2019-01-111-0/+2
| | | | | | | | | | The test is in borderline of 200seconds, and many a times, randomly takes little more time, and fails the whole regression. Better to keep timeout high, so we don't 'randomly' fail regression tests. updates: bz#1193929 Change-Id: Ib0d3a9f7a75ee44446ec6da5e0510cccf83eecaa Signed-off-by: Amar Tumballi <amarts@redhat.com>
* afr : fix memory leakSunny Kumar2019-01-111-23/+15
| | | | | | | | | | | | | | | This patch fixes memory leak reported by ASan. The fix was first merged by https://review.gluster.org/#/c/glusterfs/+/21805. But later change was reverted due to this patch https://review.gluster.org/#/c/glusterfs/+/21178/. updates: bz#1633930 Change-Id: I1febe121e0be33a637397a0b54d6b78391692b0d Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* cluster/afr: Disable client side heals in AFR by default.Sunil Kumar Acharya2019-01-1011-4/+33
| | | | | | | | | With this changeset, default value for the AFR client side heal volume option is set to "off" fixes: bz#1663102 Change-Id: Ie4016932339c4896487e3e7cb5caca68739b7ba2 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* dht: Add NULL check for stbuf in dht_rmdir_lookup_cbkSusant Palai2019-01-101-2/+1
| | | | | | Change-Id: I2ced288113a369cc6497a77ac1871007df434da4 fixes: bz#1664647 Signed-off-by: Susant Palai <spalai@redhat.com>
* features/locks: Dump connection_id even for posix locksKrutika Dhananjay2019-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... in statedump for a better debugging experience. BEFORE: posixlk.posixlk[0](ACTIVE)=type=WRITE, whence=0, start=0, len=0, pid = 13635, owner=2dd2c3a11706dc8c, client=0x7f159012b000, connection-id=(null), granted at 2018-12-31 14:20:42 connection-id is null above. AFTER: posixlk.posixlk[0](ACTIVE)=type=WRITE, whence=0, start=0, len=0, pid = 10977, owner=b485e33df21bdaa2, client=0x7fa24c01ab90, connection-id=CTX_ID:68e12340-eed2-4386-bf5e-1f43cf8693d9-GRAPH_ID:0- PID:10901-HOST:dhcp35-215.lab.eng.blr.redhat.com-PC_NAME:patchy-client-0- RECON_NO:-0, granted at 2018-12-31 14:33:50 Change-Id: I4608994bacabb558a3be8c1634ee6b1d2d3022e2 fixes: bz#1662679 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* timer-wheel: run the timer function outside of locked regionAmar Tumballi2019-01-091-1/+8
| | | | | | | | | Surprizingly this also reduced 80% CPU overhead 'perf record' tool reported in posix_spin_lock in a brick-mux test volume initialization process. updates: bz#1193929 Change-Id: I4e1df60d6fd094105c312df39f1527d3f07bed68 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* features/shard: Assign fop id during background deletion to prevent ↵Krutika Dhananjay2019-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | excessive logging ... of the kind "[2018-12-26 05:22:44.195019] E [MSGID: 133010] [shard.c:2253:shard_common_lookup_shards_cbk] 0-volume1-shard: Lookup on shard 785 failed. Base file gfid = cd938e64-bf06-476f-a5d4-d580a0d37416 [No such file or directory]" shard_common_lookup_shards_cbk() has a specific check to ignore ENOENT error without logging them during specific fops. But because background deletion is done in a new frame (with local->fop being GF_FOP_NULL), the ENOENT check is skipped and the absence of shards gets logged everytime. To fix this, local->fop is initialized to GF_FOP_UNLINK during background deletion. Change-Id: I0ca8d3b3bfbcd354b4a555eee520eb0479bcda35 updates: bz#1662368 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* Revert "iobuf: Get rid of pre allocated iobuf_pool and use per thread mem pool"Amar Tumballi2019-01-088-95/+1311
| | | | | | | | | This reverts commit b87c397091bac6a4a6dec4e45a7671fad4a11770. There seems to be some performance regression with the patch and hence recommended to have it reverted. Updates: #325 Change-Id: Id85d6203173a44fad6cf51d39b3e96f37afcec09
* features/bit-rot: do not send version and signature keys in dictRaghavendra Bhat2019-01-082-10/+53
| | | | | | | | | | | In lookup, if the file has been marked as bad, then bit-rot-stub was sending the version and signature xattr values as well in the response dictinary. This is not needed. Only bad file marker has to be sent. Change-Id: Id59c02e9857577c60849fd28ef657f71e0b15207 fixes: bz#1664122 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* performance/io-threads: Improve debuggability in statedumpVijay Bellur2019-01-071-6/+23
| | | | | | | | | | | | | | | | | | | | | | statedump from io-threads lacked information to understand the number of running threads & number of requests in each priority queue. This patch addresses that. Sample statedump output w/ this patch: current_high_priority_threads=7 current_normal_priority_threads=9 current_low_priority_threads=0 current_least_priority_threads=0 fast_priority_queue_length=32 normal_priority_queue_length=45 Also, changed the wording for least priority queue in iot_get_pri_meaning(). Change-Id: Ic5f6391a15cc28884383f5185fce1cb52e0d10a5 fixes: bz#1664124 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: update returned/callback pre/post attributes to glfs_statShyamsundarR2019-01-077-55/+169
| | | | | | | Change-Id: Ie0fe971e694101aa011d66aa496d0644669c2c5a Updates: #389 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com> Signed-off-by: ShyamsundarR <srangana@redhat.com>
* gfapi: new api glfs_statx as linux's statxShyamsundarR2019-01-079-7/+500
| | | | | | | Change-Id: I44dd6ceef0954ae7fc13f920e84d81bbd3f6a774 Updates: #389 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com> Signed-off-by: ShyamsundarR <srangana@redhat.com>
* glfs-fops.c: fix the bad string length for snprintfKinglong Mee2019-01-071-2/+2
| | | | | | | | | Snprintf reserves one byte for the ending '\0'. A NAME_MAX bytes d_name is truncated to NAME_MAX - 1 bytes. Change-Id: Ic884d18cee24360e55ddb896dc587b0b74ef97fe updates: bz#1193929 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* leases: Reset lease_ctx->timer post deletionSoumya Koduri2019-01-071-0/+1
| | | | | | | | | To avoid use_after_free, reset lease_ctx->timer back to NULL after the structure has been freed. Change-Id: Icd213ec809b8af934afdb519c335a4680a1d6cdc updates: bz#1648768 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* rpc-clnt: reduce transport connect log for EINPROGRESSKinglong Mee2019-01-071-1/+2
| | | | | | | | | | quotad and ganesha.nfsd prints many logs as, [rpc-clnt.c:1739:rpc_clnt_submit ] 0-<VOLUME_NAME>-quota: error returned while attempting to connect to host: (null), port 0 Change-Id: Ic0c815400619e4a87a772a51b19822920228c1ef Updates: bz#1596787 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* rpcsvc: Don't expect dictionary values to be availablePranith Kumar K2019-01-071-2/+2
| | | | | | | | | | | When reconfigure happens, string values from one dictionary are directly set in another dictionary. This can lead to invalid memory when the first dictionary is freed up. So do dict_set_dynstr_with_alloc instead of dict_set_str updates bz#1650403 Change-Id: Id53236467521cfdeb07e7178d87ba6cf88d17003 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* glusterd: rebalance status should display information of localhostSanju Rakonde2019-01-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: https://review.gluster.org/#/c/glusterfs/+/21762/ has migrated rebalance commands from op-sm framework to mgmt v3 framework. In a heterogenous cluster, if rebalance commands follow op-sm framework, localhost information is not displayed in the output of "gluster v rebalance <volname> status". Cause: Previously without https://review.gluster.org/#/c/glusterfs/+/21762/ rebalance commands were following op-sm framework. In glusterd_volume_rebalance_use_rsp_dict() current_index variable keeps track of number/count of peers in trusted storage pool. In op-sm, glusterd_volume_rebalance_use_rsp_dict() will be called only for the peers. So the current index should start from 2 assuming local host as node 1. With the above patch, rebalance commands are following mgmt v3 framework. In mgmt v3, glusterd_volume_rebalance_use_rsp_dict() is called for all nodes. For localhost it is called from brick-op function and for peers it is called from brick-op call back function. So the current index value should start from 1. https://review.gluster.org/#/c/glusterfs/+/21762/ has changed the value of current index to 1. Because of this, In heterogenous cluster, local host's information is overwritten by one of the peers information. And rebalance status will not display localhost's information in the output. Solution: assign a value to current index based on a op-version check. Change-Id: I2dfba1f007e908cf160acc4a4a5d8ef672572e4d fixes: bz#1663243 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* extras: Add readdir-ahead to samba group commandAnoop C S2019-01-041-0/+1
| | | | | | Change-Id: I310f014a9ab8416d9833f5711ff902da1457f415 updates: bz#1193929 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* glusterd: aggregate rsp from peers for profile commandSanju Rakonde2019-01-031-1/+2
| | | | | | | | | | | | | | | | | When we run profile info command, it should display statistics of all the bricks of the volume. To display information of bricks which are hosted on peers, we need to aggregate the response from peers. For profile info command, all the statistics will be added into the dictionary in brick-op phase. To aggregate the information from peers, we need to call glusterd_syncop_aggr_rsp_dict() in brick-op call back function. fixes: bz#1663223 Change-Id: I5f5890c3d01974747f829128ab74be6071f4aa30 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: fix memory leak in handshakeZhang Huan2019-01-031-0/+3
| | | | | | | | | Add missing unref to req_dict to fix memory leak in handle of handshake. Change-Id: I0d8573fc3668c1a0ccc9030e3a096bbe20ed5c36 fixes: bz#1663077 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* glusterd: kill the process without releasing the cleanup mutex lockSanju Rakonde2019-01-021-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: glusterd acquires a cleanup mutex lock before it starts cleanup process, so that any other thread which tries to acquire lock on any resource will be blocked on cleanup mutex lock. We don't want any thread to try to acquire any resource, once the cleanup is started. because other threads might try to acquire lock on resources which are already freed by the thread which is going though the cleanup phase. previously we were releasing the cleanup mutex lock before the process exit. As we are releasing the cleanup mutex lock, before the process can exit some other thread which is blocked on cleanup mutex lock is acquiring the cleanup mutex lock and trying to acquire some resources which are already freed as a part of cleanup. This is leading glusterd to crash. Solution: We should exit the process without releasing the cleanup mutex lock. Change-Id: Ibae1c62260f141019017f7a547519a5d38dc2bb6 fixes: bz#1654270 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* gfapi: nit cleanup related to releasing fs->mutex lockSoumya Koduri2018-12-311-1/+1
| | | | | | | | | | | This is follow-up patch to the comment received for - https://review.gluster.org/#/c/glusterfs/+/21882 We need not hold the fs->mutex lock to log error message. Change-Id: I29d2ea2e6cfecc3dd94982bd48f4bc9f11cc3aac fixes: bz#1660577 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* libgfapi : fix coverity issueSunny Kumar2018-12-311-2/+4
| | | | | | | | | | | | This patch fixes coverity issue in api/src/glfs-fops.c. CID: 1389247, 1389296, 1389369, 1389392. All coverity defects are of type Mixing enum types (MIXED_ENUMS). updates: bz#789278 Change-Id: I007bb317ed5f0b8ddaf94a93b3a4d02b1e74cb8d Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* posix: buffer_size_warning coverity fixHarpreet Kaur2018-12-311-1/+1
| | | | | | | | | | | | | Defect: CID 1398469- Calling strncpy with a maximum size argument of 4096 bytes on destination array key of size 4096 bytes might leave the destination string unterminated. Fix: Using snprintf instead of strncpy. updates: bz#789278 Change-Id: I4fdcd0cbf3af8b2ded94603d92d1ceb4112284c4 Signed-off-by: Harpreet Kaur <hlalwani@redhat.com>
* multiple-files: clang-scan fixesAmar Tumballi2018-12-315-7/+23
| | | | | | updates: bz#1622665 Change-Id: I9f3a75ed9be3d90f37843a140563c356830ef945 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs/src/mem-types.h: remove unused common enums from mem-types.hYaniv Kaul2018-12-302-144/+99
| | | | | | | | | | | | | | | | | They were not used at all, just taking space. I've also marked all those that are not common really, but used in just one place - they probably should move there (in follow-up patches) As a test, I've removed from the stripe xlator unused private enums and moved one that was in the common list, but only used in the stripe code, to be a private enum. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I1158dc1d259f1fd3f69904336c46c9d83cea799f
* configure: add a message about asan optionAmar Tumballi2018-12-291-0/+12
| | | | | | | | | This added hint helps to get ASan logs for the daemon processes, with this one can start using asan for regression tests. updates: bz#1633930 Change-Id: I3b39892d45d29ae514dad8ab10f65703c02003f1 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd: NULL pointer dereferencing clang fixSheetal Pamecha2018-12-291-1/+1
| | | | | | | | | Added ternary operator to avoid this issue Updates: bz#1622665 Change-Id: I163d0628304a0d61249d1d97a4a3d3bee4ba4927 Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* mgmt/glusterd: fix clang warningSheetal Pamecha2018-12-291-1/+0
| | | | | | | | Attempt to free rsp.dict.dict_val twice Change-Id: I5dbc50430f59ca8d0c739b0fbe95d71981852889 Updates: bz#1622665 Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* cluster/afr: Refactor internal locking code to allow multiple inodelksPranith Kumar K2018-12-286-798/+366
| | | | | | | | | | | | | | | | For implementing copy_file_range fop, AFR needs to perform two inodelks in the same transaction. This patch brings in the necessary structure to make it easier to do so. Entry-locks in AFR were already taking multiple entry-locks on different inodes with the respective basenames. This patch extends the logic in inodelks to use the same lockee_t structure. This lead to removal of quite a lot of duplicate code present in afr-lk-common.c as both the locks are doing same things except 'winding' part. updates: #536 Change-Id: Ibfce7e3f260bb27b18645152ec680c33866fe0ae Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* rpc/rpc-lib: fix coverity issueSheetal Pamecha2018-12-281-4/+0
| | | | | | | | | | | Defect: Code can never be reached because of the condition queue_index > 1024 cannot be true. CID: 1398471 Logically dead code updates: bz#789278 Change-Id: I367cda7e734f6d774900a58d8664cffcab69126f Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* rpc : fix coverity in rpc/rpc-lib/src/rpcsvc.cSunny Kumar2018-12-281-2/+2
| | | | | | | | | | This patch fixes newly introduced coverity. CID: 1398472: Dereference before null check. updates: bz#789278 Change-Id: Ie9b13084097de8f24b138acd7608c3e15b3bba9c Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* barrier: replace boolean-switch statement with if/elseNiels de Vos2018-12-281-43/+23
| | | | | | | | | | | | | | | | | | | | | | Squash some ugly warnings, and make the code a little bit simpler by removing some unneeded goto jumps. On Ubuntu 16.04 the following warnings were reported by Amudhan: CC barrier.lo barrier.c: In function ‘notify’: barrier.c:499:33: warning: switch condition has boolean value [-Wswitch-bool] switch (past) { ^ barrier.c: In function ‘reconfigure’: barrier.c:565:25: warning: switch condition has boolean value [-Wswitch-bool] switch (past) { ^ Change-Id: Ifb6b75058dff8c789b729c76530a1358d391f4d1 Updates: bz#1193929 Reported-by: Amudhan P <amudhan83@gmail.com> Signed-off-by: Niels de Vos <ndevos@redhat.com>