summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* afr: restore timestamp of files during metadata healSheetal Pamecha2020-01-242-6/+76
| | | | | | | | | | | For files: During metadata heal, we restore timestamps only for non-regular (char, block etc.) files. Extenting it for regular files as timestamp is updated via touch command also fixes: bz#1787274 Change-Id: I26fe4fb6dff679422ba4698a7f828bf62ca7ca18 Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
* snapview: fix memory leakXie Changlong2020-01-231-3/+2
| | | | | | | | | Setting frame->local = local immediately after mem_get0. In this case, SVC_STACK_UNWIND will take of freeing the memory. Change-Id: If6433be0e14ed0f4ab4127f70a8875f81bb3e6b8 updates: bz#789278 Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
* server.c: fix Coverity issue 1405844 (memory - illegal access)Yaniv Kaul2020-01-231-2/+2
| | | | | | | | | | We can use memcpy() instead of strncpy() as both are strings that are 37 bytes (GF_UUID_BUF_SIZE) long. fixes: CID#1405844 Change-Id: Ic74e8817cd790c13e29f3e6be8f18f2bfff77115 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* multiple files: ensure nfs_svc functions are availableYaniv Kaul2020-01-237-25/+48
| | | | | | | | | | | | When gNFS is disabled in build time, we have to ensure taht the .stop(), .start() and other functions of the nfs_svc are not called, otherwise we'd crash. In addition, #ifdef more code that is gNFS related. updates: bz#1793995 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I5081f1670c04ca306aeaab7208829b0f2f149a42
* server: Mount fails after reboot 1/3 gluster nodesMohit Agrawal2020-01-223-16/+29
| | | | | | | | | | | | | | | | | Problem: At the time of coming up one server node(1x3) after reboot client is unmounted.The client is unmounted because a client is getting AUTH_FAILED event and client call fini for the graph.The client is getting AUTH_FAILED because brick is not attached with a graph at that moment Solution: To avoid the unmounting the client graph throw ENOENT error from server in case if brick is not attached with server at the time of authenticate clients. Credits: Xavi Hernandez <xhernandez@redhat.com> Change-Id: Ie6fbd73cbcf23a35d8db8841b3b6036e87682f5e Fixes: bz#1793852 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* posix-entry-ops.c/posix.h: improve GFID_NULL_CHECK_AND_GOTO macroYaniv Kaul2020-01-212-19/+31
| | | | | | | | | | | The macro already fetches from the dictionary the gfid-req variable. Instead of throwing it away, keep it and in 2 cases, re-use it later. updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Id6d42535132805ab69e7e3b802c140b90f2f8958
* Fix possible resource leaks.Xi Jinyu2020-01-211-0/+3
| | | | | | | | | | xlators/features/quota/src/quota.c quota_log_usage function. The quota_log_helper() function applies memory for path through inode_path(), should be GF_FREE(). fixes: bz#1792707 Change-Id: I33143bdf272bf10837061df4a1b7b2fc146162d5 Signed-off-by: Xi Jinyu <xijinyu@cmss.chinamobile.com>
* cli - removing fetch of unnecessary items.Barak Sason Rofman2020-01-211-66/+1
| | | | | | | | | | Somem methods dict_get...(...) values and then not use them anywhere. Removed found occurrences. fixes: #753 Change-Id: Iaeb8f4cec18f76078f6b2f4e4bd6f9795a3467bc Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* dictionary: remove the 'extra_free' parameterYaniv Kaul2020-01-216-34/+14
| | | | | | | | | | | | | | | This parameter may have been used in the past, but is no longer needed. Removing it and the few locations it was actually referenced. This allows to remove an extra memdup as well, that was not needed in the 1st place in server_setvolume() and unserialize_rsp_direntp() functions. A followup separate patch will remove extra_stdfree parmeter from the dictionary structure. Change-Id: Ica0ff0a330672373aaa60e808b7e76ec489a0fe3 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* pkg-version: fix warning due to wrong check.Amar Tumballi2020-01-201-1/+1
| | | | | | | | | | | | | | | | using '==' operator is bash specific, and was giving warnings like below when we ran `./autogen.sh` ``` build-aux/pkg-version: 26: [: x8dev: unexpected operator build-aux/pkg-version: 49: [: x384.git22c2725bb: unexpected operator ``` This was not seen where 'sh' is linked to 'bash'. Updates: bz#1193929 Change-Id: Ied0d6707dd8b5d78756f302b6319b6ef75143018 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* glusterd: fix use after freeXie Changlong2020-01-201-1/+3
| | | | | | updates: bz#789278 Change-Id: I652d8d4428cf6ce61b712a66d309e78030a5f911 Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
* name.c: fix Coverity issues 1412332/3 - strcat into uninitialized valueYaniv Kaul2020-01-191-2/+3
| | | | | | | | | | Check limit to 108 bytes before strcpy(). fixes: CID#1412332 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I8b26b1e1d2daca98ff36db531539bec0a405769c
* geo-rep: Fix ssh-port validationSunny Kumar2020-01-173-1/+32
| | | | | | | | | | | | | | | | | | | | | | If non-standard ssh-port is used, Geo-rep can be configured to use ssh port by using config option, the value should be in allowed port range and non negative. At present it can accept negative value and outside allowed port range which is incorrect. Many Linux kernels use the port range 32768 to 61000. IANA suggests it should be in the range 1 to 2^16 - 1, so keeping the same. $ gluster volume geo-replication master 127.0.0.1::slave config ssh-port -22 geo-replication config updated successfully $ gluster volume geo-replication master 127.0.0.1::slave config ssh-port 22222222 geo-replication config updated successfully This patch fixes the above issue and have added few validations around this in test cases. Change-Id: I9875ab3f00d7257370fbac6f5ed4356d2fed3f3c Fixes: bz#1792276 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* events: fix IPv6 memory corruptionXavi Hernandez2020-01-171-41/+15
| | | | | | | | | | | | | When an event was generated and the target host was resolved to an IPv6 address, there was a memory overflow when that address was copied to a fixed IPv4 structure (IPv6 addresses are longer than IPv4 ones). This fix correctly handles IPv4 and IPv6 addresses returned by getaddrinfo() Change-Id: I5864a0c6e6f1b405bd85988529570140cf23b250 Fixes: bz#1790870 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* Be explicit on this being a python3 scriptMichael Scherer2020-01-161-1/+1
| | | | | | | | | | | | | While the script seems to work on both python3 and python2, this break the build of rawhide RPM who requires script to be either using python2 or python3. Since python2 is going to be deprecated, I guess we should aim for python3. Change-Id: Ic6322ad47772d708b60b96652a1122ee4a54141d Fixes: bz#1791682 Signed-off-by: Michael Scherer <misc@fedoraproject.org>
* protocol/client: Fix a log entryAnoop C S2020-01-151-1/+1
| | | | | | | | | It has been a while since we removed lock healing logic from protocol client. So no need to mention that we healed locks after fd reopen. Change-Id: I24bd3f9e9f2942e306714b2cb83c229ae57c60ae Fixes: bz#1193929 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* dht-hashfn.c: remove a strlen()Yaniv Kaul2020-01-141-16/+19
| | | | | | | | | | | We already have the length of the name, or when we munge it, we can return the length of it instead of strlen() again. Also, reduce a bit the code under the lock. Change-Id: I0141b0725ed1a4134d8d9f81ed1187b551b038b5 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* multiple xlators: reduce key lengthYaniv Kaul2020-01-1417-125/+123
| | | | | | | | | | | | | | | In many cases, we were freely allocating long keys with no need. Smaller char arrays are just fine almost anywhere, so just went ahead and looked where they we can use smaller ones. In some cases, annotated the functions as static and the prefixes passed as const as it was easier to read and understand. Where relevant, converted the dict functions to use known key length. Change-Id: I882ab33ea20d90b63278336cd1370c09ffdab7f2 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* xlator/changelog: structure loggingyatipadia2020-01-148-155/+209
| | | | | | | | | convert all gf_msg() to gf_smsg() Change-Id: I2303aeaa0775b663e2ea5741166a457cd747d2ac Updates: #657 Signed-off-by: yatipadia <ypadia@redhat.com> Signed-off-by: yatip <ypadia@redhat.com>
* api-glfs-fops: structure loggingyatipadia2020-01-147-286/+330
| | | | | | | | Convert gf_msg() to gf_smsg() Change-Id: Iceb40d60a75106c7b4b0a2487b611f7376bccc46 Updates: #657 Signed-off-by: yatipadia <ypadia@redhat.com>
* tools/glusterfind: Remove an extra argumentShwetha K Acharya2020-01-141-1/+1
| | | | | | fixes: bz#1790748 Change-Id: I1cb12c975142794139456d0f8e99fbdbb03c53a1 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* xlator/bit-rot-stub-helpers: structure loggingyatipadia2020-01-143-71/+76
| | | | | | | | convert gf_msg() to gf_smsg() Change-Id: Id03b6a2f6817101650ea6eeffb10e91c09e6ef80 Updates: #657 Signed-off-by: yatipadia <ypadia@redhat.com>
* xlators/storage: remove duplicated includesDmitry Antipov2020-01-133-3/+0
| | | | | | | | Do not include ftw.h twice. Change-Id: Id9e8d1813aafd890940adcd6883d90fa1b4beaf9 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: bz#1193929
* xlators/storage: prefer HAVE_xxx to host C library predefinesDmitry Antipov2020-01-131-5/+1
| | | | | | | | | Rely on configure-time HAVE_SET_FSID instead of predefined linux and __GLIBC__, in the same way as fusermount.c does. Change-Id: If81f821014bbf3fdc43950670e316b4d178b4cac Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: bz#1193929
* dict: use the free_pair's key presence or NULL as a sign of use.Yaniv Kaul2020-01-132-18/+15
| | | | | | | | | | | | | Instead of using a boolean parameter, we can use the key variable. If it's NULL, the pair is not used and can be used. Otherwise, it's in use - don't use. It saves this annoying boolean, which causes the compiler (or us explicitly) to pad with additional bytes the dict struct. Change-Id: I89f52db57f35b3ef8acf57b7de2cee37f5d18e06 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* socket.c/name.c: minor changesYaniv Kaul2020-01-133-238/+136
| | | | | | | | | | | | | | - Move functions to static - Remove redundant checks - Use dict_get_...sizen() where applicable - Remove unused variables. - Moved some code to be executed only if relevant. ~3% object size reduction. Change-Id: Id9b8414e0a17442f1dac10ba77014d565756c935 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* rpc-transport: minor changesYaniv Kaul2020-01-132-61/+32
| | | | | | | | | | - Removed dead code - Remove redundant checks - Changed dict functions to use dict_..._sizen() functions. Change-Id: If00aaa90eef4078effd5b7fed2294f872e001b0a updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterd-volgen.c: fix to disable property when gNFS disabled.Yaniv Kaul2020-01-131-8/+10
| | | | | | | | | | | | | | | | | | | The code was not ifdef'ed properly when gNFS was not enabled. Strangely, I could not reproduce the failure on my system (Fedora 31), but it was reproduced elsehwere and the fix was verified to correct it. The failure: gluster volume create testvol replica 3 127.0.0.2:/tests/brick{1..3} force gluster v set testvol write-behind off grep -rne write-behind /var/lib/glusterd/vols/testvol/trusted-testvol.tcp-fuse.vol The last grep was supposed to come out empty. The issue was that perfxl_option_handler may not have been called when it should have been. Change-Id: Ie9f8ec87dabeef6624527c2266ddf9af01ca7373 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterfind: python3 compatibilitySunny Kumar2020-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: While we delete gluster volume the hook script 'S57glusterfind-delete-post.py' is failed to execute and error message can be observed in glusterd log. Traceback: File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 69, in <module> main() File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 39, in main glusterfind_dir = os.path.join(get_glusterd_workdir(), "glusterfind") File "/usr/lib64/python3.7/posixpath.py", line 94, in join genericpath._check_arg_types('join', a, *p) File "/usr/lib64/python3.7/genericpath.py", line 155, in _check_arg_types raise TypeError("Can't mix strings and bytes in path components") from None TypeError: Can't mix strings and bytes in path components Solution: Added the 'universal_newlines' flag to Popen to support backward compatibility. Change-Id: Ie5655b11b55535c5ad2338108d0448e6fdaacf4f Fixes: bz#1789478 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterfind: Fix py2/py3 issuesKotresh HR2020-01-102-9/+13
| | | | | | | | | | | 1. In dictionary values(), returns list in py2 and not in py3. So explicitly convert it into list. 2. xattr module returns values in bytes. So explicitly convert them to str to work both with py2 and py3 fixes: bz#1789439 Change-Id: I27a639cda4f7a4ece9744a97c3d16e247906bd94 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* dht-rename.c: fix Coverity issues 1397018/7 - strcat into uninitialized valueYaniv Kaul2020-01-101-0/+4
| | | | | | | | | initialize both src and dst if they were not initialized already. fixes: CID#1397018 Change-Id: Ic91954423953e8bf24eaa11fc2798c554f304d28 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* multiple: fix bad type castXavi Hernandez2020-01-106-21/+42
| | | | | | | | | | | | When using inode_ctx_get() or inode_ctx_set(), a 'uint64_t *' is expected. In many cases, the value to retrieve or store is a pointer, which will be of smaller size in some architectures (for example 32-bits). In this case, directly passing the address of the pointer casted to an 'uint64_t *' is wrong and can cause memory corruption. Change-Id: Iae616da9dda528df6743fa2f65ae5cff5ad23258 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com> Fixes: bz#1785611
* fuse: degrade logging of write failure to fuse deviceCsaba Henk2020-01-092-7/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: FUSE uses failures of communicating with /dev/fuse with various errnos to indicate in-kernel conditions to userspace. Some of these shouldn't be handled as an application error. Also the standard POSIX errno description should not be shown as they are misleading in this context. Solution: When writing to the fuse device, the caller of the respective convenience routine can mask those errnos which don't qualify to be an error for the application in that context, so then those shall be reported at DEBUG level. The possible non-standard errnos are reported with their POSIX name instead of their description to avoid confusion. (Eg. for ENOENT we don't log "no such file or directory", we log indeed literal "ENOENT".) Change-Id: I510158843e4b1d482bdc496c2e97b1860dc1ba93 updates: bz#1193929 Signed-off-by: Csaba Henk <csaba@redhat.com>
* leases: re-alignment of structuresPurna Pavan Chandra Aekkaladevi2020-01-091-15/+20
| | | | | | | | | | | | | | | All the structs present inside xlators/features/leases have been re-aligned into memory efficient way. Changes are made in such a way that every members are 8 byte aligned and no padding is left out in the 8 byte line. Manual padding has been added to remove compile time padding (which happens at the end of the struct). This manual padding is for development and debugging benefits. It lets to use -Wpadded option and raise warnings from the remaining structs where compile time padding happens. Change-Id: I083d2de80e24f363c97adadcba64825e213050fc Updates: bz#1754448 Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkala@redhat.com>
* glusterd: increase the StartLimitBurstSanju Rakonde2020-01-081-1/+1
| | | | | | | | | | Based on https://bugzilla.redhat.com/show_bug.cgi?id=1782200#c6 increasing the limit. fixes: bz#1782200 Change-Id: Ia885c7bdb2a90f0946c5268da894f6a4da5a69b7 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* afr: expose cluster.optimistic-change-log to CLI.Ravishankar N2020-01-073-0/+8
| | | | | | | | | | | This volume option was not made avaialble to `gluster volume set` CLI. Reported-by: epolakis(https://github.com/kinsu) in https://github.com/gluster/glusterfs/issues/781 fixes: bz#1787554 Change-Id: I7141bdd4e53ee99e22b354edde8d023bfc0b2cd7 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* cli - fixing a coverity issueBarak Sason Rofman2020-01-071-1/+1
| | | | | | | | | | Removed unused variable. fixes: CID#1412106 updates: bz#789278 Change-Id: I1d4e1c1625cecf882d51e9cf4f5290383f63d405 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* mgmt/glusterd: Correct the log path of valgrind.He Min2020-01-061-1/+1
| | | | | | | | | | | | | | | | | Problem: Currently enabling run-with-valgrind will cause the gnfs and quota to fail to start. The phenomenon is as follows. ------------------------------------------------------------------------------ NFS Server on localhost 2049 0 N 48406 Quota Daemon on localhost N/A N/A N 48428 ------------------------------------------------------------------------------ Solution: The cause of the above phenomenon is that the log path of valgrind is set incorrectly. Gnfs and quota can start with valgrind normally after correcting the log path. Updates: #788 Change-Id: Ib91408c08522ff66afff908fbff3fce4b93ea770 Signed-off-by: He Min <hemin@cmss.chinamobile.com>
* xlator/performance/io-threads: structure loggingyatipadia2020-01-062-23/+33
| | | | | | | convert gf_msg() to gf_smsg() Change-Id: I35c6f62c346a75ecb22cd3a4346ad4dc48f09a91 Updates: #657
* xlator/io-cache: structure loggingyatipadia2020-01-064-100/+112
| | | | | | | | | Convert all gf_msg() to gf_smsg() Updates: #657 Change-Id: I72215b2518df78174dda8a7bc8de6f21fe1ba10f Signed-off-by: yatipadia <ypadia@redhat.com>
* posix-metadata.c: try to getxattr in one call.Yaniv Kaul2020-01-061-48/+61
| | | | | | | | | | | | | | | | | Another location where instead of 2 sys calls we strive to get the xattr in a single call, by guesstimating the required size And avoid (or try to) not to first read the xattr len, then another call to actually fetch. Instead, use a sane size (256 bytes - worth checking if it makes sense or by default use a larger size), and see if we can fetch it. If we fail, we'll read the size and re-fetch. Such changes are needed elsewhere too (see https://github.com/gluster/glusterfs/issues/720 ) Change-Id: I466cea9d8b12fc45f6b37d202b1294ca28cd1fdd updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* cli: duplicate defns of cli_default_conn_timeout and cli_ten_minutes_timeoutKaleb S. KEITHLEY2020-01-062-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Winter is coming. So is gcc-10. Compiling with gcc-10-20191219 snapshot reveals dupe defns of cli_default_conn_timeout and cli_ten_minutes_timeout in .../cli/src/cli.[ch] due to missing extern decl. There are many changes coming in gcc-10 described in https://gcc.gnu.org/gcc-10/changes.html compiling cli.c with gcc-9 we see: ... .quad .LC88 .comm cli_ten_minutes_timeout,4,4 .comm cli_default_conn_timeout,4,4 .text .Letext0: ... and with gcc-10: ... .quad .LC88 .globl cli_ten_minutes_timeout .bss .align 4 .type cli_ten_minutes_timeout, @object .size cli_ten_minutes_timeout, 4 cli_ten_minutes_timeout: .zero 4 .globl cli_default_conn_timeout .align 4 .type cli_default_conn_timeout, @object .size cli_default_conn_timeout, 4 cli_default_conn_timeout: .zero 4 .text .Letext0: ... which is reflected in the .o file as (gcc-9): ... 0000000000000004 C cli_ten_minutes_timeout 0000000000000004 C cli_default_conn_timeout ... and (gcc-10): ... 0000000000000020 B cli_ten_minutes_timeout 0000000000000024 B cli_default_conn_timeout ... See nm(1) and ld(1) for a description C (common) and B (BSS) and how they are treated by the linker. Note: there is still a small chance that gcc-10 will land in Fedora-32, despite 31 Dec. 2019 having been the deadline for that to happen. Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c Fixes: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* lock: fix Coverity CID 1412107Xie Changlong2020-01-061-0/+2
| | | | | | | | To avoid memory leak. Change-Id: Ib802be310fe989223afd623d3e5a9c9016d4fd38 updates: bz#789278 Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
* [geo-rep] Improving help message in schedule_georep.py.inkshithijiyer2020-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SLAVE positional argument doesn't provide a clear picture of what it is when compared to mastervol and slavevol in schedule_georep.py.in. It would be better if we change it to something like "Slave hostame (<username>@SLAVEHOST or SLAVEHOST)" Present: ---------- positional arguments: mastervol Master Volume Name SLAVE SLAVEHOST or root@SLAVEHOST or user@SLAVEHOST slavevol Slave Volume Name Suggested: ----------- positional arguments: mastervol Master Volume Name SLAVE Slave hostname (<username>@SLAVEHOST or SLAVEHOST) slavevol Slave Volume Name fixes: bz#1786276 Change-Id: I73d52247997d623f77d55e51cbb6eccc08eb95ff Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
* geo-rep: Note section is required for ignore_deletesShwetha K Acharya2020-01-036-11/+102
| | | | | | | | | | | | | | | | There exists a window of 15 sec, where the deletes are picked up by history crawl when the ignore_deletes is set to true. And it eventually deletes the file/s from slave which is/are not supposed to be deleted. Though it is working as per design, a note regarding this is needed. Added a warning message indicating the same. Also logged info when the worker restarts after ignore-deletes option set. fixes: bz#1708603 Change-Id: I103be882fac18b4cef935efa355f5037a396f7c1 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* posix: improve posix_{set_gfid2path_xattr|remove_gfid2path_xattr} funcsYaniv Kaul2020-01-033-81/+64
| | | | | | | | | | 1. Move them to posix-entry-ops.c and make them static. 2. Remove useless 'val' parameter allocation and snprintf() in posix_set_gfid2path_xattr(), as it was identical to pgfid_bname. Change-Id: I41f3946c6c42aee9d7cf1150e21b442438fbcce2 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* afr: simplify afr_has_quorum()Yaniv Kaul2020-01-023-29/+10
| | | | | | | | | | | | | 1. Perform AFR_COUNT() once, in afr_has_quorum() and pass the result to afr_lookup_has_quorum() 2. Simplify afr_lookup_has_quorum() - pass less parameters to it. (Via the change in item 1 above). 3. Make afr_is_add_replica_mount_lookup_on_root() static function. 4. Remove dead code - afr_decide_heal_info() which was not used. Change-Id: If9168cd01e22788a0e60b91e315787d2aa60e97b updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* Remove some compiler warnings when not compiling gNFSYaniv Kaul2020-01-022-4/+4
| | | | | | | | | | As a follow up to https://review.gluster.org/#/c/glusterfs/+/23799/ When compiling without gNFS, there were some 'unused' warnings by the compiler. This patch fixes them. Change-Id: I621562261f53950e821a450e0e7da304d00ae557 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterd: deafult options after volume resetSanju Rakonde2020-01-012-0/+28
| | | | | | | | | | | | | | | | | | | Problem: default option itransport.address-family is disappered in volume info output after a volume reset. Cause: with 3.8.0 onwards volume option transport.address-family has default value, any volume which is created will have this option set. So, volume info will show this in its output. But, with reset volume, this option is not handled. Solution: In glusterd_enable_default_options(), we should add this option along with other default options. This function is called by glusterd_options_reset() with volume reset command. fixes: bz#1786478 Change-Id: I58f7aa24cf01f308c4efe6cae748cc3bc8b99b1d Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* cli, libglusterfs: rely on libpthread static initializersDmitry Antipov2020-01-014-45/+11
| | | | | | | | | | | | cli-cmd.c: drop cli_cmd_cond_init() because static mutex and condition variable are initialized with PTHREAD_xxx_INITIALIZERs. syncop-utils.c: since assignment PTHREAD_xxx_INITIALIZERs are never failed, a few overengineered bits may be simplified. Change-Id: Ic4d250a1697047386989f73f058b0abc8b55627b Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: bz#1193929