summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* server: Resolve memory leak path in server_initMohit Agrawal2018-12-032-40/+47
| | | | | | | | | | | | | | Problem: 1) server_init does not cleanup allocate resources while it is failed before return error 2) dict leak at the time of graph destroying Solution: 1) free resources in case of server_init is failed 2) Take dict_ref of graph xlator before destroying the graph to avoid leak Change-Id: I9e31e156b9ed6bebe622745a8be0e470774e3d15 fixes: bz#1654917 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* features/bitrot: compare the signature with proper lengthRaghavendra Bhat2018-12-032-8/+14
| | | | | | | | | | | | | | | | | | | | | * The scrubber was comparing the checksum of the file that it calculated (by reading the file) with the on disk signature (stored via xattr) wrongly. It was using strlen to calculate the signature, while the actual length of the signature is given by the brick. Just use the actual length that the brick provides instead of trying to calculate the signature length via strlen API. * In posix, gfid2path was using the same string that contains the list of all the xattrs of file to save the value of the gfid2path xattr as well. This causes confusion when gfid2path xattr is queried by scrubber for getting the actual path of a corrupted file. Use separate string to fetch the value of the xattr instead of the string that contains the list of xattrs. Change-Id: I2d664ab524d2b312233476cb35863dde3122e9a9 fixes: bz#1654805 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* afr: assign gfid during name heal when no 'source' is present.Ravishankar N2018-12-034-52/+52
| | | | | | | | | | | | | | | | | | Problem: If parent dir is in split-brain or has dirty xattrs set, and the file has gfid missing on one of the bricks, then name heal won't assign the gfid. Fix: Use the brick we select the gfid from as the 'source'. Note: Problem was found while trying to debug a split-brain issue on Cynthia Zhou's setup. updates: bz#1637249 Change-Id: Id088d4f0fb017aa35122de426654194e581ed742 Reported-by: Cynthia Zhou <cynthia.zhou@nokia-sbell.com> Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* leases: Do not conflict with internal fopsSoumya Koduri2018-12-031-0/+11
| | | | | | | | | | | | | | Internal fops (with frame->root->pid < 0) are used to heal or move data and maintains data integrity. That is they do not modify client data which holds the lease. Hence no need to recall Lease for such fops. Note: Like for locks, we would need rebalance and self-heal daemon process to heal lease state as well. Change-Id: I8988693fef8d00e17c19dcc842e2238f9eb5ab48 updates: bz#1648768 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* nfs : set ctx for every inode looked up nfs3_fh_resolve_inode_lookup_cbk()Jiffin Tony Thottan2018-12-031-0/+6
| | | | | | | | | | | | The inode ctx for nfs xlator is set with help nfs_fix_generation. But currently gnfs is crashing because inode_ctx is becoming null nfs3_resolve_inode_hard() is used to perform a lookup on entire path and looks like function is missing to set the ctx for inode. This patch will set ctx for the inode which it looked on. Change-Id: I464fa7f78df1bae990ebe97de8ccf6d5fb74fc9f fixes: bz#1651439 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
* clang: Fix io-stats.c NULL pointer issue reported by clangShyamsundarR2018-12-031-5/+6
| | | | | | | | | | | | | | | | The issue pertains to checking if conf is NULL in BUMP_FOP but not providing that safety in io_stats_release when using conf to lock and bump nr_opens. This is now corrected to check if conf is non-NULL before attempting the lock and bump nr_opens. Tested with local clang analyzer to ensure this fixes the problem. Change-Id: Iffd6a97c2060d0a6930a8dc5914b1956c192cab1 Updates: bz#1622665 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* Multiple xlator .h files: remove unused private gf_* memory types.Yaniv Kaul2018-11-3015-110/+47
| | | | | | | | | | | | | It seems there were quite a few unused enums (that in turn cause unndeeded memory allocation) in some xlators. I've removed them, hopefully not causing any damage. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I8252bd763dc1506e2d922496d896cd2fc0886ea7
* clang: Fix clang warnings in snapview-server.cShyamsundarR2018-11-291-12/+0
| | | | | | | | | | | | | | | | | | | | | The warning by clang is due to the fact that we check for frame->root to be NULL, but in stack unwind, we ignore the same. If frame is non-NULL then frame->root is non-NULL as frame creation ensures this. Further, across the code we do not check both frame and frame->root for validity. Hence to fix these clang issues, removing the check for frame->root in the various functions. NOTE: Initially clang reported 14 issues in the file, but post commit 6eabefe6 the number reduced to 4, unsure why as that commit does not address this issue. Change-Id: I04b63f2d006a1f95773aae9f904b4bd3d5118e62 Updates: bz#1622665 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* rpcsvc: provide each request handler thread its own queueRaghavendra Gowdappa2018-11-291-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A single global per program queue is contended by all request handler threads and event threads. This can lead to high contention. So, reduce the contention by providing each request handler thread its own private queue. Thanks to "Manoj Pillai"<mpillai@redhat.com> for the idea of pairing a single queue with a fixed request-handler-thread and event-thread, which brought down the performance regression due to overhead of queuing significantly. Thanks to "Xavi Hernandez"<xhernandez@redhat.com> for discussion on how to communicate the event-thread death to request-handler-thread. Thanks to "Karan Sandha"<ksandha@redhat.com> for voluntarily running the perf benchmarks to qualify that performance regression introduced by ping-timer-fixes is fixed with this patch and patiently running many iterations of regression tests while RCAing the issue. Thanks to "Milind Changire"<mchangir@redhat.com> for patiently running the many iterations of perf benchmarking tests while RCAing the regression caused by ping-timer-expiry fixes. Change-Id: I578c3fc67713f4234bd3abbec5d3fbba19059ea5 Fixes: bz#1644629 Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
* libglusterfs: rename macros roof and floor to not conflict with math.hRaghavendra Gowdappa2018-11-287-25/+26
| | | | | | Change-Id: I666eeb63ebd000711b3f793b948d4e0c04b1a242 Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> Updates: bz#1644629
* glusterd: volume-ops calls naked mallocKaleb S. KEITHLEY2018-11-281-2/+2
| | | | | | | | | | | | | | | | libglusterfs provides wrapper functions MALLOC/__gf_default_malloc, CALLOC/__gf_default_calloc, and REALLOC/__gf_default_realloc for those few places outside of mempool.c that need to call malloc/calloc/realloc directly. Notable exceptions are "contrib" code, e.g. rbtree and timer-wheel, and perhaps parsers generated by yacc+lex. But even parsers can be fixed to at least call the wrappers mentioned above, if not our own allocators Change-Id: Ie6156307b6d2183be9c9aff153afb7598974f4e4 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* posix: fix memory leakAmar Tumballi2018-11-282-7/+23
| | | | | | | | | | | | | | | | | | | | | | | Direct leak of 609960 byte(s) in 4485 object(s) allocated from: #0 0x7f0d719bea50 in __interceptor_calloc (/lib64/libasan.so.5+0xefa50) #1 0x7f0d716dc08f in __gf_calloc ../../../libglusterfs/src/mem-pool.c:111 #2 0x7f0d5d41d9b2 in __posix_get_mdata_xattr ../../../../../xlators/storage/posix/src/posix-metadata.c:240 #3 0x7f0d5d41dd6b in posix_get_mdata_xattr ../../../../../xlators/storage/posix/src/posix-metadata.c:317 #4 0x7f0d5d39e855 in posix_fdstat ../../../../../xlators/storage/posix/src/posix-helpers.c:685 #5 0x7f0d5d3d65ec in posix_create ../../../../../xlators/storage/posix/src/posix-entry-ops.c:2173 Direct leak of 609960 byte(s) in 4485 object(s) allocated from: #0 0x7f0d719bea50 in __interceptor_calloc (/lib64/libasan.so.5+0xefa50) #1 0x7f0d716dc08f in __gf_calloc ../../../libglusterfs/src/mem-pool.c:111 #2 0x7f0d5d41ced2 in posix_set_mdata_xattr ../../../../../xlators/storage/posix/src/posix-metadata.c:359 #3 0x7f0d5d41e70f in posix_set_ctime ../../../../../xlators/storage/posix/src/posix-metadata.c:616 #4 0x7f0d5d3d662c in posix_create ../../../../../xlators/storage/posix/src/posix-entry-ops.c:2181 We were freeing only the first context in inode during forget, and not the second. updates: bz#1633930 Change-Id: Ib61b4453aa3d2039d6ce660f52ef45390539b9db Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd: perform store operation in cleanup lockAtin Mukherjee2018-11-271-0/+8
| | | | | | | | | All glusterd store operation and cleanup thread should work under a critical section to avoid any partial store write. Change-Id: I4f12e738f597a1f925c87ea2f42565dcf9ecdb9d Fixes: bz#1652430 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd : fix high sev coverity issueSunny Kumar2018-11-271-3/+2
| | | | | | | | This patch fixes CID : 1174824 : RESOURCE_LEAK Change-Id: I59d2d6ebc1fa3d7ebe0b97c7dbe3c5539128522a updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* coverity: Fix coverity issuesMohammed Rafi KC2018-11-263-1/+9
| | | | | | | | | | | | | | | | This patch fixes coverity CID : 1356537 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389108&defectInstanceId=26791927&mergedDefectId=1356537 CID : 1395666 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389187&defectInstanceId=26791932&mergedDefectId=1395666 CID : 1351707 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389027&defectInstanceId=26791973&mergedDefectId=1351707 CID : 1396910 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389027&defectInstanceId=26791973&mergedDefectId=13596910 Change-Id: I8094981a741f4d61b083c05a98df23dcf5b022a2 updates: bz#789278 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* glusterd: make max-bricks-per-process default value to 250Atin Mukherjee2018-11-251-1/+1
| | | | | | Change-Id: Ia2c6a10e2b76a4aa8bd4ea97e5ce33bdc813942e Fixes: bz#1652118 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: volume status should not show NFS daemonSanju Rakonde2018-11-251-0/+5
| | | | | | | | | With commit 8ad159b2a7, bz#1511339 got reintroduced. fixes: bz#1511339 Change-Id: I1e34c1fc60c6dda04af25d123f1ca40964cadb7a Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* meta/coverity: Fix coverity in meta xlatorMohammed Rafi KC2018-11-251-5/+6
| | | | | | | | | | | CID : 1356536 Macro compares unsigned to 0 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389645&defectInstanceId=26791929&mergedDefectId=1356536 CID : 1356535 Macro compares unsigned to 0 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389645&defectInstanceId=26791926&mergedDefectId=1356535 Change-Id: Icb1c9035589fa871c7223f767adbe0dfa672a9b4 updates: bz#789278 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* core: create a constant for default network timeoutXavi Hernandez2018-11-233-4/+2
| | | | | | | | | | A new constant named GF_NETWORK_TIMEOUT has been defined and all references to the hard-coded timeout of 42 seconds have been replaced with this constant. Change-Id: Id30f5ce4f1230f9288d9e300538624bcf1a6da27 fixes: bz#1652852 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* features/changelog: Fix dictionary-leakPranith Kumar K2018-11-231-5/+0
| | | | | | | | | | rpcsvc_transport_unix_options_build() allocates the dictionary and sets it in the options variable, there is no need to allocate it before passing to the function in changelog_rpc_server_init() updates bz#1650403 Change-Id: I5b4caedba6bda706dee723a2be34c3981bf971fb Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* dht: fix buffer overflowSusant Palai2018-11-231-6/+35
| | | | | | | | CID: 1382461 Change-Id: I25b5edf7fd5fdaa52079d0348ebb7f5de9f11503 updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* protocol/client: unchecked return valueShwetha Acharya2018-11-201-1/+6
| | | | | | | | | | | | | | Problem: In client_process_response_v2, value returned from function client_post_common_dict is not checked for errors before being used. Solution: Added a check condition to resolve the issue. CID: 1390020 Change-Id: I4d297f33c8dd332ae5f6f21667a4871133b2b570 updates: bz#789278 Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
* snapview-server: close the gfapi handle present in a forgotten inodeRaghavendra Bhat2018-11-201-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the snapdaemon can reach the lru limit of the inode table and start sending forgets on the inodes that are least recently used. snapview-server maintains the mapping between the domain of the snapdaemon and the gfapi instance which it uses to access the snapshots via a handle that is stored in the inode context of snapdaemon's inode. The handle is glfs_h_object structure which itself points to the actual inode present in the gfapi world. But, when snapview-server receives forget on a inode, it deleted the inode context without actually closing the handle it had obtained to map the inode from snapdaemon to the inode in gfapi world. So, this change makes sure that, the handle is closed as part of the inode forget. And this closure of the handle will result in gfapi world receiving forget and unref on its corresponding inode. But care must be taken to ensure before the closure to ensure that the gfapi instance from which the handle came from, is still valid and not destroyed. Otherwise, sending a forget downward to the gfapi world might result in the access of freed pointers. Hence, the snapview-server xlator first checks whether that gfapi instance is still there or not and then proceeds with closure of the handle. Change-Id: Ia7bb45112d0c651cc95f2e54d33d925dbd6955b0 fixes: bz#1646728 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* core: Resolve memory leak at the time of graph initMohit Agrawal2018-11-201-4/+0
| | | | | | | | | | | Problem: Memory leak when graph init fails as during volfile exchange between brick and glusterd Solution: Fix the error code path in glusterfs_graph_init Change-Id: If62bee61283fccb7fd60abc6ea217cfac12358fa fixes: bz#1651431 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* core: Retrieving the value of "client.ssl" option, before SSL is set up, failsSheetal Pamecha2018-11-201-0/+2
| | | | | | | | Added a default value "off" for (client|server).ssl fixes: bz#1651059 Change-Id: I3d9c80093ac471d9d770fbd6c67f945491cf726e Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* core: fix strncpy, coverity annotationKaleb S. KEITHLEY2018-11-191-1/+6
| | | | | | | | | | | | For added fun, coverity is not smart enough to detect that the strncpy() is safe, and for extra laughs, using coverity annotations doesn't do anything either; but we're adding them anyway, along with marking the BUFFER_SIZE_WARNINGS as false positives on scan.coverity.com. Change-Id: If7fa157eca565842109f32fee0399ac183b19ec7 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* features/locks: Move logging outside of a locked regionVijay Bellur2018-11-191-3/+3
| | | | | | | | | | | | In pl_metalk(), logging was being done in a synchronized region. Moving the log out of the synchronized region to avoid other threads from being blocked on the lock. Thanks to Yaniv Kaul for pointing this out. Change-Id: I0cb39fb23ae7c798ca9c42c390500491aa8e622b updates: bz#1644758 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: sync brick root perms on add brickN Balachandran2018-11-191-16/+9
| | | | | | | | | | | | | | | | | If a single brick is added to the volume and the newly added brick is the first to respond to a dht_revalidate call, its stbuf will not be merged into local->stbuf as the brick does not yet have a layout. The is_permission_different check therefore fails to detect that an attr heal is required as it only considers the stbuf values from existing bricks. To fix this, merge all stbuf values into local->stbuf and use local->prebuf to store the correct directory attributes. Change-Id: Ic9e8b04a1ab9ed1248b6b056e3450bbafe32e1bc fixes: bz#1648298 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* glusterd/mux: Optimize brick disconnect handler codeMohammed Rafi KC2018-11-184-140/+85
| | | | | | | | | Removed unnecessary iteration during brick disconnect handler when multiplex is enabled. Change-Id: I62dd3337b7e7da085da5d76aaae206e0b0edff9f fixes: bz#1650115 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* lease: Treat unlk request as noop if lease not foundSoumya Koduri2018-11-171-2/+14
| | | | | | | | | | | | | | | | When the glusterfs server recalls the lease, it expects client to flush data and unlock the lease. If not it sets a timer (starting from the time it sends RECALL request) and post timeout, it revokes it. Here we could have a race where in client did send UNLK lease request but because of network delay it may have reached after server revokes it. To handle such situations, treat such requests as noop and return sucesss. Change-Id: I166402d10273f4f115ff04030ecbc14676a01663 updates: bz#1648768 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* leases: Fix incorrect inode_ref/unrefsSoumya Koduri2018-11-172-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From testing & code-reading, found couple of places where we incorrectly unref the inode resulting in use_after_free crash or ref leaks. This patch addresses couple of them. a) When we try to grant the very first lease for a inode, inode_ref is taken in __add_lease. This ref should be active till all the leases granted to that inode are released (i.e, till lease_cnt > 0). In addition even after lease_cnt becomes '0', the inode should be active till all the blocked fops are resumed. Hence release this ref, after resuming all those fops. To avoid granting new leases while resuming those fops, defined a new boolean (blocked_fops_resuming) to flag it in the lease_ctx. b) 'new_lease_inode' which creates new lease_inode_entry and takes ref on inode, is used while adding that entry to client_list and recall_list. Use its counter function '__destroy_lease_inode' which does unref while removing those entries from those lists. c) inode ref is also taken when added to timer->data. Unref the same after processing timer->data. Change-Id: Ie77c78ff4a971e0d9a66178597fb34faf39205fb updates: bz#1648768 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* glusterd: fix Resource leak coverity issueMohit Agrawal2018-11-161-2/+10
| | | | | | | | | | | | Problem: In commit bcf1e8b07491b48c5372924dbbbad5b8391c6d81 code was missed to free path return by function search_brick_path_from_proc This patch fixes CID: 1396668: Resource leak Change-Id: I4888c071c1058023c7e138a8bcb94ec97305fadf fixes: bz#1646892 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* cli: cluster.server-quorum-type help text is missingShwetha Acharya2018-11-161-4/+8
| | | | | | | | Added a default value "none" and additional description. Change-Id: I3a5c06f8ec1e502fc399860e4b5cb835102cd71d Updates: bz#1608512 Signed-off-by: Shwetha Acharya <sacharya@redhat.com>
* afr: open_ftruncate_cbk should read fd from local->cont.open structSoumya Koduri2018-11-151-2/+2
| | | | | | | | | | | | afr_open stores the fd as part of its local->cont.open struct but when it calls ftruncate (if open flags contain O_TRUNC), the corresponding cbk function (afr_ open_ftruncate_cbk) is incorrectly referencing uninitialized local->fd. This patch fixes the same. Change-Id: Icbdedbd1b8cfea11d8f41b6e5c4cb4b44d989aba updates: bz#1648687 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* core: fix strncpy warningsKaleb S. KEITHLE2018-11-157-44/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since gcc-8.2.x (fedora-28 or so) gcc has been emitting warnings about buggy use of strncpy. Most uses that gcc warns about in our sources are exactly backwards; the 'limit' or len is the strlen/size of the _source param_, giving exactly zero protection against overruns. (Which was, after all, one of the points of using strncpy in the first place.) IOW, many warnings are about uses that look approximately like this: ... char dest[8]; char src[] = "this is a string longer than eight chars"; ... strncpy (dest, src, sizeof(src)); /* boom */ ... The len/limit should be sizeof(dest). Note: the above example has a definite over-run. In our source the overrun is typically only theoretical (but possibly exploitable.) Also strncpy doesn't null-terminate on truncation; snprintf does; prefer snprintf over strncpy. Mildly surprising that coverity doesn't warn/isn't warning about this. Change-Id: I022d5c6346a751e181ad44d9a099531c1172626e updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLE <kkeithle@redhat.com>
* core: fix strncpy warningsKaleb S. KEITHLE2018-11-153-7/+7
| | | | | | | | | | | | | | | | | | | Since gcc-8.2.x (fedora-28 or so) gcc has been emitting warnings about buggy use of strncpy. e.g. warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length and warning: ‘strncpy’ specified bound depends on the length of the source argument Since we're copying string fragments and explicitly null terminating use memcpy to silence the warning Change-Id: I413d84b5f4157f15c99e9af3e154ce594d5bcdc1 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* posix: Fix null pointer dererfenceSusant Palai2018-11-142-0/+13
| | | | | | | | CID: 1124799 1214618 Change-Id: Iff05180983fe9600be0a2ce015a137e4efb8f533 updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* feature/shard: Fix coverity issue - Use after freeSusant Palai2018-11-141-1/+1
| | | | | | | | CID: 1325524 Change-Id: Ic713285bd9e76d8e4dc1815aa471087d279008b5 updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* glusterd/snapshot: copy-paste typoSanju Rakonde2018-11-131-1/+1
| | | | | | Change-Id: Ice3663084b2d0a0a10d75ad68fe5fe494f928250 updates: bz#1193929 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* features/ctime: Fix Coverity issueSusant Palai2018-11-121-0/+1
| | | | | | | | CID : 1394632 Dereference after null check Change-Id: If0bef48b070935854e9d2988393dba07c9001cd2 updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* glusterfsd: Make each multiplexed brick sign inPrashanth Pai2018-11-121-1/+11
| | | | | | | | | | | | | | | | | | | | | | | NOTE: This change will be consumed by brick mux implementation of glusterd2 only. No corresponsing change in glusterd1 has been made. When a multiplexed brick process is shutting down, it sends sign out requests to glusterd for all bricks that it contains. However, sign in request is only sent for a single brick. Consequently, glusterd has to use some tricky means to repopulate pmap registry with information of multiplexed bricks during glusterd restart. This change makes each multiplexed brick send a sign in request to glusterd2 which ensures that glusterd2 can easily repopulate pmap registry with port information. As a bonus, sign in request will now also contain PID of the brick sending the request so that glusterd2 can rely on this instead of having to read/manage brick pidfiles. Change-Id: I409501515bd9a28ee7a960faca080e97cabe5858 updates: bz#1193929 Signed-off-by: Prashanth Pai <ppai@redhat.com>
* md-cache: request ACLs related xattrs when mode changeKinglong Mee2018-11-121-0/+62
| | | | | | | | If glusterfs client changes mode, ACLs related xattrs may changed too. Change-Id: Ifa5bff1f77ab7b176e54da4607ea9c1e66fc5588 Updates: bz#1634220 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* glusterd: don't call svcs_reconfigure for all volumes during op-version bump upAtin Mukherjee2018-11-121-8/+12
| | | | | | | | | | With having large number of volumes in a configuration having svcs_reconfigure () called for every volumes makes cluster.op-version bump up to time out. Instead call svcs_reconfigure () only once. Change-Id: Ic6a133d77113c992a4dbeaf7f5663b7ffcbb0ae9 Fixes: bz#1648237 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* quiesce : fix coverity issueSunny Kumar2018-11-121-0/+5
| | | | | | | | | This patch fixes 1388996 : Dereference null return value updates: bz#789278 Change-Id: I9351ae43736efd2f9abe4e1888dba89b6b3e1fe3 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* features/changelog: Avoid a potential null dereferenceVijay Bellur2018-11-121-4/+6
| | | | | | | | Addresses CID 1396292 Change-Id: I9141502a12fb3e18c04d07c79da87a5ebb2cfc23 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* core: Portmap entries showing stale brick entries when bricks are downMohit Agrawal2018-11-122-2/+7
| | | | | | | | | | | | | | | | Problem: pmap is showing stale brick entries after down the brick because of glusterd_brick_rpc_notify call gf_is_service_running before call pmap_registry_remove to ensure about brick instance. Solutiom: 1) Change the condition in gf_is_pid_running to ensure about process existence, use open instead of access to achieve the same 2) Call search_brick_path_from_proc in __glusterd_brick_rpc_notify along with gf_is_service_running Change-Id: Ia663ac61c01fdee6c12f47c0300cdf93f19b6a19 fixes: bz#1646892 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* ctime: Enable ctime feature by defaultKotresh HR2018-11-113-13/+7
| | | | | | | | | | | | | | | | | | | | This patch does following. 1. Enable ctime feature by default. 2. Earlier, to enable the ctime feature, two options needed to be enabled a. gluster vol set <volname> utime on b. gluster vol set <volname> ctime on This is inconvenient from the usability point of view. Hence changed it to following single option a. gluster vol set <volname> ctime on fixes: bz#1624724 Change-Id: I04af0e5de1ea6126c58a06ba8a26e22f9f06344e Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: allow shared-storage to use bricks under glusterd working directorySanju Rakonde2018-11-086-11/+15
| | | | | | | | | | | | | | | With commit 44e4db, we are not allowing user to create a volume using glusterd's working directory as a brick or any sub directory under glusterd's working directory as a brick.This has broken shared-storage since the volume "gluster-shared-storage" is created using the bricks under glusterd's working directory. With this patch, we let the "gluster-shared-storage" volume to use bricks under glusterd's working directory. fixes: bz#1647029 Change-Id: Ifcbcf4576eea12cf46f199dea287b29bd3ec3bfd Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* bd: remove from the buildAmar Tumballi2018-11-082-7/+0
| | | | | | | | | | | | Based on the proposal to remove few features as they are not actively maintained [1], removed BD (block device) translator from the build. [1] - https://lists.gluster.org/pipermail/gluster-users/2018-July/034400.html Updates: bz#1635688 Change-Id: Ia96db406c58a7aef355dde6bc33523bb2492b1a9 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* features/locks:Use pthread_mutex_unlock() instead of pthread_mutex_lock()Vijay Bellur2018-11-081-1/+1
| | | | | | | | Fixes CID 1396581 Change-Id: Ic04091b5783a75d8e1e605a9c1c28b77fea048d3 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>