summaryrefslogtreecommitdiffstats
path: root/xlators/performance
Commit message (Collapse)AuthorAgeFilesLines
* nl-cache: Fix coverity issue RESOURCE_LEAKPoornima G2018-03-061-0/+3
| | | | | Change-Id: Ic552f31853e1886b8c76d45c8c66251f1fd6f97f Signed-off-by: Poornima G <pgurusid@redhat.com>
* nl-cache: Fix coverity issue RETURN_LOCALPoornima G2018-03-061-1/+1
| | | | | Change-Id: Ic6fbd34aad2a5ae5e27d833300bcd1284cb98c24 Signed-off-by: Poornima G <pgurusid@redhat.com>
* quick-read: Fix coverity issue CHECKED_RETURNPoornima G2018-03-051-2/+3
| | | | | Change-Id: I989e8fe28c86f67b7e54692c01ae3ed6e729aa16 Signed-off-by: Poornima G <pgurusid@redhat.com>
* io-cache: Fix coverity issue NEGATIVE_RETURNSPoornima G2018-03-051-1/+1
| | | | | Change-Id: I811225ad20e3bd9f05820212e6a843f05d96b246 Signed-off-by: Poornima G <pgurusid@redhat.com>
* md-cache: Fix coverity issue FORWARD_NULLPoornima G2018-03-021-3/+4
| | | | | Change-Id: I6ace846c412d898c0bc024b5d2081b11a223372f Signed-off-by: Poornima G <pgurusid@redhat.com>
* perfomance/io-threads: Add option to disable client disconnect featureVarsha Rao2018-02-282-1/+24
| | | | | | | | | | | | | > Add options to disable new features > Commit ID: c071992e8d > https://review.gluster.org/#/c/18291/ > By Michael Goulet <mgoulet@fb.com> This patch is required to forward port io-threads namespace patch. Updates: #401 Change-Id: Ice477fdf4b8934f9fac0b4a2f6c93db97429a586 Signed-off-by: Varsha Rao <varao@redhat.com>
* io-cache: Fix coverity issuePoornima G2018-02-271-4/+2
| | | | | | | | | Coverity issue : FORWARD_NULL fd is assigned within a condition, but the fd is used even outside the condition. Change-Id: I6548d605d8a8acc6a25f1657f9fb75586d513042 Signed-off-by: Poornima G <pgurusid@redhat.com>
* glusterfsd: Memleak in glusterfsd process while brick mux is onMohit Agrawal2018-02-272-3/+10
| | | | | | | | | | | | | | | | | | Problem: At the time of stopping the volume while brick multiplex is enabled memory is not cleanup from all server side xlators. Solution: To cleanup memory for all server side xlators call fini in glusterfs_handle_terminate after send GF_EVENT_CLEANUP notification to top xlator. BUG: 1544090 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Note: Run all test-cases in separate build (https://review.gluster.org/19574) with same patch after enable brick mux forcefully, all test cases are passed. Change-Id: Ia10dc7f2605aa50f2b90b3fe4eb380ba9299e2fc
* performance/io-threads: nuke everything from a client when it disconnectsVarsha Rao2018-02-271-2/+37
| | | | | | | | | | | | | > io-threads: nuke everything from a client when it disconnects > Commit ID: 4d8268d760 > https://review.gluster.org/#/c/18254/ > By Jeff Darcy <jdarcy@fb.com> This patch is required to forward port io-threads namespace patch. Updates: #401 Change-Id: I13d3a74862eea3d01e8dbc8736987c3dae6e8b2a Signed-off-by: Varsha Rao <varao@redhat.com>
* write-behind: Make aggregate size configurablePoornima G2018-02-261-5/+21
| | | | | | | | | | | | | | | | | | | | | | | Currently the aggregate size is by default 128K (page size). From performance perspective small number of large writes is faster than large number of small writes, especially in EC volumes. But identifying the right aggregate size depends on multiple factors like the memcpy overhead, network overhead etc. On local machine, combining 128k writes to 1M writes for EC volumes yielded 30% improvement. As a part of this patch, aggregate size is just made configurable and page_size is modified accordingly. Raghavendra Gowdappa had suggested that, while aggregating writes we should get rid of memcpy of large write size, and instead add the pointer to existinf vector, will be doing it as a part of another patch. Also, in EC volumes, the vectors are merged into one vector, so even if we save memcopy in write_behind, EC would anyways do memcopy for merging vectors into one vector. Updates: #364 Change-Id: Ib67294b8577bea14dde1c84cd271012ecea99f09 Signed-off-by: Poornima G <pgurusid@redhat.com>
* md-cache: Modify options to be gd2 compatiblePoornima G2018-02-261-2/+28
| | | | | Change-Id: I79d51fee8ec5d2d237de7dd21c2d28c18cfd7ce8 Signed-off-by: Poornima G <pgurusid@redhat.com>
* nl-cache: Change the options to be gd2 compatiblePoornima G2018-02-261-0/+6
| | | | | Change-Id: Ib9d233df41b85c845643e3e6eb2d680e01859a43 Signed-off-by: Poornima G <pgurusid@redhat.com>
* performance/io-threads: Add threads to priority based stagnant queuesVarsha Rao2018-02-222-5/+200
| | | | | | | | | | | | | > performance/io-threads: Add watchdog to cover up a possible thread leak > Commit ID: 8b6804f75c > https://review.gluster.org/#/c/18239/ > By Shreyas Siravara <sshreyas@fb.com> This patch is required to forward port io-threads namespace patch. Updates: #401 Change-Id: Id057c34a2abb9fc6dfb4afcd5c7bbbfe5693bbb8 Signed-off-by: Varsha Rao <varao@redhat.com>
* xlators/features/namespace: Add namespace xlator and link into brick graphVarsha Rao2018-02-211-47/+11
| | | | | | | | | | | | | | | | | | | | | The following release-3.8-fb branch patch is upstreamed: > features/namespace: Add namespace xlator and link into brick graph > Commit ID: dbd30776f26e > https://review.gluster.org/#/c/18041/ > By Michael Goulet <mgoulet@fb.com> Changes in this patch: Removes extra config.h and namespace.h file in namespace.c Adds default_getspec_cbk to libglusterfs.sym Rename dict_for_each to dict_foreach_inline Remove fd.h header file stack.h Add test case for truncate, open and symlink This patch is required to forward port io-threads namespace patch. Updates: #401 Change-Id: Ib88c95b89eecee9b8957df8a4c8712c899c761d1 Signed-off-by: Varsha Rao <varao@redhat.com>
* Revert "glusterfsd: Memleak in glusterfsd process while brick mux is on"Mohit Agrawal2018-02-192-8/+2
| | | | | | | | | | | There are still remain some code paths where cleanup is required while brick mux is on.I will upload a new patch after resolve all code paths. This reverts commit b313d97faa766443a7f8128b6e19f3d2f1b267dd. BUG: 1544090 Change-Id: I26ef1d29061092bd9a409c8933d5488e968ed90e Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* build: add --without-server optionNiels de Vos2018-02-191-0/+2
| | | | | | | | | | | | | | | | With Gluster 4.0 we will not provide the server components for EL6 and older. At one point Gluster 4.x will get GlusterD2, which requires Golang tools in the distribution. EL6 does not contain these at the moment. With this change, it is possible to `./configure --without-server` which prevents building glusterd and the xlators for the bricks. Building RPMs can pass `--without server` and the glusterfs-server sub-package will not be created. Change-Id: I97f5ccf9f2c76e60d9af83915fc59fae57ad6d25 BUG: 1074947 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* glusterfsd: Memleak in glusterfsd process while brick mux is onMohit Agrawal2018-02-152-2/+8
| | | | | | | | | | | | | Problem: At the time of stopping the volume while brick multiplex is enabled memory is not cleanup from all server side xlators. Solution: To cleanup memory for all server side xlators call fini in glusterfs_handle_terminate after send GF_EVENT_CLEANUP notification to top xlator. BUG: 1544090 Change-Id: Ifa1525e25b697371276158705026b421b4f81140 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* io-threads: Implement put fopPoornima G2018-02-121-0/+13
| | | | | | Updates #353 Change-Id: I8a30b53a52618c6a6c740d2c67b19e5322ce4ddb Signed-off-by: Poornima G <pgurusid@redhat.com>
* performance/io-threads: expose io-thread queue depthsVarsha Rao2018-02-082-45/+70
| | | | | | | | | | | | | | | | | | | | The following release-3.8-fb branch patch is upstreamed: > io-stats: Expose io-thread queue depths > Commit ID: 69509ee7d2 > https://review.gluster.org/#/c/18143/ > By Shreyas Siravara <sshreyas@fb.com> Changes in this patch: - Replace iot_pri_t with gf_fop_pri_t - Replace IOT_PRI_{HI, LO, NORMAL, MAX, LEAST} with GF_FOP_PRI_{HI, LO, NORMAL, MAX, LEAST} - Use dict_unref() instead of dict_destroy() This patch is required to forward port io-threads namespace patch. Updates: #401 Change-Id: I1b47a63185a441a30fbc423ca1015df7b36c2518 Signed-off-by: Varsha Rao <varao@redhat.com>
* core: add some examples of site.h usageJeff Darcy2018-01-302-2/+2
| | | | | Change-Id: I6ce574a593eda8f3a6b2fc8969b5edf7c250b61c Signed-off-by: Jeff Darcy <jdarcy@fb.com>
* performance/read-ahead: volume option fixes for GD2Csaba Henk2018-01-221-0/+7
| | | | | | | Updates #302 Change-Id: I842ab746502bc4ff3b312ee19f397a6177edc6f7 Signed-off-by: Csaba Henk <csaba@redhat.com>
* performance/write-behind: volume option fixes for GD2Csaba Henk2018-01-221-0/+18
| | | | | | | Updates #302 Change-Id: I2ade3dc4aef4da619c5b64058872594f0f1e004f Signed-off-by: Csaba Henk <csaba@redhat.com>
* md-cache: Implement dynamic configuration of xattr list for cachingPoornima G2018-01-221-275/+158
| | | | | | | | | | | | | | | Currently, the list of xattrs that md-cache can cache is hard coded in the md-cache.c file, this necessiates code change and rebuild everytime a new xattr needs to be added to md-cache xattr cache list. With this patch, the user will be able to configure a comma seperated list of xattrs to be cached by md-cache Updates #297 Change-Id: Ie35ed607d17182d53f6bb6e6c6563ac52bc3132e Signed-off-by: Poornima G <pgurusid@redhat.com>
* readdir-ahead: Cleanup the xattr request codePoornima G2018-01-191-40/+2
| | | | | | | Updates #297 Change-Id: Ia0c697583751290a455da3cd1894e0c5685d1bd8 Signed-off-by: Poornima G <pgurusid@redhat.com>
* md-cache: Serve nameless lookup from cachePoornima G2018-01-181-10/+8
| | | | | | Updates #232 Change-Id: I97e92312a53a50c2d1660bf8d657201fc05a76eb Signed-off-by: Poornima G <pgurusid@redhat.com>
* readdir-ahead: Add parallel-readdir option in readdir-aheadPoornima G2018-01-182-0/+16
| | | | | | | | | | parallel-readdir option is defined as belonging to readdir-ahead in glusterd-volume-set.c, but was not defined in options of readdir-ahead, fixing the same. Change-Id: I97cc88b38ab99ade5f066519ca1cb9bfed03a7da BUG: 1506197 Signed-off-by: Poornima G <pgurusid@redhat.com>
* performance/io-threads: Fix checked_return coverity errorVarsha Rao2018-01-181-5/+18
| | | | | | | | | Change the return type of set_stack_size function to integer and also check the return value of pthread_attr_init(). This fixes the Checked_Return coverity issue. Change-Id: I270b8bd168b09f0b071437c117e4e23b01398534 Signed-off-by: Varsha Rao <varao@redhat.com>
* performance/readdir-ahead: fix cache usage update issueZhang Huan2018-01-152-6/+9
| | | | | | | | | Use atomic operation to modify cache-size to protect it from concurrent modification. Change-Id: Ie73cdd4abbaf0232b1db4ac856c01d24603890ad BUG: 1533804 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* perf/io-cache: Update options for gd2N Balachandran2018-01-121-6/+16
| | | | | | | | | Update io-cache options for GD2 Updates gluster/glusterfs#302 Change-Id: I7fabf912d1e3cd024989404526db0a29644768c7 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* performance/io-threads: volume option fixes for GD2Pranith Kumar K2018-01-031-0/+19
| | | | | | Updates #302 Change-Id: I7145e46ed649f8e69118f164709f7131b7e580be Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* performance/write-behind: fix bug while handling short writesRaghavendra G2017-12-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The variabled "fulfilled" in wb_fulfill_short_write is not reset to 0 while handling every member of the list. This has some interesting consequences: * If we break from the loop while processing last member of the list head->winds, req is reset to head as the list is a circular one. However, head is already fulfilled and can potentially be freed. So, we end up adding a freed request to wb_inode->todo list. This is the RCA for the crash tracked by the bug associated with this patch (Note that we saw "holder" which is freed in todo list). * If we break from the loop while processing any of the last but one member of the list head->winds, req is set to next member in the list, skipping the current request, even though it is not entirely synced. This can lead to data corruption. The fix is very simple and we've to change the code to make sure "fulfilled" reflects whether the current request is fulfilled or not and it doesn't carry history of previous requests in the list. Change-Id: Ia3d6988175a51c9e08efdb521a7b7938b01f93c8 BUG: 1528558 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* all: Simplify component message id's definitionXavier Hernandez2017-12-1411-841/+165
| | | | | | | | | This patch creates a new way of defining message id's that is easier and less error prone because it doesn't require so many manual changes each time a new component is defined or a new message created. Change-Id: I71ba8af9ac068f5add7e74f316a2478bc991c67b Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* quick-read: Integrate quick read with upcall and increase cache timePoornima G2017-12-132-4/+123
| | | | | | | Fixes : #261 Co-author: Subha sree Mohankumar <smohanku@redhat.com> Change-Id: Ie9dd94e86459123663b9b200d92940625ef68eab Signed-off-by: Poornima G <pgurusid@redhat.com>
* quick-read: Discard cache for fallocate, zerofill and discard opsSachin Prabhu2017-12-131-1/+39
| | | | | | | | | The fallocate, zerofill and discard modify file data on the server thus rendering stale any cache held by the xlator on the client. BUG: 1524252 Change-Id: I432146c6390a0cd5869420c373f598da43915f3f Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
* md-cache: Cache statfs callsShreyas Siravara2017-12-121-0/+129
| | | | | | | | | | | | | | | Summary: - This gives md-cache to cache statfs calls - You can turn it on or off via 'gluster vol set groot performance.md-cache-statfs <on|off>' Change-Id: I664579e3c19fb9a6cd9d7b3a0eae061f70f4def4 BUG: 1523295 Signature: t1:4652632:1488581841:111cc01efe83c71f1e98d075abb10589c4574705 Reviewed-on: https://review.gluster.org/18228 Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
* perf/open-behind: update options for gd2Milind Changire2017-12-101-0/+8
| | | | | | | Updates: #302 Change-Id: I12e5bc6d9e1fcd285299818a7f7e8f1622deefcb Signed-off-by: Milind Changire <mchangir@redhat.com>
* performance/io-threads: Reduce the number of timing calls in iot_workerMax Rijevski2017-12-071-3/+4
| | | | | | | | | | | | | | | | | Summary: - Reduce the amount of unnecessary timing calls in iot_worker servicing. - The current logic is unnecessarily accurate and hurts performance for many small FOPS. Change-Id: I6db4f1ad9a48d9d474bb251a2204969061021954 BUG: 1522950 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: http://review.gluster.org/16081 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com>
* rio/everywhere: add icreate/namelink fopSusant Palai2017-12-051-0/+2
| | | | | | | | | | | | | | | | | | | | | icreate creates inode, while namelink links the basename to it's parent gfid. For now mkdir is the primary user of these fops. Better distribution is acheived by creating the inode on ,(say) mds1 and linking the basename to it's parent gfid on mds2. The inode serves readdirp, stat etc. More details about the fops are present at: https://review.gluster.org/#/c/13395/3/design/DHT2/DHT2_Icreate_Namelink_Notes.md This backport of three patches from experimental branch. 1- https://review.gluster.org/#/c/18085/ 2- https://review.gluster.org/#/c/18086/ 3- https://review.gluster.org/#/c/18094/ Updates gluster/glusterfs#243 Change-Id: I1bd3d5a441a3cfab1acfeb52f15c6c867d362592 Signed-off-by: Susant Palai <spalai@redhat.com>
* quick-read: redefine optionsPoornima G2017-11-291-0/+2
| | | | | | | Updates: #302 Change-Id: If25996a080d69e9ac819ca771a5774ccdab6e1ce Signed-off-by: Poornima G <pgurusid@redhat.com>
* libglusterfs/atomic: Improved atomic supportXavier Hernandez2017-11-143-20/+20
| | | | | | | | | | | | | | | | This patch solves a detection problem in configure.ac that prevented that compilation detects builtin __atomic or __sync functions. It also adds more atomic types and support for other atomic functions. An special case has been added to support 64-bit atomics on 32-bit systems. The solution is to fallback to the mutex solution only for 64-bit atomics, but smaller atomic types will still take advantage of builtins if available. Change-Id: I6b9afc7cd6e66b28a33278715583552872278801 BUG: 1510397 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* xlators/performance/io-cache/: DEADCODE in ioc_open_cbkGirjesh Rajoria2017-11-031-8/+0
| | | | | | | | | | | | | | Coverity ID: 173 Issue: Event dead_error_line: Execution cannot reach this statement: "fd_ctx_set(fd, this, 1UL);". Removed if block as "weight == 0U" cannot be true, so if block will never execute. Also removed weight variable because it is unused. Change-Id: I4f028df29bfde91167fb15befa99b1fe1892adc6 BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* core: make gf_boolean_t a C99 bool instead of an enumJeff Darcy2017-11-031-1/+1
| | | | | | | | | | | | This reduces the space used from four bytes to one, and allows new code to use familiar C99 types/values interoperably with our old cruft. It does *not* change current declarations or code; that will be left for a separate - much larger - patch. Updates: #80 Change-Id: I5baedd17d3fb05b38f0d8b8bb9dd62824475842e Signed-off-by: Jeff Darcy <jdarcy@fb.com>
* md-cache: Add additional samba and macOS specific EAs to mdcacheGünther Deschner2017-10-301-6/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Samba ships with a server implementation of the Apple Create Context extension (AAPL) as negotiated by all modern Apple clients. With the support of the AAPL extension, Apple clients will integrate better with Samba servers. The AAPL implementation itself is contained in the Samba vfs_fruit(8) module which has to be activated in Samba. This vfs_fruit module also provides support for macOS alternate data streams which will be represented in EAs. Two standard data streams ("AFP_AfpInfo" and "AFP_Resource") will be stored in the following EAs: * user.org.netatalk.Metadata * user.org.netatalk.ResourceFork For all other data streams, vfs_fruit relies on another Samba vfs module, vfs_streams_xattr(8), to handle these. Although configurable, by default the vfs_streams_xattr module will build EA keynames with a "user.DosStream." prefix. Please note that we have to deal with only one known prefix key, as macOS will happily compose EA keynames like: * user.DosStream.com.apple.diskimages.fsck:$DATA * user.DosStream.com.apple.diskimages.recentcksum:$DATA * user.DosStream.com.apple.metadata:kMDItemWhereFroms:$DATA * user.DosStream.com.apple.quarantine:$DATA * etc. Caching of vfs_fruit specific EAs is crucial for SMB performance and is controlled with the same configuration option "performance.cache-samba-metadata". Guenther Change-Id: Ia7aa341234dc13e1c0057f3d658b7ef711b5d31e BUG: 1499933 Signed-off-by: Guenther Deschner <gd@samba.org>
* md-cache: free "struct mdc_conf" in fini()Niels de Vos2017-10-131-1/+1
| | | | | | Change-Id: Ia3a9b0152b7e36ded584150733e8392be458125c BUG: 1443145 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* Fix the conditionalMichael Scherer2017-09-071-1/+1
| | | | | | | | | | | | | | | | | | Clang complain about it on FreeBSD In file included from xlators/performance/nl-cache/src/nl-cache-helper.c:11: In file included from xlators/performance/nl-cache/src/nl-cache.h:14: xlators/performance/nl-cache/src/nl-cache-mem-types.h:12:9: warning: '__NL_CACHe_MEM_TYPES_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef __NL_CACHe_MEM_TYPES_H__ Change-Id: I4327c7dacf10f2690bd33bf2b37dbb7d9b52bdd5 BUG: 1488840 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/18216 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Michael Scherer <misc@fedoraproject.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* mem-pool: track glusterfs_ctx_t in struct mem_poolNiels de Vos2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | In order to generate statedumps per glusterfs_ctx_t, it is needed to place all the memory pools in a structure that the context can reach. The 'struct mem_pool' has been extended with a 'list_head owner' that is linked with the glusterfs_ctx_t->mempool_list. All callers of mem_pool_new() have been updated to pass the current glusterfs_ctx_t along. This context is needed to add the new memory pool to the list and for grabbing the ctx->lock while updating the glusterfs_ctx_t->mempool_list. Updates: #307 Change-Id: Ia9384424d8d1630ef3efc9d5d523bf739c356c6e Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/18075 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* perf/qr: Use a ref-ed data to extract contentN Balachandran2017-08-281-3/+5
| | | | | | | | | | | | | | | | | | | | qr_content_extract used dict_get to get the value of the GF_CONTENT_KEY key. dict_get does not ref the data before returning it so QR could be acting on freed memory if another thread deletes the key before then. This patch also fixes a race in dict_get_with_ref. Fix: Use dict_get_with_ref to retrieve the file contents. Change-Id: Ib1a7a70bb92eed7e70747ec530e0b3edc53127ec BUG: 1484709 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/18115 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* md-cache: avoid checking the xattr value buffer with string functions.Günther Deschner2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | xattrs may very well contain binary, non-text data with leading 0 values. Using strcmp for checking empty values is not the appropriate thing to do: In the best case, it might treat a binary xattr value starting with 0 from being cached (and hence also from being reported back with xattr). In the worst case, we might read beyond the end of a data blob that does contain any zero byte. We fix this by checking the length of the data blob and checking the first byte against 0 if the length is one. Signed-off-by: Guenther Deschner <gd@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11 BUG: 1476324 Reviewed-on: https://review.gluster.org/17910 Reviewed-by: Michael Adam <obnox@samba.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Poornima G <pgurusid@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* md-cache: Use correct xattr keynames for virtual glusterfs ACLs.Günther Deschner2017-07-291-2/+8
| | | | | | | | | | | | | | | | | | | | | | | The "glusterfs.posix_acl." prefix does not catch the glusterfs posix acl xattr keynames which are * "glusterfs.posix.acl" and * "glusterfs.posix.default_acl" Using the GF_POSIX_ACL_ACCESS and GF_POSIX_ACL_DEFAULT defines directly is the savest option. Guenther Change-Id: I5aba64b26b6cbec850ea02316dd9f069400e857f BUG: 1476295 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-on: https://review.gluster.org/17909 Reviewed-by: Michael Adam <obnox@samba.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* performance/io-cache: update inode contexts of each entry in readdirplusRaghavendra G2017-07-273-39/+67
| | | | | | | | | | | | | | io-cache stores read-cache in inode which is currently created only in lookup. But, with readdirplus and md-cache absorbing lookups, io-cache need not receive a lookup before a fop like readv. Change-Id: I6eba995b0a90d4d5055a4aef0489707b852da1b8 BUG: 1474180 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: https://review.gluster.org/5029 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>