summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rpc: coverity fixesMilind Changire2018-10-092-1/+3
| | | | | | | | | | | | | CID: [1] 1394646 Unchecked return value from library CID: [2] 1394633 Unused value CID: 1382443 Sleeping while holding a lock [This is intentional] [1] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159112&defectInstanceId=26360786&mergedDefectId=1394646 [2] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159365&defectInstanceId=26360919&mergedDefectId=1394633 Change-Id: I03086f7a9672c9f50a2bc44cdbce0006c887357b updates: bz#789278 Signed-off-by: Milind Changire <mchangir@redhat.com>
* events: python2 to python3 compatKotresh HR2018-10-083-12/+13
| | | | | | | | | | 1. Fix imports 2. Use universal_newlines flag in Popen 3. encode msg used in 'sendto' Updates: #411 Change-Id: Ieacdc2ba86953ff3a2e9d9b9a97157e8e0e36836 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* georep: python2 to python3 compat - syscallsKotresh HR2018-10-087-35/+88
| | | | | | | | | | | | 1. ctypes/syscalls A) arguments is expected to be encoded B) Raw conversion of return value from bytearray into string 2. struct pack/unpack - Raw converstion of string to bytearray 3. basestring -> str Updates: #411 Change-Id: I80f939adcdec0ed0022c87c0b76d057ad5559e5a Signed-off-by: Kotresh HR <khiremat@redhat.com>
* packaging: remove RHEL5-isms from glusterfs.spec(.in)Kaleb S. KEITHLEY2018-10-083-100/+5
| | | | | | | | | | | CentOS5 too It's been a couple of years since we stopped doing anything with RHEL/CentOS 5 Change-Id: I83e78fa84b93fa5baddaf3fab92736d692a9bbca updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* core: glusterfsd keeping fd open in index xlatorMohit Agrawal2018-10-0813-81/+346
| | | | | | | | | | | | | | Problem: Current resource cleanup sequence is not perfect while brick mux is enabled Solution: 1) Destroying xprt after cleanup all fd associated with a client 2) Before call fini for brick xlators ensure no stub should be running on a brick Change-Id: I86195785e428f57d3ef0da3e4061021fafacd435 fixes: bz#1631357 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* cli: Resource leak coverity fixSanju Rakonde2018-10-081-0/+1
| | | | | | | | This patch fixes CID 1175017. Change-Id: I4968c35489aeb5bfa0461b2edf2a0d73b7f03c14 updates: bz#789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* changetimerecorder : fix coverity issueSunny Kumar2018-10-081-0/+1
| | | | | | | | | | This patch fixes CID : 1124725 Issue : Resource leak updates: bz#789278 Change-Id: I2afe65875fa393fd2d2f90b6f7cf7f6782dabf89 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* features/bit-rot: NULL pointer deferencing clang fixSheetal Pamecha2018-10-082-5/+13
| | | | | | | | | | | Problem: local could be NULL Added condition checks to address this issue Updates: bz#1622665 Change-Id: I7be7dacc5386a77441385240b43f22d85074b69d Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* tests: add get-state command to testSanju Rakonde2018-10-071-0/+7
| | | | | | | | | | | | | | When geo-replication session is running, run "gluster get-state" command to test. https://review.gluster.org/#/c/glusterfs/+/20461/ patch fixes glusterd crash, when we run get-state command with geo-rep session configured. Adding the test now. Fixes: bz#1598345 Change-Id: I56283fba2c782f83669923ddfa4af3400255fed6 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* xlators/experimental: move template files to '.c.in' typeAmar Tumballi2018-10-0513-1691/+1598
| | | | | | | | | | | | | | | | | | | | | | This is critical because we shouldn't be applying the automated coding standard (clang-format) tool on these files. This patchset is done by below steps: * clang-format -i ${filename} This creates syntax errors. Fix them using below two commands: * sed -i -e 's/ @/@/g' ${filename} * sed -i -e 's/,@/, @/g' ${filename} With this, these files are having minimum changes requried to compile, and is as close to the coding standard as possible. * git rename ${filename} ${filename}.in Updates: bz#1564149 Change-Id: Icf90f7f81d6fa4400be4826e094fdff8e64508d0 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cli : coverity fix in cli-rl.cSunny Kumar2018-10-051-3/+1
| | | | | | | | | | This patch fixes CID 1395248. Issue : Resource leak updates: bz#789278 Change-Id: I2fd4e36ac2c2a034e56883436abfc5199b095026 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* dht: coverity fixesSusant Palai2018-10-054-35/+30
| | | | | | | | | | CID: 1356541 Issue: Dereference null return value CID: 1382411 Issue: Dereference after null check CID: 1391409 Issue: Unchecked return value Change-Id: Id3d4feb4e88df424003cc8e8a1540e77bbe030e3 Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* libglusterfs : fix coverity issue in stack.cSunny Kumar2018-10-051-1/+4
| | | | | | | | | | This patch fixes CID : 1395323. Issue : Uninitialized scalar variable (UNINIT) updates: bz#789278 Change-Id: Id9567ca2ff9b5a36b9014afa70cc5795fe67161d Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* features/compress: NULL pointer dereferencing clang fixHarpreet Lalwani2018-10-051-2/+5
| | | | | | | | | Added a Label "err" to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I7ec02a9cbbc482c2cf77f66e5692e86cd251cd53 Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
* cloudsync: coverity fixSusant Palai2018-10-051-1/+1
| | | | | | | | | | | CID: 1394631 1394634 1394643 1394645 1394652 1394655 1394661 1394666 1394669 1394670 1394671 Issue: Argument cannot be negative Change-Id: Id4a9b1adcc271374971e788f161d91e8c9ac442f Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* libglusterfs: coverity fixSusant Palai2018-10-051-2/+2
| | | | | | | | CID: 1395829 Issue: Uninitialized pointer read Change-Id: I2e03d7b2a2f28f4a46408402ae03beba0f4c8308 Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* dht: volume_options 'options' collision with nfs-ganesha's 'options'Kaleb S. KEITHLEY2018-10-044-7/+11
| | | | | | | | | | | | | | | | | When dht was converted to xlator_api, the variable 'options' was not changed to dht_options, the same as was done to all the other xlators that were converted to xlator_api. Thus the reference to 'options' in dht.c is not resolved until runtime, and the RTlinker's search path starts with symbols in the executable, i.e. ganesha.nfsd's 'options'. (Which is obviously not the right one.) The unused extern references to 'options' (now dht_options) in nufa.c and switch.c is curious. Change-Id: Idf4a5d5fbd39aadfa5a4b529bceea65a3cbdf8f3 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* Reduce execution time of bug-1559004-EMLINK-handling.tXavi Hernandez2018-10-041-12/+51
| | | | | | | | | | | This patch reduces the execution time of bug-1559004-EMLINK-handling.t from ~14 minutes to ~90 seconds. To do so, it creates some fake hard links directly on the brick instead of creating them through the volume. Change-Id: I9715ff1a4eba47574c733d4f28e68f42f56a7d3f updates: bz#1193929 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* mgmt/glusterd: use proper path to the volfileRaghavendra Bhat2018-10-043-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Till now, glusterd was generating the volfile path for the snapshot volume's bricks like this. /snaps/<snap name>/<brick volfile> But in reality, the path to the brick volfile for a snapshot volume is /snaps/<snap name>/<snap volume name>/<brick volfile> The above workaround was used to distinguish between a mount command used to mount the snapshot volume, and a brick of the snapshot volume, so that based on what is actually happening, glusterd can return the proper volfile (client volfile for the former and the brick volfile for the latter). But, this was causing problems for snapshot restore when brick multiplexing is enabled. Because, with brick multiplexing, it tries to find the volfile and sends GETSPEC rpc call to glusterd using the 2nd style of path i.e. /snaps/<snap name>/<snap volume name>/<brick volfile> So, when the snapshot brick (which is multiplexed) sends a GETSPEC rpc request to glusterd for obtaining the brick volume file, glusterd was returning the client volume file of the snapshot volume instead of the brick volume file. Change-Id: I28b2dfa5d9b379fe943db92c2fdfea879a6a594e fixes: bz#1635050 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* glusterd: ignore RPC events when glusterd is shutting downAtin Mukherjee2018-10-041-1/+11
| | | | | | | | | | | | | | | When glusterd receives a SIGTERM while it receives RPC connect/disconnect/destroy events, the thread might lead to a crash while accessing rcu_read_lock () as the clean up thread might have already freed up the resources. This is more observable when glusterd comes up with upgrade mode = on during upgrade process. The solution is to ignore these events if glusterd is already in the middle of cleanup_and_exit (). Fixes: bz#1635593 Change-Id: I12831d31c2f689d4deb038b83b9421bd5cce26d9 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* mgmt/glusterd: NULL pointer dereferencing clang fixIraj Jamali2018-10-031-15/+16
| | | | | | | | | Added checks to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I745c1f3ba4df0e486ce99301843f9f13d01c00e0 Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* cli: fix glusterd memory leak cause by "gluster v status volume_name"shujun100862018-10-031-0/+1
| | | | | | | | | | | If use this command every some seconds for example 15s to check gluster brick status, the glusterd will use about 1G memory in a year. free the value of rsp in gf_cli_status_cbk. glusterd allocate the value of rsp and send it to cli, but cli do not free the value, that cause glusterd memory leak. fixes: bz#1635480 Change-Id: I3f19cd0d4b791ae1b35f9664b3a668b1579f1178 Signed-off-by: shujun10086 <shujun.huang@nokia-sbell.com>
* mgmt/glusterd: NULL pointer deferencing clang fixIraj Jamali2018-10-026-6/+6
| | | | | | | | | Changed this->name to "glusterd" Updates: bz#1622665 Change-Id: Ic8ce428cefd6a5cecf5547769d8b13f530065c56 Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* python: remove shebangs of non-main scripts and make others executableNiels de Vos2018-10-0215-8/+0
| | | | | | | | | | | | | | | Some of the scripts that have a #!/usr/bin/python3 shebang do not have a main() like function. These scripts will not get executed but only imported. They do not need the shebang. A few others are not installed with 'make install', but do have a main() like function. These scripts are expected to be used by developers for different tasks (mostly code generation). Marking these scripts executable to make it easier to identify them. Change-Id: I73541471deb7e0830766b804786244e73dfe4221 Updates: #411 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* rpc: make binding to port 0 as the default if no option is providedAmar Tumballi2018-10-026-25/+45
| | | | | | | | | | | | | | | | | | | | | | | Right now, if no option is provided, the default port is assumed, which is 24007. Ideally, for 'glusterfsd' processes, it is better to not assume there are any ports given, so it can start listening on any port which is available. This helps us to cleanup the dependencies on glusterd from glusterfsd at the moment. No changes would be done to glusterd code, but making the right defaults helps to make glusterfsd more independent process later. NOTE: This patch is a reduced version of below set of patches: * https://review.gluster.org/14613/ & * https://review.gluster.org/14670/ & * https://review.gluster.org/14671/ Credits: Prasanna Kumar Kalever <pkalever@redhat.com> updates: bz#1343926 Change-Id: Ib874e10505e7366dc56ba754458252b67052e653 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* georep: python2 to python3 compat - pickleKotresh HR2018-10-021-4/+12
| | | | | | | | | | | | | | | | | | | | | | Handle py2 and py3 compatibility for pickling and unpickling. Geo-rep pickles and unpickles reading sys.stdin and sys.stdout streams. py2 and py3 compatibility expects the streams to be opened in binary mode but the sys.stdout objects are different in python2 and python3 python2: >>> type(sys.stdout) <type 'file'> python3: >>> type(sys.stdout) <class '_io.TextIOWrapper'> So in order to access binary stream, using sys.stdin.buffer in python3 Updates: #411 Change-Id: I1a633ccdddff5baf0cf05a8b493add39ddf75bd7 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* georep: python2 and python3 compat - bytes-strKotresh HR2018-10-021-3/+5
| | | | | | | | | 1. Fix fdopen used for pid file 2. Fix sha256 checksum calculation Updates: #411 Change-Id: Ic173d104a73822c29aca260ba6de872cd8d23f86 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* georep: python2 to python3 compatibility-mount writeKotresh HR2018-10-021-3/+9
| | | | | | | | | | python3 expects byte string for os.write. This works for both py2 and py3. Fixed the same for geo-rep mount testing code path. Updates: #411 Change-Id: I2dfedcb0869457707bcca4d2847ef0d52bff1987 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* MAINTAINERS: Add Sunny Kumar as a peer for snapshotsRaghavendra Manjunath2018-10-011-0/+1
| | | | | | Change-Id: I691a56125143fb60735073595d8c5e43273c9bc1 fixes: bz#1634102 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* cli: handle negative scenariosSanju Rakonde2018-10-014-17/+79
| | | | | | | | | | | When control flow reaches negative case code block, we added "goto out" statement without assigning ret to -1. This patch assigns return value to -1, before going to the lable "out". Change-Id: I6db651a3c9ca285ade9ee1ca23d0abe6b36fda3a updates: bz#1193929 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* index : fix coverity issues in index.cSunny Kumar2018-10-011-4/+13
| | | | | | | | This patch fixes CID 1356508 and 1356577. Change-Id: I09bc5398fbf6ee49fc066b42aaedf1170df39df8 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* fuse: prevent error message "can't shift that many"Niels de Vos2018-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | On systems where /bin/sh is not Bash, running plain mount.glusterfs gives the unhelpful error "can't shift that many". The argument parsing can be a little improved. Adding a check for the number of arguments, minimal two (Gluster ip:/volume, and mountpoint), but possibly more (-o, -v etc.). With the additional check, running 'mount.glusterfs -h' now shows the following messags: Usage: /sbin/mount.glusterfs <server>:<volume/subdir> <mountpoint> -o<options> Options: man 8 mount.glusterfs To display the version number of the mount helper: /sbin/mount.glusterfs -V Change-Id: I50e3ade0c6217fab4155f35ad8cb35d99d52e133 Fixes: bz#1564890 Reported-by: Alexander Zimmermann <alexander.zimmermann96@gmail.com> Signed-off-by: Niels de Vos <ndevos@redhat.com>
* glusterd: fix coverity issuesSanju Rakonde2018-10-012-2/+3
| | | | | | | | | | | This patch fixes CID 1274175, 1175018. 1274175: Buffer size warning 1175018: Resource leak Change-Id: Id18960c249447b8dae35de3ad92bc570e62ddb09 updates: bz#789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* mdcache: Fix asan reported potential heap buffer overflowShyamsundarR2018-09-281-0/+1
| | | | | | | | | | | | | | The char pointer mdc_xattr_str in function mdc_xattr_list_populate is malloc'd and doing a strcat into a malloc'd region can overflow content allocated based on prior contents of the memory region. Added a NULL terimation to the malloc'd region to prevent the overflow, and treat it as an empty string. Change-Id: If0decab669551581230a8ede4c44c319ff04bac9 Updates: bz#1633930 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* libglusterfs : fix coverity issue in store.cSunny Kumar2018-09-271-1/+1
| | | | | | | | This patch fixes CID 1395102 and 1395103. Change-Id: Ia6093dc6a04dce3f523e015cf1d6d4c6bfccc1f6 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* python3: assume python3 unless building _packages_ on sys without py3Kaleb S. KEITHLEY2018-09-2713-24/+7
| | | | | | | | | | | | | | | The jenkins release-new job runs on a CentOS 7 box, which does not have python3. As a result it runs (autogen.sh and) configure before producing the dist tar file, converting all the python3 shebangs to python2 shebangs in the dist tar file. Then when that tar file is "carried" to, e.g. Fedora koji build system to build packages, the shebangs are incorrect, despite having originally been correct in the git repo. Change-Id: I5154baba3f6d29d3c4823bafc2b57abecbf90e5b updates: #411 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* rpc: failed requests immediately if rpc connection is downKinglong Mee2018-09-271-1/+4
| | | | | | | | | | | | In the case glfs_fini is ongoing, some cache xlators like readdir-ahead, continues to submit requests. Current rpc submit code ignores connection status and queues these internally generated requests. These requests then got cleaned up after inode table has been destroyed, causing crash. Change-Id: Ife6b17d8592a054f7a7f310c79d07af005087017 updates: bz#1626313 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* monitoring: create dump dir if it doesn't existAmar Tumballi2018-09-271-0/+8
| | | | | | | Fixes: bz#1624006 Change-Id: Ie78be72e2492cd02c1376852bb90f1e6661d9bea Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd: make sure that brickinfo->uuid is not nullSanju Rakonde2018-09-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: After an upgrade from the version where shared-brick-count option is not present to a version which introduced this option causes issue at the mount point i.e, size of the volume at mount point will be reduced by shared-brick-count value times. Cause: shared-brick-count is equal to the number of bricks that are sharing the file system. gd_set_shared_brick_count() calculates the shared-brick-count value based on uuid of the node and fsid of the brick. https://review.gluster.org/#/c/glusterfs/+/19484 handles setting of fsid properly during an upgrade path. This patch assumed that when the code path is reached, brickinfo->uuid is non-null. But brickinfo->uuid is null for all the bricks, as the uuid is null https://review.gluster.org/#/c/glusterfs/+/19484 couldn't reached the code path to set the fsid for bricks. So, we had fsid as 0 for all bricks, which resulted in gd_set_shared_brick_count() to calculate shared-brick-count in a wrong way. i.e, the logic written in gd_set_shared_brick_count() didn't work as expected since fsid is 0. Solution: Before control reaches the code path written by https://review.gluster.org/#/c/glusterfs/+/19484, adding a check for whether brickinfo->uuid is null and if brickinfo->uuid is having null value, calling glusterd_resolve_brick will set the brickinfo->uuid to a proper value. When we have proper uuid, fsid for the bricks will be set properly and shared-brick-count value will be caluculated correctly. Please take a look at the bug https://bugzilla.redhat.com/show_bug.cgi?id=1632889 for complete RCA Steps followed to test the fix: 1. Created a 2 node cluster, the cluster is running with binary which doesn't have shared-brick-count option 2. Created a 2x(2+1) volume and started it 3. Mouted the volume, checked size of volume using df 4. Upgrade to a version where shared-brick-count is introduced (upgraded the nodes one by one i.e, stop the glusterd, upgrade the node and start the glusterd). 5. after upgrading both the nodes, bumped up the cluster.op-version 6. At mount point, df shows the correct size for volume. fixes: bz#1632889 Change-Id: Ib9f078aafb15e899a01086eae113270657ea916b Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* libgfapi: fix use after freed of clnt when dispatching eventsKinglong Mee2018-09-261-2/+7
| | | | | | | | | Avoid dispatching events to mgmt after freed, unreference mgmt after the event_dispatch_destroy. Change-Id: I5b762b37901de70a955661df0aff95bf055ba4ea updates: bz#1626313 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* Quota related files: use dict_{setn|getn|deln|get_int32n|set_int32n|set_strn}Yaniv Kaul2018-09-2613-78/+134
| | | | | | | | | | | | | | In a previous patch (https://review.gluster.org/20769) we've added the key length to be passed to dict_* funcs, to remove the need to strlen() it. This patch moves some code to use it. Please review carefully. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: If4f425a9827be7c36ccfbb9761006ae824a818c6
* cluster/ec: variable-length array (VLA) declaration clang fixSheetal Pamecha2018-09-261-1/+1
| | | | | | | | | | | Problem: variable-length array size becomes zero Modified array size to size+1 while declaring Updates: bz#1622665 Change-Id: I98ee8447c87f37c36c49f50058292e8c1757a1f9 Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* features/locks: NULL pointer deferencing clang fixIraj Jamali2018-09-261-3/+3
| | | | | | | | | Added checks to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I8e441c2931f406a6012e418127550bdf454a599a Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* georep: python3 compatibility (Popen)Kotresh HR2018-09-253-12/+21
| | | | | | | | | | | | | | The file objects for python3 by default is opened in binary mode where as in python2 it's opened as text by default. The geo-rep code parses the output of Popen assuming it as text, hence used the 'universal_newlines' flag which provides backward compatibility for the same. Change-Id: I371a03b6348af9666164cb2e8b93d47475431ad9 Updates: #411 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* 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>