summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* posix: Implement a janitor thread to close fdMohit Agrawal2020-08-207-26/+160
| | | | | | | | | | | | | | Problem: In the commit fb20713b380e1df8d7f9e9df96563be2f9144fd6 we use syntask to close fd but we have found the patch is reducing the performance Solution: Use janitor thread to close fd's and save the pfd ctx into ctx janitor list and also save the posix_xlator into pfd object to avoid the race condition during cleanup in brick_mux environment Change-Id: Ifb3d18a854b267333a3a9e39845bfefb83fbc092 Fixes: #1396 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* open-behind: fix call_frame leakXavi Hernandez2020-08-201-4/+10
| | | | | | | | | | | | | When an open was delayed, a copy of the frame was created because the current frame was used to unwind the "fake" open. When the open was actually sent, the frame was correctly destroyed. However if the file was closed before needing to send the open, the frame was not destroyed. This patch correctly destroys the frame in all cases. Change-Id: I8c00fc7f15545c240e8151305d9e4cf06d653926 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com> Fixes: #1440
* dict: Remove redundant checksSheetal Pamecha2020-08-202-41/+30
| | | | | | fixes: #1428 Change-Id: I0cb1c42d620ac1aeab8da25a2e1d7835219d2e4a Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
* Remove need for /proc on FreeBSDDaniel Morante2020-08-207-4/+112
| | | | | Change-Id: Ieebd9a54307813954011ac8833824831dce6da10 Fixes: #1376
* tests: provide an option to mark tests as 'flaky'Amar Tumballi2020-08-2015-41/+57
| | | | | | | | | | | | | * also add some time gap in other tests to see if we get things properly * create a directory 'tests/000/', which can host any tests, which are flaky. * move all the tests mentioned in the issue to above directory. * as the above dir gets tested first, all flaky tests would be reported quickly. * change `run-tests.sh` to continue tests even if flaky tests fail. Reference: gluster/project-infrastructure#72 Updates: #1000 Change-Id: Ifdafa38d083ebd80f7ae3cbbc9aa3b68b6d21d0e Signed-off-by: Amar Tumballi <amar@kadalu.io>
* afr: add null check for thin-arbiter gfid.Ravishankar N2020-08-204-88/+13
| | | | | | | | | | | | | | | | | | | | | Problem: Lookup/creation of thin-arbiter ID file happens in background during mounting. On new volumes, if the ID file creation is in progress, and a FOP fails on data brick, a post-op (xattrop) is attemtped on TA. Since the TA file's gfid is null at this point, the ASSERT checks in protocol/ client causes a crash. Fix: Given that we decided to do Lookup/creation of thin-arbiter in background, fail the other AFR FOPS on TA if the ID file's gfid is null instead of winding it down to protocol/client. Also remove afr_changelog_thin_arbiter_post_op() which seems to be dead code. Updates: #763 Change-Id: I70dc666faf55cc5c8f7cf8e7d36085e4fa399c4d Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* features/shard: optimization over shard lookup in case of preallocVinayakswami Hariharmath2020-08-202-7/+84
| | | | | | | | | | | | | | | | | | | | | | | | | Assume that we are preallocating a VM of size 1TB with a shard block size of 64MB then there will be ~16k shards. This creation happens in 2 steps shard_fallocate() path i.e 1. lookup for the shards if any already present and 2. mknod over those shards do not exist. But in case of fresh creation, we dont have to lookup for all shards which are not present as the the file size will be 0. Through this, we can save lookup on all shards which are not present. This optimization is quite useful in the case of preallocating big vm. Also if the file is already present and the call is to extend it to bigger size then we need not to lookup for non- existent shards. Just lookup preexisting shards, populate the inodes and issue mknod on extended size. Fixes: #1425 Change-Id: I60036fe8302c696e0ca80ff11ab0ef5bcdbd7880 Signed-off-by: Vinayakswami Hariharmath <vharihar@redhat.com>
* afr/halo: Halo is not showing any split-brain infoRafi KC2020-08-201-0/+4
| | | | | | | | | | | | heal info command uses a gfapi based daemon to fetch the split-brain info. Since they are using the same graph as client, if the latency is high then one node will be considered as down. Hence it cannot detect any split-brain info Change-Id: Id1b72f9c0e49cc0d35ad751b8a17d64da41a5d39 Fixes: #1355 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
* libglusterfs: cleanup --disable-mempoolDmitry Antipov2020-08-193-121/+130
| | | | | | | | | Use trivial no-op mempool if configured with --disable-mempool. Cleanup OLD_MEM_POOLS leftovers, adjust related statedumps. Change-Id: Ibaa90e538a34f6dcd216e45c05dd32d955b151f6 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Fixes: #1359
* Quota quota_fsck.py, converting byte string to stringsrijan-sivakumar2020-08-191-0/+1
| | | | | | | | | | | | | | Issue: The quota_fsck.py script throws an TypeError due to the fact that the data is read as bytes and then the string operations are applied on the. Now, in python3 string is unicode and hence we get the type error. Code Changes: Decoding the bytes value into utf-8 format. Change-Id: Ia1ff52a821d664a371c8166692ff506ae39f6e40 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com> Fixes: #1401
* Events: Socket creation after getaddrinfo and IPv4 and IPv6 packet capturesrijan-sivakumar2020-08-193-15/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: Currently, the socket creation is done prior to getaddrinfo function being invoked. This can cause mismatch in the protocol and address families of the created socket and the result of the getaddrinfo api. Also, the glustereventsd UDP server by default only captures IPv4 packets hence IPv6 packets are not even captured. Code Changes: 1. Modified the socket creation in such a way that the parameters taken in are dependent upon the result of the getaddrinfo function. 2. Created a subclass for adding address family in glustereventsd.py for both AF_INET and AF_INET6. 3. Modified addresses in the eventsapiconf.py.in Reasoning behind the approach: 1. If we are using getaddrinfo function then socket creation should happen only after we check if we received back valid addresses. Hence socket creation should come after the call to getaddrinfo 2. The listening server which pushes the events to the webhook has to listen for both IPv4 and IPv6 messages as we would not be sure as to what address family is picked in _gf_event. Fixes: #1377 Change-Id: I568dcd1a977c8832f0fef981e1f81cac7043c760 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
* build: add custom clean rulesDmitry Antipov2020-08-191-1/+4
| | | | | | | | | Make 'clean' and 'gitclean' even more cleaner by removing extra build leftovers. Change-Id: I9c261e1f029b8486f328aaa330f0476d44b58eac Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* Use sysctl for get_mem_size() on FreeBSDDaniel Morante2020-08-191-1/+1
| | | | | Change-Id: Iab2600260707af02e2b8da9e489cbb12b9fc14a6 Fixes: #1376
* Add missing links to userspace RCUDaniel Morante2020-08-191-1/+2
| | | | | Change-Id: I77519eb5ffb6a4a1f51f8c60f3fdd0eb0576c4ee Fixes: #1376
* BSD: extattr_set_link and extattr_set_fd return bytes written not 0Daniel Morante2020-08-191-2/+2
| | | | | Change-Id: I120006dab4e199ad3d3f4a5ebc9c352f3c49ea7d Fixes: #1376
* Missing link to mntent_compat for glusterdDaniel Morante2020-08-191-2/+4
| | | | | Change-Id: I5d6d38759de4492de3256995e79d01b9ed7befef Fixes: #1376
* FreeBSD patches for fuse mount utilityDaniel Morante2020-08-192-1/+9
| | | | | Change-Id: Ib2bac85c28905bb8997fbb64db2308f2a6f31720 Fixes: #1376
* glusterd: performance improvementnik-redhat2020-08-184-69/+83
| | | | | | | | | | | | | | | | | | | | | | Issue: In the glusertd_op_stage_create_volume(), fetching of values from the dict is done, whereas same values are fetched by glusterd_check_brick_order() which is called from that function. This leads to unnecssary performance overhead. Fix: Instead of fetching the values again, passing the values to the glusterd_check_brick_order() if it's fethced before, else a NULL is passed and then only fetching is done here. Also, few changes are made to the code to reduce the cost of operations such as 'fast fail' for false conditions and a bit of code clean up. Fixes: #1397 Change-Id: Ic7b523adbca8eb63ef9eb29c206e3b19e05c0815 Signed-off-by: nik-redhat <nladha@redhat.com>
* glusterd: memory deallocated twicenik-redhat2020-08-183-16/+16
| | | | | | | | | | | | | | | | | | | | | Issue: If the the pointer tmptier is destroyed in the function code it still it checks for the same in the out label. And tries to destroy the same pointer again. Fix: So, instead of passing the ptr by value, if we pass it by reference then, on making the ptr in the function the value will persist, in the calling function and next time when the gf_store_iter_destory() is called it won't try to free the ptr again. CID: 1430122 Updates: #1060 Change-Id: I019cea8e301c7cc87be792c03b58722fc96f04ef Signed-off-by: nik-redhat <nladha@redhat.com>
* glusterd: shared storage mount fails in ipv6 environmentnik-redhat2020-08-182-1/+24
| | | | | | | | | | | | | | | | | Issue: In case of ipv6 environment, the mounting of glusterd_shared_storage volume fails as it doesn't recognises the ipv6 enviornment. Fix: In case of ipv6 environment, the address-family is passed to the hooks script on creating shared-storage, then depending upon the address-family --xlator-option=transport.address-family=inet6 option is added to the mount command, and the mounting succeeds. Fixes: #1406 Change-Id: Ib1888c34d85e6c01618b0ba214cbe1f57576908d Signed-off-by: nik-redhat <nladha@redhat.com>
* libglusterfs: add library wrapper for time()Dmitry Antipov2020-08-1722-38/+48
| | | | | | | | | Add thin convenient library wrapper gf_time(), adjust related users and comments as well. Change-Id: If8969af2f45ee69c30c3406bce5baa8305fb7f80 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* geo-rep: Fix string comparisonKotresh HR2020-08-171-1/+1
| | | | | | Fixes: #1438 Change-Id: If9f1c2e89e504512bcf77608fb4a4fedb19f0399 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: dump SSL error stack on disconnectLeonid Ishimnikov2020-08-131-0/+7
| | | | | | | | | | | | | | | | | Problem: When a non-SSL connection is attempted on an SSL-enabled management port, unrelated peers are subsequently disconnected from the node with a misleading error message. Cause: A non-SSL client causes OpenSSL to push a wrong version error into its thread-local error stack, but this error is never cleared, and it lingers in the stack until the thread is used by another SSL session, and a certain condition requires the error stack to be examined, at which time the old error is discovered and the connection is terminated. Solution: Log and clear the error stack upon terminating the connection. Change-Id: I82f3a723285df24dafc88850ae4fca65b69f6ae4 Fixes: #1418 Signed-off-by: Leonid Ishimnikov <lishim@fastmail.com>
* run-tests.sh: add index of the test being runAmar Tumballi2020-08-131-3/+4
| | | | | | | | | | | By showing details as (NNN / MMM) where NNN is the index and MMM is the total test count. This helps anyone looking at the console while tests are running to figure out progress. Updates: #1000 Change-Id: Id42435fada5325484d1bbc5fad8676af5dd1b5b0 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* afr/split-brain: fix client side split-brain resolution when quorum is enabledMohammed Rafi KC2020-08-135-16/+173
| | | | | | | | | | | | | | | | | | Problem: If we set favourite child policy, then automatic split-brain resolution should work in all cases. This was failing when quorum count was set to a non-zero value. The initial lookup before the read txn was failing with ENOTCONN. Since we don't have a readable subvol, we were failing it. We were only looking to the split brain resolution choice set through the cli command. Fix: We will now consider the favourite child policy if split-brain choice has not been set via cli command. Change-Id: Id2016c3a90d0763ac6f1a0131571053f595576f0 Fixes: #1404 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
* Events: Log file not re-opened after logrotate.srijan-sivakumar2020-08-111-1/+2
| | | | | | | | | | | | | | | | | Issue: The logging is being done in the same file even after the logrotate utility has changed the file. This causes the logfile to grow indefinitely. Code Changes: Using the WatchedFileHandler class instead of FileHandler class. This watches the file it is logging into and if the file changes, it is closed and reopened using the file name. Hence after file rotate, a new file will be used for logging instead of continuing with the same old file. Fixes: #1289 Change-Id: I773d04f17613a03709cb682692efb39fd8e664e2 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
* libglusterfs: annotate synctasks with ThreadSanitizer APIDmitry Antipov2020-08-113-0/+70
| | | | | | | | | | If --enable-tsan is specified and API headers are detected, annotate synctask context initialization and context switch with ThreadSanitizer API. Change-Id: I7ac4085d7ed055448f1fc80df7d59905d129f186 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Fixes: #1400
* glusterfs: infinite loop in common-utils.cSaju-Mohammed2020-08-071-16/+9
| | | | | | | | | | | | | | | | | Issue: function - gf_rev_dns_lookup_cache having an infinite loop when gf_dnscache_entry_init() returns NULL. Also when ip address is coming in as NULL. Fix: Code change has been done to handle the loop. Also minor CLINT warnings removed for common-utils.c Added review comment changes. Code changes for #790 Change-Id: I24446dc64c0409009e91e0bf57a699c85337c578 Fixes: #790 Signed-off-by: msaju <sajmoham@redhat.com>
* glusterd: Increase buffer length to save multiple hostnames in peer fileMohit Agrawal2020-08-041-3/+3
| | | | | | | | | | | | | | | Problem: At the time of handling friend update request glusterd updates peer file and if DNS has returned multiple hostnames for the same IP, glusterd saves all hostnames in peer file.In commit 1fa089e7a2b180e0bdcc1e7e09a63934a2a0c0ef We changed the approach to save all key value pairs in single shot. In case of a buffer is not having space to store the hostnames glusterd writes partial hostname in peer file. Solution: To avoid the failure increase the buffer length Change-Id: Iee969d165333e9c5ba69431d474c541b8f12d442 Fixes: #1407 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* tests: Fix regression failures of 01-georep-glusterd-tests.tShwetha K Acharya2020-08-031-1/+2
| | | | | | | | | | | | TEST $GEOREP_CLI $master $slave1 create push-pem force times out on Centos 7 builders. Increasing the GEO_REP_TIMEOUT and SCRIPT_TIMEOUT to address the same. Fixes: #1410 Change-Id: I81b5590e33f40ea4210cc56d18e2b9fa34033cd8 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* dht: optimize rebalance crawl pathSusant Palai2020-07-314-5/+524
| | | | | | | | | | | | | | | | | | | | | | For distribute only volumes we can use the information for local subvolumes to avoid syncop calls which goes through the whole stack to fetch stat and entries. A separate function gf_defrag_fix_layout_puredist is introduced. TODO: A glusterd flag needs to be introduced in case we want to fall back to run the old way. Perf numbers: DirSize - 1Million Old New %diff Depth - 100 (Run 1) 353 74 +377% Depth - 100 (Run 2) 348 72 +377~% Depth - 50 246 122 +100% Depth - 3 174 114 +52% Change-Id: I67cc136cebd34092fd775e69f74c2d5b33d3156d Fixes: #1242 Signed-off-by: Susant Palai <spalai@redhat.com>
* dict: optimize dict_serialized_length_lk functionMohit Agrawal2020-07-312-39/+12
| | | | | | | | | | | | To return the length of searlized dictionary the function iterates full dictionary and access every key value member of the dictionary.Instead of iterating full dictionary introduce a variable totkvlen at dictionary to save the key value length at the time of storing key/value pair in the dictionary. Change-Id: Ie8cfdea1cc335bce51f59179281df3c89afab68b Fixes: #1395 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* test: ./tests/features/ssl-ciphers.t fail on centos 8Mohit Agrawal2020-07-311-2/+9
| | | | | | | | | | Check the tlsv1 openssl connection based on openssl version. If openssl version is 1.1 it supports tls1 protocol otherwise it supports tlsv1_2 protocol. Fixes: #1403 Change-Id: I3ca286492049e6f84de70e3b969fa41db10378ab Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* glusterd/auth.allow : allow add-brick from peersSanju Rakonde2020-07-304-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | Problem: When auth.allow list is set to some ip's, add-brick operation is failing. Cause: add-brick commands creates a temparary mount on the bricks to set the extended attributes on the brick mount points. When auth.allow list is set to default i.e, * (all) we will not see any issue, but when it is set to certain ip's add-brick operation fails as temparory mount on the bricks fails because the peers are not part of auth.allow list. Solution: When auth.allow list is already set, add all the peers to the auth.allow list during add-brick operation. the old list will be replaced in post commit phase. As this can happen with replace-brick operation as well, added code to handle it. updates: #1391 Change-Id: I5ede8c35f05ab25ff431b88e074ddbe9c10a90f1 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* cluster/ec: Remove stale entries from indices/xattrop folderAshish Pandey2020-07-292-2/+78
| | | | | | | | | | | | | | | | | | | Problem: If a gfid is present in indices/xattrop folder while the file/dir is actaully healthy and all the xattrs are healthy, it causes lot of lookups by shd on an entry which does not need to be healed. This whole process eats up lot of CPU usage without doing meaningful work. Solution: Set trusted.ec.dirty xattr of the entry so that actual heal process happens and at the end of it, during unset of dirty, gfid enrty from indices/xattrop will be removed. Change-Id: Ib1b9377d8dda384bba49523e9ff6ba9f0699cc1b Fixes: #1385 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* statedump: Dump xlator-name for mem-pool objectPranith Kumar K2020-07-293-0/+3
| | | | | | Fixes: #1399 Change-Id: I11cf75a0ea9a16724f36f73feb1c90dabed25c4b Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* glusterd: fix resource leakSheetal Pamecha2020-07-291-0/+1
| | | | | | | CID: 1430146 Change-Id: Icce4ffa0e78575b110e0cfd9d5cfd133141680c1 Updates: #1060 Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
* libglusterfs/xlator: undefined symbol xlator_apinik-redhat2020-07-272-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Issue: On executiing the command gluster vol set help, an error comes up in glusterd logs stating `undefined symbol: xlator_api`. This issue is seen for the rpc-transport/socket.so file. Fix: The symbol `xlator_api` is not found in rpc-transport/socket.so file as it is not a xlator but a shared object for transport. In the `xlator.c` file, there is a function `xlator_volopt_dynload`, which looks for the default values of the options available in gluster, which is stored inside the respective xlator files for different voltypes. In each of these files the `options` object is present which contains the default values, which is therefore referenced from the `options` data member of `xlator_api` object in case of xlators.But, since `rpc-transport/socket.so` is not an xlator we don't have the `xlator_api` object present to point to that object. So, in case of `rpc-transport/socket.so` type we are accesing the `options` object directly from the `xlator_volopt_dynload` function to fetch the default values for the available options. Fixes: #827 Change-Id: I3b2b0c1f2a11896be250aaca1a33a65b044991d5 Signed-off-by: nik-redhat <nladha@redhat.com>
* extras/statedumpparse.rb updatesCsaba Henk2020-07-251-59/+92
| | | | | | | | | | | | | - allow reusing JSON formatted output with --input-format=json - improve code readability - improve human readable number formatting - represent empty sections with {} rather than nil - add memstat subformats (plain, human, json) - make parsing of numerals more strict Updates: #1000 Change-Id: I75833543c85ad2b9c2233a4a22b1ea53d24431b9 Signed-off-by: Csaba Henk <csaba@redhat.com>
* fuse: change setlk interrupt strategy to 'sync'Csaba Henk2020-07-241-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | The setlk interrupt handler uses a 'fork' of the resolved fuse state from setlk (a copy with some edits) to initiate its own auxiliary fop. Thus the references stored in the fuse states of the setlk fop and of its interrupt handler are shared (apart from the ones edited by the interrupt handler -- but the bulk of them remain as is). The lifetimes of these references are tied to the setlk fop, which has established them by properly claiming their backing resources. To guarantee the validity of these references in the interrupt context, we need to make sure that the setlk fop did not reclaim the fuse state while the interrupt handler is running. In other words, the setlk fop needs to wait for the termination of the interrupt handler, which is accomplished by the 'sync' strategy of the interrupt API (passing true for the 'sync' argument of fuse_interrupt_finish_{fop,interrupt} functions). Change-Id: I9a6dc76972507be4b7ba8d023cc876e5fddf813f Updates: #1374 Signed-off-by: Csaba Henk <csaba@redhat.com>
* fuse: fix waiting for interrupt handlerCsaba Henk2020-07-242-7/+22
| | | | | | | | | | | | | | | | | | | | | | | With 'sync' strategy, a fop's cbk waits for the interrupt handler to finish by making a call to fuse_interrupt_finish_fop() with sync = true. The wait is implemented by monitoring an interrupt_state struct member via a condition variable. However, due to broken code logic, the pthread_cond_wait() call is never reached. This change introduces a new member to the fuse_interrupt_state_t enum (the type of aforementioned struct member), FUSE_INTERRUPT_WAITING_HANDLER, which is then used for indicating the state of waiting for the interrupt handler. Change-Id: I72ab06c37f45ff8f212a6a632bac1f647af05cbd Updates: #1374 Signed-off-by: Csaba Henk <csaba@redhat.com>
* Make FUSE notification optional at configure timeEmmanuel Dreyfus2020-07-232-4/+17
| | | | | | | | | | NetBSD FUSE does not implement FUSE notification yet. This changes makes this feature a configure time option so that it can be disabled. Fixes: #1381 Change-Id: I3d977d8d69b57e1ac6957be84a9ddbb69b100893 Type: Bug Signed-off-by: Emmanuel Dreyfus manu@netbsd.org
* glusterd: getspec() returns wrong response when volfile not foundTamar Shacked2020-07-232-2/+6
| | | | | | | | | | | | | | | In a cluster env: getspec() detects that volfile not found. but further on, this return code is set by another call so the error is lost and not handled. As a result the server responds with ambiguous message: {op_ret = -1, op_errno = 0..} - which cause the client to stuck. Fix: server side: don't override the failure error. fixes: #1375 Change-Id: Id394954d4d0746570c1ee7d98969649c305c6b0d Signed-off-by: Tamar Shacked <tshacked@redhat.com>
* Screen the .attribute directory on NetBSDEmmanuel Dreyfus2020-07-231-0/+39
| | | | | | | | | | | This directory holds the extended attribute backing store on FFSv1 filesystems. It should be ignored by glusterfs just like the .glusterfs directory. Fixes: #1361 Change-Id: Ia259be2af722a651473a312b5044b431c2b01b10 Type: Bug Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
* contrib: remove contrib/sunrpc/xdr_sizeof.cYaniv Kaul2020-07-232-205/+1
| | | | | | | | | It's not needed, and it has a license that Fedora is not very happy with. Just removed that file. Change-Id: Ia753f0058c8a7c6482aca40c3b3dc8f6aa4a266d Fixes: #1383 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* multiple xlators: wording - replace blacklist, whitelistYaniv Kaul2020-07-232-12/+12
| | | | | | | | | | Replace the use of blacklist and whitelist within the code. No functional changes. Fixes: #1378 Change-Id: Iaa10e31c3d460f52bfd12da906789fccca5ba4d4 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* dht - fixing xattr inconsistencyBarak Sason Rofman2020-07-2211-13/+188
| | | | | | | | | | | | | | | | | The scenario of setting an xattr to a dir, killing one of the bricks, removing the xattr, bringing back the brick results in xattr inconsistency - The downed brick will still have the xattr, but the rest won't. This patch add a mechanism that will remove the extra xattrs during lookup. This patch is a modification to a previous patch based on comments that were made after merge: https://review.gluster.org/#/c/glusterfs/+/24613/ fixes: #1324 Change-Id: Ifec0b7aea6cd40daa8b0319b881191cf83e031d1 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* cluster/ec: Improve detection of new healsXavi Hernandez2020-07-226-28/+84
| | | | | | | | | | | | | | | | | | | | When EC successfully healed a directory it assumed that maybe other entries inside that directory could have been created, which could require additional heal cycles. For this reason, when the heal happened as part of one index heal iteration, it triggered a new iteration. The problem happened when the directory was healthy, so no new entries were added, but its index entry was not removed for some reason. In this case self-heal started and endless loop healing the same directory continuously, cause high CPU utilization. This patch improves detection of new files added to the heal index so that a new index heal iteration is only triggered if there is new work to do. Change-Id: I2355742b85fbfa6de758bccc5d2e1a283c82b53f Fixes: #1354 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* glusterfs.h: add IS_ERROR() and IS_SUCCESS() macroAmar Tumballi2020-07-211-1/+4
| | | | | | | | | | These macros helps to clearly identify all negetive checks are 'errors', and all 0 and above are success. With this clasification, we can add more error codes to the process / method / function. Updates: #280 Change-Id: I0ebc5c4ad41eb78e4f2c1b98648986be62e7b521 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* glusterd: avoid crashSanju Rakonde2020-07-201-1/+2
| | | | | | | | | When dirp is null, we should not call sys_closedir() on it. fixes: #1379 Change-Id: I33633df983aeea11e9d685e41ed9ec58644b6258 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>