summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rpc-clnt*: several code changes to reduce conn lock timesYaniv Kaul2018-11-123-55/+25
| | | | | | | | | | | | | | Assorted code refactoring to reduce lock contention. Also, took the opportunity to reorder structs more properly. Removed dead code. Hopefully, no functional changes. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I5de6124ad071fd5e2c31832364d602b5f6d6fe28
* libglusterfs multiple files: remove dead initilizationYaniv Kaul2018-11-1111-63/+15
| | | | | | | | | | | | | Per newer GCC releases and clang-scan, some trivial dead initialization (values that were set but were never read) were removed. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Ia9959b2ff87d2e9cb46864e68ffe7dccb984db34
* cli: avoid unnecessary strtail for geo rep config.Ravishankar N2018-11-111-20/+20
| | | | | | | | | | Found while looking at this function for another patch. Compile Tested Only! Updates bz#1193929 Change-Id: I46a9e95bf4d6609bc122edf86418659369258abe Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* ctime: Enable ctime feature by defaultKotresh HR2018-11-116-21/+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>
* cli: add a warning/confirmation message in peer detach code pathAtin Mukherjee2018-11-091-1/+13
| | | | | | | | | | | | | | | | | On a multi node cluster if one of the node is detached which had active clients mounted through the same server address, this can cause all the clients to loose any volfile changes. This is due to the lack of infra in glusterd to let client know the list of IPs and attempt to connect to other active nodes as failback. Such framework does exist in GD2 but not in GD1. This patch ensures to take a preventive measure to have a warning message thrown to user to ensure all such connected clients are remounted through a different IP. Change-Id: I740b01868abbd75bf0a609cfaf00114d4d78aa96 Fixes: bz#1647074 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* gfapi: fix bad dict setting of lease-idKinglong Mee2018-11-081-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lease_id is a 16 bits opaque data, copying it by gf_strdup is wrong. Invalid read of size 2 at 0x483FA2F: memmove (vg_replace_strmem.c:1270) by 0xE2EF6FB: ??? (in /usr/lib64/libtirpc.so.3.0.0) by 0xE2EE047: xdr_opaque (in /usr/lib64/libtirpc.so.3.0.0) by 0x107A97DC: xdr_gfx_value (glusterfs4-xdr.c:207) by 0x107A98C0: xdr_gfx_dict_pair (glusterfs4-xdr.c:321) by 0xE2EF35E: xdr_array (in /usr/lib64/libtirpc.so.3.0.0) by 0x107A9A89: xdr_gfx_dict (glusterfs4-xdr.c:335) by 0x107AA97B: xdr_gfx_write_req (glusterfs4-xdr.c:897) by 0x107A181E: xdr_serialize_generic (xdr-generic.c:25) by 0x231044A2: client_submit_request (client.c:205) by 0x2314D3C1: client4_0_writev (client-rpc-fops_v2.c:3863) by 0x230FD5FA: client_writev (client.c:956) Address 0xad659e18 is 72 bytes inside a block of size 73 alloc'd at 0x483880B: malloc (vg_replace_malloc.c:299) by 0x106BA7EC: __gf_malloc (mem-pool.c:136) by 0x1064521E: gf_strndup (mem-pool.h:166) by 0x1064521E: gf_strdup (mem-pool.h:183) by 0x1064521E: get_fop_attr_thrd_key (glfs.c:627) by 0x1064D8E9: glfs_pwritev@@GFAPI_3.4.0 (glfs-fops.c:1154) by 0x10610C0C: glusterfs_write2 (handle.c:2092) by 0x54D30C: mdcache_write2 (mdcache_file.c:647) by 0x48A3FC: nfs4_write (nfs4_op_write.c:459) by 0x48A44D: nfs4_op_write (nfs4_op_write.c:487) by 0x4634F5: nfs4_Compound (nfs4_Compound.c:947) by 0x460155: nfs_rpc_process_request (nfs_worker_thread.c:1329) by 0x4608A3: nfs_rpc_valid_NFS (nfs_worker_thread.c:1539) by 0x488F12F: svc_vc_decode (svc_vc.c:825) Updates bz#1647651 Change-Id: Ib9fff55c897bc43c15036a869888e763df133757 Signed-off-by: Kinglong Mee <mijinlong@open-fs.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>
* coverity: ignore tainted access reported in gf_freeShyamsundarR2018-11-081-1/+7
| | | | | | | | | | | | | Earlier commit had the annotation incorrect, and also did not wrap the sanitization in a separate function. (see commit 39a1db1) The issues are corrected in this patch, and also a coverity stand alone run has been tested to ensure the annotations are respected by coverity. Change-Id: I4a93b6981e2ff4bba9a29e590b17da248931c8ae Updates: bz#789278 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* bd: remove from the buildAmar Tumballi2018-11-085-196/+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>
* glupy: remove from the buildAmar Tumballi2018-11-085-110/+5
| | | | | | | | | | | | | | | Based on the proposal to remove few features as they are not actively maintained [1], removing 'glupy' translator from the build. [1] https://lists.gluster.org/pipermail/gluster-users/2018-July/034400.html This patch aims at clearing the translator from build and tests. A followup is needed to remove the code from repository. Updates: bz#1642810 Change-Id: I41d0c1956330c3bbca62c540ccf9ab01bbf3a092 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* xlators/experimental: remove from the buildAmar Tumballi2018-11-083-54/+2
| | | | | | | | | | | | | | Based on the proposal to remove few features as they are not actively maintained [1], removing all experimental translators from the build. [1] https://lists.gluster.org/pipermail/gluster-users/2018-July/034400.html Note that as followup patch, there would be a patch to remove the code. Updates: bz#1635688 Change-Id: I8ebc256517feb37fc7580104e8bebe27d047f959 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterfsd: Do not process GLUSTERD_NODE_STATUS if graph is not readyHu Jianfei2018-11-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, gnfs will crash if we try to get nfs clients status in following situation. Also see commit 2f9e555f. Reproducible Steps: 1. systemctl restart glusterd; gluster volume status rep 2. systemctl restart glusterd; gluster volume status rep nfs clients step 1 works ok, but step 2 will lead localhost gnfs crash with certain probability. /lib64/libglusterfs.so.0(+0x270f0)[0x7effb6c7b0f0] /lib64/libglusterfs.so.0(gf_print_trace+0x334)[0x7effb6c854a4] /lib64/libc.so.6(+0x35270)[0x7effb52e7270] /usr/sbin/glusterfs(glusterfs_handle_node_status+0x155)[0x7effb7196905] /lib64/libglusterfs.so.0(+0x63f40)[0x7effb6cb7f40] /lib64/libc.so.6(+0x46d40)[0x7effb52f8d40] Updates: bz#1646869 Change-Id: Ia4cb009f821d32b2d18ba48d3467cc81a4b07747 Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com> Signed-off-by: Hu Jianfei <hujianfei@cmss.chinamobile.com>
* cluster/afr: s/uuid_is_null/gf_uuid_is_nullPranith Kumar K2018-11-071-1/+1
| | | | | | Updates bz#1193929 Change-Id: I1b312dabffac7e101df8ce15557527fd28a2c61f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* libglusterfs/src/iobuf.c: don't forget to unlock a mutexYaniv Kaul2018-11-061-0/+1
| | | | | | | | | | | | | | | | commit ed83a4ee7b73e6b04694d1ac11ed25d2983ac943 changed locking order and forgot to unlock in a negative path (when index was -1). Coverity caught it (thanks!) as CID 1396581: Program hangs (LOCK) Note: I'm unlocking before logging the failure. I think it's the right order - logging can take a while (especially if your disk is slow). Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I82ac241edf1d511bf6807cf9c46c538ab9f4acc4
* tests/interrupt.t: remove 'stripe' volume typeAmar Tumballi2018-11-061-1/+1
| | | | | | | | | Merged the patch which introduced this testcase after the 'remove stripe' patch got merged, and hence the confusion. Updates: bz#1193929 Change-Id: Ia08552debb111292caf14e51ea6a27334fe5c788 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* md-cache: new option "cache-glusterfs-acl" for virtual glusterfs ACLsKinglong Mee2018-11-061-3/+21
| | | | | | Change-Id: I020ab08dba48f13cf7b8908e96280f1e92e9b9db Updates: bz#1634220 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* md-cache: request cached xattrs at getxattr/fgetxattrKinglong Mee2018-11-062-5/+40
| | | | | | Change-Id: I8e3ad961164815683776850e3a5fd4f510003690 Updates: bz#1634220 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* md-cache: extends xa_time when previous attributes equals cached attributesKinglong Mee2018-11-061-7/+15
| | | | | | | | | | | | Some operations like read/write only update iatt and ia_time, without any operion request xattrs from glusterfsd, the xa_time is timeout before ia_time always. This patch updates xa_time when update ia_ttime. Change-Id: I77e3984f38c1c4dbebfde9729b8117fbacde9674 Updates: bz#1634220 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* md-cache: remove xattr setting after new file createdKinglong Mee2018-11-061-3/+0
| | | | | | | | | Fops of creating file does not request cached xattrs, the xattr in reply is not cached xattrs. Change-Id: Iab2db686e92466e72cfee8ac494e851d797c10b3 Updates: bz#1634220 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* glusterd: initialise caps inside #ifdef HAVE_BD_XLATOR blockSanju Rakonde2018-11-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Note: The problem is seen when we disable bd xlator. Problem: When we create a volume, volume info file is having caps value as 15 in nodes which hosts bricks for that volume. Remainig nodes in cluster are not having caps field. When glusterd is restarted, peers are going into rejected state, because of this mismacth in configuration files. Cause: In glusterd_op_create_volume(), we initialise caps value as 15 in the beginning. Later, we check whether brick belongs to the same node or not. If brick doesn't belong to the same node, caps value will be set to 0. If brick belongs to the same node, we will change the caps value inside Solution: If brick doesn't belongs to the same node,caps is set to 0 and if brick belongs to same brick caps value is changed inside #ifdef HAVE_BD_XLATOR block. So, to have the consistency across the cluster, we need to initialise caps value inside #ifdef HAVE_BD_XLATOR block, only when brick belongs to the same node. fixes: bz#1645986 Change-Id: I2648f420b21d6e69e7c38b0f4736d41e0f15a7f5 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* doc: add a new contributor 'hints' guideAmar Tumballi2018-11-062-4/+214
| | | | | | | | | | Keeping this in glusterfs Repo for glusterfs specific improvements. There would be a link to this page, and some more similar pages from docs.gluster.org updates: bz#1193929 Change-Id: Ie98670cc32e62951f1b1880b1ae39f5cc2b45329 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* lock: Do not allow meta-lock count to be more than oneSusant Palai2018-11-061-1/+34
| | | | | | | | | | | | | | | | | | | | In the current scheme of glusterfs where lock migration is experimental, (ideally) the rebalance process which is migrating the file should request for a metalock. Hence, the metalock count should not be more than one for an inode. In future, if there is a need for meta-lock from other clients, this patch can be reverted. Since pl_metalk is called as part of setxattr operation, any client process(non-rebalance) residing outside trusted network can exhaust memory of the server node by issuing setxattr repetitively on the metalock key. The current patch makes sure that more than one metalock cannot be granted on an inode. Fixes CVE-2018-14660 updates: bz#1644758 Change-Id: Ie1e697766388718804a9551bc58351808fe71069 Signed-off-by: Susant Palai <spalai@redhat.com>
* fuse: diagnostic FLUSH interruptCsaba Henk2018-11-0610-2/+345
| | | | | | | | | | | | | | | | | | | We add dummy interrupt handling for the FLUSH fuse message. It can be enabled by the "--fuse-flush-handle-interrupt" hidden command line option, or "-ofuse-flush-handle-interrupt=yes" mount option. It serves no other than diagnostic & demonstational purposes -- to exercise the interrupt handling framework a bit and to give an usage example. Documentation is also provided that showcases interrupt handling via FLUSH. Change-Id: I522f1e798501d06b74ac3592a5f73c1ab0590c60 updates: #465 Signed-off-by: Csaba Henk <csaba@redhat.com>
* fuse: interrupt handling frameworkCsaba Henk2018-11-066-1/+532
| | | | | | | | | | | | | | | | | | | | - add sub-framework to send timed responses to kernel - add interrupt handler queue - implement INTERRUPT fuse_interrupt looks up handlers for interrupted messages in the queue. If found, it invokes the handler function. Else responds with EAGAIN with a delay. See spec at https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/fuse.txt?h=v4.17#n148 and explanation in comments. Change-Id: I1a79d3679b31f36e14b4ac8f60b7f2c1ea2badfb updates: #465 Signed-off-by: Csaba Henk <csaba@redhat.com>
* libglusterfs/src/iobuf.c: where possible, pass the index parameterYaniv Kaul2018-11-061-66/+54
| | | | | | | | | | | | | | | Don't 'calculate' again where it can be passed. If possible, do not perform under lock. Also remove some NULL checks, assuming they were done by the callers. Left a remark for each such change. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Ia5c2851506da3388cb2d4445334c58881e2c4416
* libglusterfs/src/iobuf.c: take the pool lock once in new poolYaniv Kaul2018-11-061-24/+9
| | | | | | | | | | | | When creating a new pool, take the pool lock once and create all arenas, instead of taking and releasing for each arena. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I7daa39de960e47e66a32ecab724cf3a61ccdc01b
* libglusterfs/src/iobuf.c: remove some if statementsYaniv Kaul2018-11-061-25/+19
| | | | | | | | | | | | Small code refactoring to remove some if statements in several functions. No functional changes expected. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: If9f8d5d53c9688fb994b6d690aea66f65fa01c55
* logging: create parent dir if not availableAmar Tumballi2018-11-061-0/+20
| | | | | | | | | | | As glusterfs logging uses different directory than /var/log (ie, /var/log/glusterfs), there is a chance it may not be present when starting glusterfs. Create parent dir if it doesn't exist. Updates: bz#1193929 Change-Id: I8d6f7e5a608ba53258b14617f5d103d1e98b95c1 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* geo-rep: Fix traceback with symlink metadata syncKotresh HR2018-11-061-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | While syncing metadata, 'os.chmod', 'os.chown', 'os.utime' should be used without de-reference. But python supports only 'os.chown' without de-reference. That's mostly because Linux doesn't support 'chmod' on symlink file itself but it does support 'chown'. So while syncing metadata ops, if it's symlink we should only sync 'chown' and not do 'chmod' and 'utime'. It will lead to tracebacks with errors like EROFS, EPERM, ACCESS, ENOENT. All the three errors (EPERM, ACCESS, ENOENT) were handled except EROFS. But the way it was handled was not fool proof. The operation is tried and failure was handled based on the errors. All the errors with symlink file for 'chown', 'utime' had to be passed to safe errors list of 'errno_wrap'. This patch handles it better by avoiding 'chmod' and 'utime' if it's symlink file. fixes: bz#1646104 Change-Id: Ic354206455cdc7ab2a87d741d81f4efe1f19d77d Signed-off-by: Kotresh HR <khiremat@redhat.com>
* all: fix the format string exceptionsAmar Tumballi2018-11-0540-117/+123
| | | | | | | | | | | | | | | | Currently, there are possibilities in few places, where a user-controlled (like filename, program parameter etc) string can be passed as 'fmt' for printf(), which can lead to segfault, if the user's string contains '%s', '%d' in it. While fixing it, makes sense to make the explicit check for such issues across the codebase, by making the format call properly. Fixes: CVE-2018-14661 Fixes: bz#1644763 Change-Id: Ib547293f2d9eb618594cbff0df3b9c800e88bde4 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* protocol: remove the option 'verify-volfile-checksum'Amar Tumballi2018-11-053-354/+5
| | | | | | | | | | | | | | | | 'getspec' operation is not used between 'client' and 'server' ever since we have off-loaded volfile management to glusterd, ie, at least 7 years. No reason to keep the dead code! The removed option had no meaning, as glusterd didn't provide a way to set (or unset) this option. So, no regression should be observed from any of the existing glusterfs deployment, supported or unsupported. Updates: CVE-2018-14653 Updates: bz#1644756 Change-Id: I4a2e0f673c5bcd4644976a61dbd2d37003a428eb Signed-off-by: Amar Tumballi <amarts@redhat.com>
* server: don't allow '/' in basenameAmar Tumballi2018-11-052-6/+19
| | | | | | | | | | | | | | | | Server stack needs to have all the sort of validation, assuming clients can be compromized. It is possible for a compromized client to send basenames with paths with '/', and with that create files without permission on server. By sanitizing the basename, and not allowing anything other than actual directory as the parent for any entry creation, we can mitigate the effects of clients not able to exploit the server. Fixes: CVE-2018-14651 Fixes: bz#1644755 Change-Id: I5dc0da0da2713452ff2b65ac2ddbccf1a267dc20 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* io-stats: prevent taking file dump on server sideAmar Tumballi2018-11-051-0/+9
| | | | | | | | | | | | By allowing clients taking dump in a file on brick process, we are allowing compromised clients to create io-stats dumps on server, which can exhaust all the available inodes. Fixes: CVE-2018-14659 Fixes: bz#1644757 Change-Id: I32bfde9d4fe646d819a45e627805b928cae2e1ca Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd : fix high sev coverity issueSunny Kumar2018-11-051-1/+4
| | | | | | | | | This patch fixes CID : 1174824 : RESOURCE_LEAK updates: bz#789278 Change-Id: I2a4f8b508995de112fa16e1094e44ecd4b625312 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* index: prevent arbitrary file creation outside entry-changes folderRavishankar N2018-11-051-0/+17
| | | | | | | | | | | | | | | | | | | Problem: A compromised client can set arbitrary values for the GF_XATTROP_ENTRY_IN_KEY and GF_XATTROP_ENTRY_OUT_KEY during xattrop fop. These values are consumed by index as a filename to be created/deleted according to the key. Thus it is possible to create/delete random files even outside the gluster volume boundary. Fix: Index expects the filename to be a basename, i.e. it must not contain any pathname components like "/" or "../". Enforce this. Fixes: CVE-2018-14654 Fixes: bz#1644760 Change-Id: I35f2a39257b5917d17283d0a4f575b92f783f143 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* features/snapview-server: change gf_log instances to gf_msgRaghavendra Bhat2018-11-057-290/+418
| | | | | | Change-Id: Ib8bdf210a896423abcd7413dd4896d424ac0f561 fixes: bz#1626610 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* dht: fix use after free in dht_rmdir_readdirp_cbkKinglong Mee2018-11-051-8/+11
| | | | | | | | | The frame is freed when linkfile exist in dht_rmdir_is_subvol_empty(), the following message use the freed local. Change-Id: I41191e8bd477f031a2444d5f15e578dc4f086e6b Updates: bz#1640489 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* glusterd: coverity fixesAtin Mukherjee2018-11-032-6/+11
| | | | | | | | | | | | | Addresses CIDs : 1124769, 1124852, 1124864, 1134024, 1229876, 1382382 Also addressed a spurious failure in tests/bugs/glusterd/df-results-post-replace-brick-operations.t to ensure post replace brick operation and before triggering 'df' from mount, client has connection to the newly replaced bricks. Change-Id: Ie5d7e02f89400a661491d7fc2a120d6f6a83a1cc Updates: bz#789278 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* posix : fix coverity issues in posix-entry-ops.cSunny Kumar2018-11-031-2/+14
| | | | | | | | | | | | This patch fixes CID: 1. 1389762 : Explicit null dereferenced 2. 1390462 : Argument cannot be negative 3. 1124552 : Explicit null dereferenced 4. 1356522 : Argument cannot be negative updates: bz#789278 Change-Id: I1262f3b4b61a6e65bb34884f46df9a24b8dd03f1 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd : fix high coverity issues glusterd-store.cSunny Kumar2018-11-021-31/+43
| | | | | | | | | | | This patch fixes CID 1224305, 1202395, 1202394, 1174824, 1174825, 1174826 and 1202397. All issues are of RESOURCE_LEAK type. Change-Id: Ie9944d5bdd0bd2788afdb1b6bb329aa3c44b90d0 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* md-cache: removexattr must be send to glusterfsdKinglong Mee2018-11-021-6/+14
| | | | | | Change-Id: I53a583ec14bce65e8914bc496123dee3abe61f6c Updates: bz#1634220 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* xlator: add generic option parsing frameworkAmar Tumballi2018-11-023-15/+54
| | | | | | | | | | | | | | | | | | | | As an example, and also as an enhancement, added 'log-level' as a default option to every translator (glusterfs already support infrastructure to handle xl->loglevel). Corresponding infrastructure to add per xlator log-level is not present in glusterd volume-set. Plan is to get it sorted out in later patches or in GD2. * Why this is needed? - Mainly because we need to only add different log-level to some xlator to debug few things in a production system, while not changing overall log-level. This helps in better debug-ability. Updates: bz#1193929 Change-Id: Ia4098ce39197cd423345b3d31fe8315481681ab8 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* tiering: remove the translator from build and glusterdAmar Tumballi2018-11-0235-2979/+8
| | | | | | | | | | | | | Based on the proposal to remove few features as they are not actively maintained [1], removing tier translator from the build. Also make sure there are no regression tests involving tiering feature are present. [1] https://lists.gluster.org/pipermail/gluster-users/2018-July/034400.html Change-Id: I2c177f711f9b54b7b24e1a13525ff3132bd9a9c5 updates: bz#1642807 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd: set fsid while performing replace brickSanju Rakonde2018-11-022-0/+76
| | | | | | | | | | While performing the replace-brick operation, we should set fsid value to the new brick. fixes: bz#1637196 Change-Id: I9e9a4962fc0c2f5dff43e4ac11767814a0c0beaf Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* posix: Fix coverity issueVarsha Rao2018-11-021-2/+6
| | | | | | | | | This patch fixes the unchecked return value, coverity issue. CID: 1391412 Change-Id: If85f4afdf8c6d37602c62fbf4d7c730e18be81e7 updates: bz#789278 Signed-off-by: Varsha Rao <varao@redhat.com>
* posix/ctime: Avoid log flood in posix_update_utime_in_mdataKotresh HR2018-11-021-4/+0
| | | | | | | | | | | posix_update_utime_in_mdata() unconditionally logs an error if consistent time attributes features is not enabled. This log does not add any value, prints an incorrect errno & floods the log file. Hence nuking this log message in this patch. fixes: bz#1644129 Change-Id: I9a1f9e7ada3366d2830f18d81f16a1461040092e Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd-handshake: prevent a buffer overflowAmar Tumballi2018-11-011-0/+7
| | | | | | | | | | | | as key size in xdr can be anything, it can be bigger than the 'NAME_MAX' allowed in the structure, which can allow for service denial attacks. Fixes: CVE-2018-14653 Fixes: bz#1644756 Change-Id: I2dc5e99af27ddf44c12c94b07e51adb8674cce80 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* mem-pool: change the values to 64bitsAmar Tumballi2018-11-014-10/+9
| | | | | | | | | | | | | total_allocs of certain type of variables can be 4billion in a single day depending on load. So, 32 bits for that is not enough. Also, size_t is good variable size for one allocation, but the sum of allocations, should be 64bits to make sure we don't overflow the variable. Updates: bz#1639599 Change-Id: If3b19687f94425e913a0201ae5d73661eda51f06 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cluster/ec: prevent infinite loop in self-heal fullXavi Hernandez2018-10-311-5/+6
| | | | | | | | | | | | | | | | | | | | | | | There was a problem in commit 7f81067 that caused infinite loop when full heal was triggered. The previous commit was made to prevent self-heal to go idle after a replace brick operation. One of the changes consisted on setting a flag to force an immediate scan of the dirty directory if a heal on a directory succeeded (assuming it could have generated newer entries). However that change was causing an issue with a full self-heal, since every time an already healed directory was checked and it returned suceessfully, it was also setting the flag, forcing self-heal to start over again. This patch fixes this issue by only setting the flag if the heal is not full. It's assumed that a full self-heal will already traverse all entries automatically, so there's no need to force a new scan later. Change-Id: Id12dbfc04e622b18183e796cc6cc87ccc30a6d55 fixes: bz#1636631 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>