summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ctime: Provide noatime optionKotresh HR2018-09-2512-9/+191
| | | | | | | | | | | | | | | | | Most of the applications are {c|m}time dependant and very few are atime dependant. So provide noatime option to not update atime when ctime feature is enabled. Also this option has to be enabled with ctime feature to avoid unnecessary self heal. Since AFR/EC reads data from single subvolume, atime is only updated in one subvolume triggering self heal. updates: bz#1593538 Change-Id: I085fb33c882296545345f5df194cde7b6cbc337e Signed-off-by: Kotresh HR <khiremat@redhat.com>
* nfs : fix coverity issuesSunny Kumar2018-09-252-3/+7
| | | | | | | | Fixes 1388608 and 1274073. updates: bz#789278 Change-Id: Ibe2b948ae3b02feb938caffe81b2e484b4c7b221 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* georep: Fix python3 compatibility (configparser)Kotresh HR2018-09-251-5/+2
| | | | | | | | | '%' needs special handling in config and also removed duplicate misspelled 'changelog-archive-format' config. Updates: #411 Change-Id: I33621a62bdf5f781ee62e6cedec0c2df3f5d70cf Signed-off-by: Kotresh HR <khiremat@redhat.com>
* georep: Fix python3 compatibility (os.pipe)Kotresh HR2018-09-253-7/+19
| | | | | | | | | | | | | | 'os.pipe' returns pair of file descriptors which are non-inheritable by child processes. But geo-rep uses te inheritable nature of pipe fds to communicate between parent and child processes. Hence wrote a compatiable pipe routine which works well both with python2 and python3 with inheritable nature. Updates: #411 Change-Id: I869d7a52eeecdecf3851d44ed400e69b32a612d9 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* features/marker: Avoid passing structures as parameters to functionsVijay Bellur2018-09-253-12/+15
| | | | | | | | | | | | | | | Fixes CIDs: 1388779,1390242,1390057 The patch does the following: 1. Changes the prototype of mq_inspect_file_xattr() and mq_xattr_state() to have a parameter of struct iatt * instead of struct iatt. 2. Remove unneeded struct iatt parameter from mq_inspect_directory_xattr() Change-Id: I1f6eabda042f0fe56d8c9bca010302f5e518dbe4 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: fix coverity issuesSanju Rakonde2018-09-253-21/+11
| | | | | | | | | | | | | | | This patch addreeses CID 1124812, 11248123, 1124833, and 1351706 1. We have a null check after GF_ASSERT. GF_ASSERT does a null check and fails if it is null. So removing the redundant null checks. 2. Added a log message to avoid unused value coverity issue Change-Id: Ib0d6dad8f40474afc8e5e60a531d37247cc8a081 updates: bz#789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* mgmt/glusterd: NULL pointer dereferencing clang fixShwetha Acharya2018-09-251-0/+6
| | | | | | | | Added a condition check to resolve the issue Change-Id: I1954e91f7487c052caf5cf98c954d204242f0af9 Updates: bz#1622665 Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
* cluster/ec: Fix failure of tests/basic/ec/ec-1468261.tAshish Pandey2018-09-251-0/+1
| | | | | | | | | | | | | | | | Problem: In this test we are relying on eager-lock time duration of 1 second to delay the post op + unlock phase of an entry fop so that in this 1 second we can kill 2 bricks and dirty on directory could be set. Solution: To fix this issue, we should set the others.eager-lock option to "ON" explicitly in the beginning of this test. Change-Id: I19bbb9c15d7bdf96a96b20587c618192d0b740ef fixes bz#1632161 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* api: old and new versioned symbols must appear in each section of gfapi.mapKaleb S. KEITHLEY2018-09-251-39/+46
| | | | | | | | | It's probably not clear in .../doc/developer-guide/gfapi-symbol-versions.md that this is necessary, but it is. Change-Id: I0a8a74e3ecf474c93583f5ebc97507c4277542b0 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* dht: Coverity fixesSusant Palai2018-09-242-2/+3
| | | | | | | | | | | CID: 1274236 Issue: Logically dead code (op_errno will never be -1) CID: 1351652 Issue: Dereference after null check. (local->fd is dereferenced anyway and it should not be NULL ever for dht_readdirp_cbk.) Change-Id: Ied9c5f5b72536be1ca944237165acdc62b792e58 updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* glusterfind: add logs to identify parsing phasesMilind Changire2018-09-241-0/+10
| | | | | | | | Add logs to idenitfy start and finish of changelog parsing phases. Change-Id: Id250231f2af7829f887401d30ac98875ae1ae793 fixes: bz#1632236 Signed-off-by: Milind Changire <mchangir@redhat.com>
* Update database profile groupXavi Hernandez2018-09-241-1/+5
| | | | | | | | | | | | | | | Some performance testing has revealed that pgbench performs 3x better when these options are set: performance.client-io-threads=on performance.open-behind=on performance.read-after-open=yes server.event-threads=4 client.event-threads=4 Change-Id: I36ce389f893a8af13aac5f8285104d749b73d098 fixes: bz#1631886 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* geo-rep : fix log message in master.pySunny Kumar2018-09-241-2/+2
| | | | | | | | This patch fixes spell mistake in log message. Change-Id: I84779c64aef6698cbc1a60ae1a82533e8a6a6e3d updates: bz#1193929 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* python3: Fix python3 compatibilityNigel Babu2018-09-244-46/+49
| | | | | | Updates: #411 Change-Id: I7c1eaa92cd4ac05c3667b760e0db2cddcfbbaed8 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* glusterd: reduce length allocated to nameSanju Rakonde2018-09-222-2/+2
| | | | | | | | | In glusterd_proc_ and glusterd_svc_ structures name is having length of PATH_MAX, allocating NAME_MAX will be sufficient. Change-Id: I637ba00e1a80ca6a1ecc0c2dbf180c4633c1ca5b updates: bz#1193929 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: fix resource leak coverity issuesSanju Rakonde2018-09-223-8/+4
| | | | | | | | | | This patch addresses CID 1288098,1370948 and 1382454 key_fixed is allocated with memory but missed to free it. updates: bz#789278 Change-Id: Iea805c668ba89759313f9e21b328757e570be97b Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: fix coverity issues in glusterd-locks.cSanju Rakonde2018-09-221-2/+11
| | | | | | | | | | | | | This patch addresses CID 1395254, CID 1382436. We are allocating memory to mgmt_lock_timer and key_dup. while doing GF_VALIDATE_OR_GOTO for mgmt_lock_timer_xl or mgmt_lock_timer_ctx, if it is null going to out without freeing the memory. This patch will fix the issues. updates: bz#789278 Change-Id: Ic6bfb2052982b16373f90cbbc53d2b2da052c01f Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: don't wait for blockers flag for stop volumeAtin Mukherjee2018-09-221-1/+0
| | | | | | | | | | | | | | | With commit 4f6ae8 even though the overall transaction time for gluster volume stop can be reduced, but based on testing it can't be guaranteed that the transaction can finish in 3 minutes before the unlock timer gets kicked in. The ground problem to this is the command serialization which atomic field 'blockers' does for volume stop operation. This patch removes that dependency for volume stop not to wait for blockers. Change-Id: Ifaf120115dc7ed21cf21e65e25c4ec7c61ab8258 Fixes: bz#1631128 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* afr: fix incorrect reporting of directory split-brainRavishankar N2018-09-219-17/+85
| | | | | | | | | | | | | | | | | Problem: When a directory has dirty xattrs due to failed post-ops or when replace/reset brick is performed, AFR does a conservative merge as expected, but heal-info reports it as split-brain because there are no clear sources. Fix: Modify pending flag to contain information about pending heals and split-brains. For directories, if spit-brain flag is not set,just show them as needing heal and not being in split-brain. Fixes: bz#1626994 Change-Id: I09ef821f6887c87d315ae99e6b1de05103cd9383 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* glusterfsd/mgmt : Check for NULL after creating frameAshish Pandey2018-09-211-0/+4
| | | | | | | | | | CID: 1382390 https://scan6.coverity.com/reports.htm#v42607/p10714fileInstanceId=85472585&defectInstanceId=26074725&mergedDefectId=1382390 Change-Id: Iade073a5e72f29ad5e8f372955869bc287eb9793 updates: bz#789278 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* ctr: NULL pointer dereferencing clang fixSheetal Pamecha2018-09-211-1/+1
| | | | | | | | | Replaced this->name with "ctr" Updates: bz#1622665 Change-Id: I49af42a5d77c98ffb34224c8800757b8986012ea Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* nfs/server: NULL pointer dereferencing clang fixShwetha Acharya2018-09-212-2/+2
| | | | | | | Added some condition checks in nfs3.c and nlm4.c Updates: bz#1622665 Change-Id: Ia10b8fff14f651df1360c9bb79d4476b282f54b5 Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
* block : fix coverity in bd.cSunny Kumar2018-09-211-0/+6
| | | | | | | | | This patch fixes CID 1288097, 1128921, and 1128918 all of type RESOURCE_LEAK. Change-Id: If39be19c6310eab9880de6f0bebb4f38604a40b2 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* cluster/afr: Make data eager-lock decision based on number of locksPranith Kumar K2018-09-213-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For both Virt and block workloads the file is opened multiple times leading to dynamically setting eager-lock to off for the workload. Instead of depending on the number-of-open-fds, if we change the logic to depend on number of inodelks, then it will give better performance than the earlier logic. When there is an eager-lock and number of inodelks is more than 1 we know that there is a conflicting lock, so depend on that information to decide whether to keep the current transaction go through delayed-post-op or not. Locks xlator doesn't have implementation to query number of locks in fxattrop in releases older than 3.10 so to keep things backward compatible in 3.12, data transactions will use new logic where as fxattrop transactions will use old logic. I am planning to send one more patch which makes metadata domain locks also depend on inodelk-count Profile info for a dd of 500MB to a file with another fd opened on the file using exec 250>filename Without this patch: 0.14 67.41 us 16.72 us 3870.82 us 892 FINODELK 0.59 279.87 us 95.71 us 2085.89 us 898 FXATTROP 3.46 366.43 us 81.75 us 6952.79 us 4000 WRITE 95.79 148733.99 us 50568.12 us 919127.86 us 273 FSYNC With this patch: 0.00 51.01 us 38.07 us 80.16 us 4 FINODELK 0.00 235.43 us 235.43 us 235.43 us 1 TRUNCATE 0.00 125.07 us 56.80 us 193.33 us 2 GETXATTR 0.00 135.86 us 62.13 us 209.59 us 2 INODELK 0.00 197.88 us 155.39 us 253.90 us 4 FXATTROP 0.00 450.59 us 394.28 us 506.89 us 2 XATTROP 0.00 56.96 us 19.06 us 406.59 us 23 FLUSH 37.81 273648.93 us 48.43 us 6017657.05 us 44 LOOKUP 62.18 4951.86 us 93.80 us 1143154.75 us 3999 WRITE postgresql benchmark performance changed from ~1130 TPS to ~2300TPS randio fio job inside Ovirt based VM went from ~600IOPs to ~2000IOPS fixes bz#1630368 Change-Id: If7f7388d2f08cf7f17ca517a4ea222560661dc36 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* extras: Add new options to group "virt"Krutika Dhananjay2018-09-211-0/+3
| | | | | | | | | | | | | In some of the recent performance tests on gluster-as-vm-image-store use-case, it has been observed that sometimes the lone fuse thread can hit near-100% CPU utilization and become a performance bottleneck. Enabling client-io-threads (in addition to bumping up epoll threads on server and client side) has shown to be helpful in getting around this bottleneck and pushing more IOPs. Change-Id: I231db309de0e37c79cd44f5666da4cd776fefa04 fixes: bz#1630798 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* dht: Operate internal fops with negative pidSusant Palai2018-09-202-0/+4
| | | | | | | | | | | | | | | | | | | With root-squash on, all root credentials are converted to a random uid, gid(65535). And ideally this does not carry the necessary permission bits to carry out the operation. But posix-acl will allow operations from this inode as long as its ctx has the ngroup information and ngroup has the owner group information. The problem we ran into recently was somehow posix-acl xlator did not cache the ngroup info and some of the dht internal fops(layout setxattr) failed with root-squash enabled. DHT internal fops now use a negative pid to pretend that the operation is from an internal client so posix-acl allows them to pass Change-Id: I5bb8d068389bf4c94629d668a16015a95ccb53ab fixes: bz#1624796 Signed-off-by: Susant Palai <spalai@redhat.com>
* tests: fix test case failureSanju Rakonde2018-09-201-1/+1
| | | | | | | | | | | | | | | | tests/bugs/glusterd/bug-1595320.t is failing in downstream. In downstream repo, enabling the brick multiplexing made interactive, so it will throw an prompt for the user input. As no input is provided during the test case execution, the test is failing. Using macro CLI instead of using gluster command, will bypass the interacive commands. so replacing the gluster command with CLI macro will address the issue. Change-Id: I6b39052d8e415a8ed08de7c80a91dadce155146a updates: bz#1193929 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* Quota: NULL pointer dereferencing clang FixHarpreet Lalwani2018-09-201-1/+2
| | | | | | | | | Added ternary operator to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I903ec1973fd4bb6473d16e2680bd86ac3a20e093 Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
* storage/posix: Check if fd->inode is NULL before using itAshish Pandey2018-09-201-4/+4
| | | | | | | | | | | CID: 1395473, 1395472 https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85588219&defectInstanceId=26115956&mergedDefectId=1395472 https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85588219&defectInstanceId=26115961&mergedDefectId=1395473 Change-Id: I2c3cc350e0ac156616df6f568ba28dbfa68064bf updates: bz#789278 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* cluster/afr: Use 2 domain locking in SHD for thin-arbiterkarthik-us2018-09-205-91/+392
| | | | | | | | | | | | | | | | | | | | With this change when SHD starts the index crawl it requests all the clients to release the AFR_TA_DOM_NOTIFY lock so that clients will know the in memory state is no more valid and any new operations needs to query the thin-arbiter if required. When SHD completes healing all the files without any failure, it will again take the AFR_TA_DOM_NOTIFY lock and gets the xattrs on TA to see whether there are any new failures happened by that time. If there are new failures marked on TA, SHD will start the crawl immediately to heal those failures as well. If there are no new failures, then SHD will take the AFR_TA_DOM_MODIFY lock and unsets the xattrs on TA, so that both the data bricks will be considered as good there after. Change-Id: I037b89a0823648f314580ba0716d877bd5ddb1f1 fixes: bz#1579788 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* glusterd: Use GF_ATOMIC to update 'blockers' counter at glusterd_confMohit Agrawal2018-09-204-12/+11
| | | | | | | | | | | | | | | Problem: Currently in glusterd code uses sync_lock/sync_unlock to update blockers counter which could add delays to the overall transaction phase escpecially when there's a batch of volume stop operations processed by glusterd in brick multiplexing mode. Solution: Use GF_ATOMIC to update blocker counter to ensure unnecessary context switching can be avoided. Change-Id: Ie13177dfee2af66687ae7cf5c67405c152853990 Fixes: bz#1631128 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* glusterd: fix crashSanju Rakonde2018-09-201-1/+1
| | | | | | | | | | | When huge number of volumes are created, glusterd crash is seen. With the core dump, got to know that mgmt_lock_timer became NULL. Adding a null check for the same, need to explore about the root cause. updates: bz#1630922 Change-Id: I0770063fcbbbf4b24bef29e94b857b20bdfb5b85 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* geo-rep : fix coverity issues in glusterd-geo-rep.cSunny Kumar2018-09-201-7/+10
| | | | | | | | | | | | | | | | | This patch fixes CID 1210979, 1214614, 1292650, 1357874, 1382404. 1. overflowed or a truncated value : call to sys_read has been reduced to 'sizeof(buf) -1' and after operation buf is properly terminated. 2. tainted_data_argument : truncation due to cast operation on operand : resulted form call to strtol: chaged data type from pid_t to long. 3. tainted_data_argument : call to fgets is reduced by 2 to make space for the '\n' and '\0'. updates: bz#789278 Change-Id: Ib883501205c85007771213071c8e182286eb0bc0 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd: Improve logging in gd_mgmt_v3_unlock_timer_cbkAtin Mukherjee2018-09-201-1/+4
| | | | | | Change-Id: I3335e7df3256d97c2211b64cfcaac9a016723471 Updates: bz#1193929 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* libglusterfs: NULL pointer dereferencing clang fixIraj Jamali2018-09-191-1/+1
| | | | | | | | | | | Problem: trav could be NULL. Solution: Adding a check to avoid clang error. Updates: bz#1622665 Change-Id: If26be82edea5e33c2356cea3769496f1cbd3774c Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* cluster/afr: Batch writes in same lock even when multiple fds are openPranith Kumar K2018-09-191-9/+2
| | | | | | | | | | | | | | | | | | | | | | Problem: When eager-lock is disabled because of multiple-fds opened and app writes come on conflicting regions, the number of locks grows very fast leading to all the CPU being spent just in locking and unlocking by traversing huge queues in locks xlator for granting locks. Fix: Reduce the number of locks in transit by bundling the writes in the same lock and disable delayed piggy-pack when we learn that multiple fds are open on the file. This will reduce the size of queues in the locks xlator. This also reduces the number of network calls like inodelk/fxattrop. Please note that this problem can still happen if eager-lock is disabled as the writes will not be bundled in the same lock. fixes bz#1625961 Change-Id: I8fd1cf229aed54ce5abd4e6226351a039924dd91 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* dht: utilize the framework to pass-through xlator tasksAmar Tumballi2018-09-1910-31/+234
| | | | | | | | | | | | | | | | | | | | | Also fixes the issue caused due to not converting back the fn function to after getting its address. We wanted the value of the field, not the address of the pt_fop field. With this patch, DHT will always be started in pass-through mode if the number of subvols is just 1. Fixes some tests to make sure DHT is in full config (ie, subvols > 1). - increased timeout of brick-mux test as it was bordering on 300 seconds. - Also change the volume type to supported 'replica 3' from 'replica 2'. - also no DHT tests should assume presence of DHT when there is just 1 brick in volume Credits: Nithya B <nbalacha@redhat.com> fixes: #405 Change-Id: I8e55239ce58d6ac6ae1901e2e384be1ecbd33d6e Signed-off-by: Amar Tumballi <amarts@redhat.com>
* extras/devel-tools: script to strace processesMilind Changire2018-09-191-0/+55
| | | | | | | | | | | | | | | | Script to strace processes at high priority. Script should be run at high priority, like nice value of -19, to help get a trace of a run-away process consuming high CPU. eg. $ nice -n -19 ./strace-brick.sh glusterfsd 50 will strace glusterfsd processes for 60 seconds which are consuming a minimum of 50% CPU. Change-Id: I6374054c7342b19122a3588d982388199f955930 BUG: 1427397 Signed-off-by: Milind Changire <mchangir@redhat.com>
* logrotate: utilize the new 'maxsize' optionAmar Tumballi2018-09-193-5/+35
| | | | | | | | | | | Since logrotate 3.8.x version, a new option 'maxsize' is supported, which helps in rotating the logs before the specified time if the size exceeds maxsize limit. This should help in reducing the overflow of gluster logs. Updates: bz#1193929 Change-Id: Id33c34d72f1931e7996893de9338db667e1e900d Signed-off-by: Amar Tumballi <amarts@redhat.com>
* extras/devel-tools: script to resolve backtracesMilind Changire2018-09-181-11/+16
| | | | | | | | | print-backtrace.sh script to resolve backtraces Change-Id: I24688ae5160cc706d9f4794521d17290bef6765b BUG: 1486532 Signed-off-by: Milind Changire <mchangir@redhat.com>
* tests/dht: Uncomment cleanup stepsN Balachandran2018-09-181-5/+5
| | | | | | | | | I had forgotten to uncomment the cleanup steps for file-create.t. Fixed. Change-Id: Id702b99b8e09f56b7333491a477828b4a37b2687 updates: bz#1628194 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* tests: fixes to bug-1015990-rep.tRavishankar N2018-09-181-14/+7
| | | | | | | | | | | - check that the shd is connected to brick before running statistics command - remove sleep statements - remove unneeded ($count-$value==0) test when it is known that both values will be same Fixes: bz#1625850 Change-Id: Ifcd4887f0238031e5bca803cd9bfdb75a6e6c01b Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* posix: Fix exporting default value for `export-statfs-size`Aravinda VK2018-09-181-1/+3
| | | | | | | | | | | | | No default value was specified for `export-statfs-size` in posix option table. Glusterd2 sets default value as `off` since the option type is `bool`. Posix treats `export-statfs-size=on` if not specified in volfile(That means default value is `on`) This patch sets default value as `on` Change-Id: I5c6341183be9b62a78fdbc94621220f9284e1382 updates: #302 Signed-off-by: Aravinda VK <avishwan@redhat.com>
* geo-rep: Fix issues related config setKotresh HR2018-09-186-11/+20
| | | | | | | | | | | | | | | | | | | | 1. '--ignore-mising-args' option for rsync is not being used even though the rsync version is greater than 3.1.0. Fixed the same. 2. '--existing' option for rsync is also not being used. Fixed the same. 3. geo-rep config fails to set rsync-options as the value contains '--'. Interestingly, python argsparse treats the value with '--' (e.g., --ignore-missing-args) as option. But when passed with something like --value=--ignore-missing-args, it succeeds. Fixed the same. Change-Id: Iaeb838acaff1c2920fee9c7f920c99edce13a0a1 Signed-off-by: Kotresh HR <khiremat@redhat.com> fixes: bz#1629561
* glusterd: acquire lock to update volinfo structureSanju Rakonde2018-09-183-34/+42
| | | | | | | | | | | | | | | | | | Problem: With commit cb0339f92, we are using a separate syntask for restart_bricks. There can be a situation where two threads are accessing the same volinfo structure at the same time and updating volinfo structure. This can lead volinfo to have inconsistent values and assertion failures because of unexpected values. Solution: While updating the volinfo structure, acquire a store_volinfo_lock, and release the lock only when the thread completed its critical section part. Fixes: bz#1627610 Signed-off-by: Sanju Rakonde <srakonde@redhat.com> Change-Id: I545e4e2368e3285d8f7aa28081ff4448abb72f5d
* event: get time by clock_gettime as pthread_cond_timedwait usingKinglong Mee2018-09-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debug information shows time() has a delay between seconds increase, get the right time by clock_gettime as pthread_cond_timedwait using. ret = pthread_cond_timedwait (&event_pool->cond, &event_pool->mutex, &sleep_till); + gf_msg ("epoll", GF_LOG_INFO, 0, + LG_MSG_EXITED_EPOLL_THREAD, + "pthread_cond_timedwait %lu %p return %d (active %d:%d)", + sleep_till.tv_sec, event_pool, ret, + event_pool->activethreadcount, threadcount); } } pthread_mutex_unlock (&event_pool->mutex); [2018-09-06 18:33:57.000879] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.000916] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.000931] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.000945] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.000957] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.000970] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.000983] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.000997] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.001010] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.001022] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.001034] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.001060] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230037 0x1f48e60 return 110 (active 5:4) [2018-09-06 18:33:57.003085] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230038 0x1f48e60 return 0 (active 4:4) [2018-09-06 18:33:57.014142] I [event.c:284:event_dispatch_destroy] 0-epoll: pthread_cond_timedwait 1536230038 0x1f48e60 return 0 (active 3:4) Change-Id: I735249eee9a6f8284392b69e501479ac163b8409 fixes: bz#1626313 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* protocol/server: NULL pointer dereferencing clang fixShwetha K Acharya2018-09-172-4/+14
| | | | | | | | | | Problem: Access to field fop_length results in null pointer dereferencing. Solution: Added condition checks fix the issue. Change-Id: Id408e3ac62ea9574f0cd9aecce5434add09eb7d0 Updates: bz#1622665 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* glusterd: NULL pointer dereferencing clang FixHarpreet Lalwani2018-09-171-1/+1
| | | | | | | | | Added ternary operator to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I855f6caf720b28af1564898d75c6c965bcc58c5c Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
* glusterd : fix coverity issue in glusterd-store.cSunny Kumar2018-09-171-1/+6
| | | | | | | | This patch fixes CID 1124356: Unchecked return value (CHECKED_RETURN) updates: bz#789278 Change-Id: I81f4637f19b81f820a2deb70cc7f84b79fe70236 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* tests/dht: Add tests for file createN Balachandran2018-09-172-0/+159
| | | | | | | | Test dht file creates Change-Id: I7aba710f4911432bd3b86834efecae8f01e4052f updates: bz#1628194 Signed-off-by: N Balachandran <nbalacha@redhat.com>