summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "run-tests.sh: provide retry count option"Nigel Babu2017-12-061-27/+12
| | | | | | | | This change was actually causing failures to be reported as passing. This reverts commit 4e798113229eab68e9e02364bb094a4ab8274c65. Change-Id: I02b06e7f2af03419d922de8ad7e6948ae8cb8d06
* features/quota: Fix brick crash in quota unlink callbackShreyas Siravara2017-12-061-1/+1
| | | | | | Change-Id: Iad16d7b2102376380eb0f6918111249af370aaeb BUG: 1521014 Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
* tests: Fix prove test bug-1292020.tKevin Vigor2017-12-051-8/+4
| | | | | | | | | | | dd is doing a statfs and failing with ENOSPC instead of writign and getting EDQUOTA. Make either error a success in this test. > Signed-off-by: Kevin Vigor <kvigor@fb.com> > Reviewed-on: http://review.gluster.org/16352 BUG: 1521116 Signed-off-by: ShyamsundarR <srangana@redhat.com> Change-Id: I9f580d9e4a4dd293df55a1d954f86a9862fcae7b
* rio/everywhere: add icreate/namelink fopSusant Palai2017-12-0521-1/+860
| | | | | | | | | | | | | | | | | | | | | 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>
* cluster/dht: Fix build error due to switch statement on a booleanShreyas Siravara2017-12-051-16/+5
| | | | | Change-Id: Idf672b435e389baada732f609398404479306909 BUG: 1520974
* rfc.sh: Update rfc.sh to use a custom origin via an env variableShreyas Siravara2017-12-051-10/+11
| | | | | | Change-Id: I9efc6a7fbcbefad0c476cf69096b659485ed8906 BUG: 1521013 Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
* cluster/ec: Fix bugs in stripe-cache featureAshish Pandey2017-12-052-1/+4
| | | | | | | | | | | | | | 1 - This patch fixes a bug in ec_update_stripe() that prevented some stripes to be updated after a write. 2 - This patch also include code modification for the case in which a file does not exist and we write on unaligned offset and user size, the last stripe on which "end" will fall should also be cached. Change-Id: I069cb4be1c8d59c206e3b35a6991e1fbdbc9b474 BUG: 1520758 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* run-tests.sh: provide retry count optionAmar Tumballi2017-12-051-12/+27
| | | | | | | | | | | | | | and default it to 5. With this change, if any test fails due to timing issues (because of slower/faster VM etc), there is a retry logic which gets triggered. Many times, if a test successfully fails more than 5 times, there may be a genuine issue with it, one should take a serious look at the failing test. Change-Id: Ia88e3293fd2724b0f9f09d8bc026560792fc1578 BUG: 1517961 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs: Add put fopPoornima G2017-12-0515-0/+272
| | | | | | | | | | | | | | | | | Problem: It had been a longtime request to implement put fop in gluster. put fop in gluster may not have the exact sementics of HTTP PUT, but can be easily extended to do so. The subsequent patches, will contain more semantics on the put fop and its guarentees. Why compound fop framework is not used for put? Compound fop framework currently doesn't allow compounding of entry fop and inode fops, i.e. fops on multiple inodes cannot be combined in compound fop. Updates #353 Change-Id: Idb7891b3e056d46d570bb7e31bad1b6a28656ada Signed-off-by: Poornima G <pgurusid@redhat.com>
* posix: Reorganize posix xlator to prepare for reuse with rioShyamsundarR2017-12-0211-8338/+8831
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Split out entry and inode/fd based FOPs into separate files from posix.c 2. Split out common routines (init, fini, reconf, and such) into its own file, from posix.c 3. Retain just the method assignments in posix.c (such that posix2 for RIO can assign its own methods in the future for entry operations and such) 4. Based on the split in (1) and (2) split out posix-handle.h into 2 files, such that macros that are needed for inode ops are in one and rest are in the other If the split is done as above, posix2 can compile with its own entry ops, and hence not compile, the entry ops as split in (1) above. The split described in (4) can again help posix2 to define its own macros to make entry and inode handles, thus not impact existing POSIX xlator code. Noted problems - There are path references in certain cases where quota is used (in the xattr FOPs), and thus will fail on reuse in posix2, this needs to be handled when we get there. - posix_init does set root GFID on the brick root, and this is incorrect for posix2, again will need handling later when posix2 evolves based on this code (other init checks seem fine on current inspection) Merge of experimental branch patches with the following gerrit change-IDs > Change-Id: I965ce6dffe70a62c697f790f3438559520e0af20 > Change-Id: I089a4d9cf470c2f9c121611e8ef18dea92b2be70 > Change-Id: I2cec103f6ba8f3084443f3066bcc70b2f5ecb49a Fixes gluster/glusterfs#327 Change-Id: I0ccfa78559a7c5a68f5e861e144cf856f5c9e19c Signed-off-by: ShyamsundarR <srangana@redhat.com>
* storage/posix : options to override umaskSubha sree Mohankumar2017-12-024-13/+258
| | | | | | | | | | | | | | | | | | | | | Options "create-mask" and "create-directory-mask" are added to remove the mode bits set on a file or directory when its created. Default value of these options is 0777. Options "force-create-mode" and "force-create-directory" sets the default permission for a file or directory irrespective of the clients umask. Default value of these options is 0000. Command to set option: volume set <volume name> storage.<option-name> <value> The valid value range from 0000 to 0777. Updates #301 Change-Id: Ia33d13f2117202ca55a056c747ccc3674eb8bae1 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* cluster/dht: populate inode in dentry for single subvolume dhtRaghavendra G2017-12-022-1/+69
| | | | | | | | | | ... in readdirp response if dentry points to a directory inode. This is a special case where the entire layout is stored in one single subvolume and hence no need for lookup to construct the layout Change-Id: I44fd951e2393ec9dac2af120469be47081a32185 BUG: 1492625 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: don't overfill the buffer in readdir(p)Raghavendra G2017-12-021-3/+18
| | | | | | | | | | | | | | | | | | | | Superflous dentries that cannot be fit in the buffer size provided by kernel are thrown away by fuse-bridge. This means, * the next readdir(p) seen by readdir-ahead would have an offset of a dentry returned in a previous readdir(p) response. When readdir-ahead detects non-monotonic offset it turns itself off which can result in poor readdir performance. * readdirp can be cpu-intensive on brick and there is no point to read all those dentries just to be thrown away by fuse-bridge. So, the best strategy would be to fill the buffer optimally - neither overfill nor underfill. Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84 BUG: 1492625 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd:buffer_size_warning coverity fixesSubha sree Mohankumar2017-12-021-0/+6
| | | | | | | | Fixes Issues :15,17,18,19,24,38 Change-Id: Ib09d319308e4ef7dfbdd5e49e16064d4f55a54f9 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* posix: Convert posix_fs_health_check asynchrnously to save timestampMohit Agrawal2017-12-014-16/+104
| | | | | | | | | | | Problem: Sometime posix_fs_health_check thread is blocked on write/read call while backend device deleted abruptly. Solution: To resolve it convert code to update timestamp asynchrnously. BUG: 1501132 Change-Id: Id68ea6a572bf68fbf437e1d9be5221b63d47ff9c Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Tier: Stop tierd for detach starthari gowtham2017-12-019-183/+183
| | | | | | | | | | | | | | | | | | | Problem: tierd was stopped only after detach commit This makes the detach take a longer time. The detach demotes the files to the cold brick and if the promotion frequency is hit, then the tierd starts to promote files to hot tier again. Fix: stop tierd after detach start so the files get demoted faster. Note: the is_tier_enabled was not maintained properly. That has been fixed too. some code clean up has been done. Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: I532f7410cea04fbb960105483810ea3560ca149b BUG: 1446381
* tests: Fix a broken test casePoornima G2017-12-011-8/+4
| | | | | | | | | | | | | | | | | | | | Issue: When using statedump command to take statedump of the gfapi process, we specify the following things: $gluster volume statedump <volname> client <host>:<pid> pid: Pid of the gfapi application host: This should be the IP/hostname as seen by the glusterd, the gfapi application is connected to. In this test case, if gfapi application is running locally, and is connected to $H1 glusterd, the <host> need not be $H1. <host> could be localhost, 127.0.0.1, 127.1.1.1 etc. based on the configuration of the system. Hence use netstat to find the right <host> value. Change-Id: I6efb9d1ccaf9c6841a9ab7c9ebfecafc03c0bc5e BUG: 1517961 Signed-off-by: Poornima G <pgurusid@redhat.com>
* dht: coverity fix in dht-rebalance.ckarthik-us2017-11-301-1/+0
| | | | | | | | | | | Fixed UNUSED_VALUE warning in dht_migrate_file. Issue ID: 526 From: http://download.gluster.org/pub/gluster/glusterfs/ static-analysis/master/glusterfs-coverity/2017-11-30-eb013e4c Change-Id: I37395e8ce7088742501424fcce918f0ee8ab4f3d BUG: 789278 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* libglusterfs: use rwlock for fdtableZhang Huan2017-11-302-25/+24
| | | | | | | | | | | To resolve a fd from client requests, need to take a mutex lock for the fdtable to do the lookup. When a client is busy doing read and write, the mutex lock could introduce contention. Therefore, use rwlock instead of mutex to reduce the contention. Change-Id: Ic833aed738a178a7ea1abafed7eb13814989d28c BUG: 1518582 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* heal: Fix coverity scan dead-code reportPranith Kumar K2017-11-301-11/+1
| | | | | | | | | | | | | | | | | Got following kind of scan issues: *** CID 1382469: (DEADCODE) /heal/src/glfs-heal.c: 1749 in main() 1744 break; 1745 case GF_SHD_OP_SBRAIN_HEAL_FROM_BRICK: 1746 ret = glfsh_heal_from_brick (fs, top_subvol, &rootloc, 1747 hostname, path, file); 1748 break; >>> CID 1382469: (DEADCODE) >>> Execution cannot reach this statement: "case GF_SHD_OP_INVALID:". Change-Id: I184da785893cb3e281b21f2d4fcdd2e5452102e6 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* tests: fix for bug-1260185-donot-allow-detach-commit-unnecessarily.t failurehari gowtham2017-11-302-5/+7
| | | | | | | | | | problem: detach commit was issues before detach start was completed. fix: wait for detach start to finish and then detach commit. Change-Id: I639962be6de6dbd1512f0a5617050d1e6872eac8 BUG: 1517961 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* xlator: provide a xlator_api_t structure to include all exported optionsAmar Tumballi2017-11-305-37/+269
| | | | | | | | | | each translator from now on can have just 1 symbol exported called 'xlator_api', which has all the required fields in it. Updates: #164 Change-Id: I48d54f5ec59fee842b1d55877e3ac5e9ec9b6bdd Signed-off-by: Amar Tumballi <amarts@redhat.com>
* geo-rep: Fix access-mount geo-rep configKotresh HR2017-11-303-4/+12
| | | | | | | | | Fix access-mount and slave-access-mount configs. Change-Id: Ib586677755e76a51b9f20093e441b72789b4fecc Signed-off-by: Kotresh HR <khiremat@redhat.com> BUG: 1517633
* posix: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for storage.reserveMohit Agrawal2017-11-301-1/+1
| | | | | | | | | | | Problem: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for option storage.reserve Solution: Actually feature was merged in 3.13.0 branch so GD_OP_VERSION needs to change from 3_12_0 to 3_13_0 BUG: 1518508 Change-Id: I5856ab3447b465879ec068cecb0933b91dd697f9 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* cluster/ec: Modify OP_VERSION to 4.0.0 for stripe cache optionAshish Pandey2017-11-291-1/+1
| | | | | | Change-Id: I991eaeb979497a1bf056b5871284274f959f36f2 BUG: 1471753 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* glusterd: revert coverity fix for freeing key_dupAtin Mukherjee2017-11-291-1/+0
| | | | | | | | | key_dup can't be freed here as the same is referenced at the gd_mgmt_v3_unlock_timer_cbk. Change-Id: I85667f98c82d1acebcce59137dfc0dd1ca93b4eb BUG: 789278 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* posix: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for storage.reserveMohit Agrawal2017-11-291-1/+1
| | | | | | | | | | | Problem: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for option storage.reserve Solution: Actually feature was merged in 3.13.0 branch so GD_OP_VERSION needs to change from 3_12_0 to 3_13_0 BUG: 1518508 Change-Id: I3890a3e921847d896465ce456fee003efaeb0c61 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* posix: Fix coverity issues in several posix functionsMohit Agrawal2017-11-292-63/+110
| | | | | | | | | | | | | | Fixes issues 528, 763, 778, 792, 793, 86, 28, 29, 30, 39, 42, 769, 783, 794, 795 from the report at [1]. [1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Note: Apart from coverity resolve other issues in posix_get(f)xattr more cleaner way. BUG: 789278 Change-Id: If0737492198481ad7a8d75a3801c862fd61b8c6e Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* cluster-syncop: Address comments in 3ad68df725ac32f83b5ea7c0976e2327e7037c8cPranith Kumar K2017-11-291-2/+4
| | | | | Change-Id: I325f718c6c440076c9d9dcd5ad1a0c6bde5393b1 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* features/bitrot: Add default value for stub export optionKaushal M2017-11-291-1/+2
| | | | | | | Updates #302 Change-Id: Ife78e15ad6300f09a820cbc25f43f214dc5e611d Signed-off-by: Amar Tumballi <amarts@redhat.com>
* tests: Renable basic/afr/split-brain-favorite-child-policy.tNigel Babu2017-11-291-6/+0
| | | | | | | | | This test was failing due to an infra issue. The infra issue is now fixed. BUG: 1517961 Change-Id: I09dfab9c0a3ebe73c738222e6269d9e35c85eddb Signed-off-by: Nigel Babu <nigelb@redhat.com>
* features/changelog: Add default values for optionsKaushal M2017-11-291-0/+2
| | | | | | | Updates #302 Change-Id: I806e42b658114b242b787491400332299dbdbf77 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* quick-read: redefine optionsPoornima G2017-11-291-0/+2
| | | | | | | Updates: #302 Change-Id: If25996a080d69e9ac819ca771a5774ccdab6e1ce Signed-off-by: Poornima G <pgurusid@redhat.com>
* build: Use pkg-config to get libtirpc flagsJames Le Cuirot2017-11-291-4/+4
| | | | | | | This benefits cross-compiling and other exotic setups. Change-Id: Id9f168728d96264ccab23d2e618fa2b4003455a3 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* gfapi: avoid nameless lookup when inode_find successKinglong Mee2017-11-281-2/+22
| | | | | | | | Ganesha calls pub_glfs_h_create_from_handle always with stat != NULL, for inode_find success, a nameless lookup seems unnecessary. Change-Id: I1242deefe8ff4af15a98cc3af7824233e24d62ad Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* tests: mark currently failing regression tests as known issuesAmar Tumballi2017-11-284-0/+24
| | | | | | Change-Id: If6c36dc6c395730dfb17b5b4df6f24629d904926 BUG: 1517961 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* rpc: Eliminate conn->lock contention by using more granular locksMohit Agrawal2017-11-283-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | rpc_clnt_submit() acquires conn->lock before call to rpc_transport_submit_request() and subsequent queuing of frame into saved_frames list. However, as part of handling RPC_TRANSPORT_MSG_RECEIVED and RPC_TRANSPORT_MSG_SENT notifications in rpc_clnt_notify(), conn->lock is again used to atomically update conn->last_received and conn->last_sent event timestamps. So when conn->lock is acquired as part of submitting a request, a parallel POLLIN notification gets blocked at rpc layer until the request submission completes and the lock is released. To get around this, this patch call clock_gettime (instead to call gettimeofday) to update event timestamps in conn->last_received and conn->last_sent and to call clock_gettime don't need to call mutex_lock because it (clock_gettime) is thread safe call. Note: Run fio on vm after apply the patch, iops is improved after apply the patch. Change-Id: I347b5031d61c426b276bc5e07136a7172645d763 BUG: 1467614 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* tests: fix bug-1432542-mpx-restart-crash.t spurious failureAtin Mukherjee2017-11-281-1/+7
| | | | | | Change-Id: Ied1215bfec0ccf2ec8ee55a0aaf618517b67bd55 BUG: 1517961 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* cluster/ec: EC DISCARD doesn't punch hole properlySunil Kumar Acharya2017-11-282-3/+13
| | | | | | | | | | | | | | Problem: DISCARD operation on EC volume was punching hole of lesser size than the specified size in some cases. Solution: EC was not handling punch hole for tail part in some cases. Updated the code to handle it appropriately. BUG: 1516206 Change-Id: If3e69e417c3e5034afee04e78f5f78855e65f932 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* cluster/ec: Prevent self-heal to work after PARENT_DOWNXavier Hernandez2017-11-282-28/+52
| | | | | | | | | | | | | | | | | | | When the volume is being stopped, PARENT_DOWN event is received. This instructs EC to wait until all pending operations are completed before declaring itself down. However heal operations are ignored and allowed to continue even after having said it was down. This may cause unexpected results and crashes. To solve this, heal operations are considered exactly equal as any other operation and EC won't propagate PARENT_DOWN until all operations, including healing, are complete. To avoid big delays if this happens in the middle of a big heal, a check has been added to quit current heal if shutdown is detected. Change-Id: I26645e236ebd115eb22c7ad4972461111a2d2034 BUG: 1515266 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* protocol/client: Update xlator options tableKaushal M2017-11-281-13/+32
| | | | | | | Updates #302 Change-Id: Ia78e5d8f7b9ee6410965296808ad316c3cfb1d61 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cli: commands are missing in man pageSanju Rakonde2017-11-281-2/+44
| | | | | | | | adding missed commands to gluster manual page. Change-Id: I2e5eb1b3929241275ee7a046c5e3d45a5aa5c4a2 BUG: 1517554 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* snapshot : snapshot creation failed after brick reset/replaceSunny Kumar2017-11-284-18/+48
| | | | | | | | | | | | Problem : snapshot creation was failing after brick reset/replace Fix : changed code to set mount_dir value in rsp_dict during prerequisites phase i.e glusterd_brick_op_prerequisites call and removed form prevalidate phase. Signed-off-by: Sunny Kumar <sunkumar@redhat.com> Change-Id: Ief5d0fafe882a7eb1a7da8535b7c7ce6f011604c BUG: 1512451
* tests: Spurious failure multiplex-limit-issue-151.tN Balachandran2017-11-271-1/+1
| | | | | | | | | A timing issue caused the remove-brick commit to fail. Replaced 'remove-brick commit' with 'remove-brick force'. Change-Id: I69144b2f7be34095dbd3a7d182e0bf01b27fb0a4 BUG: 1517904 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* afr: volume option fixes for GD2Ravishankar N2017-11-272-39/+121
| | | | | | | | | This patch takes care of volume options exposed via the CLI. Updates #302 Change-Id: I6fd1645604928f6b9700e2425af4147cc6446a3a Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* features/read-only: Redefine the options for read-only and wormkarthik-us2017-11-272-0/+21
| | | | | | | | | | | With https://review.gluster.org/18059 introducing new fields into the volume_option structure, this change takes care of the changes required at the read-only and worm side. Updates #302 Change-Id: Ie9d38eed6739a8ef229c462448532354e275af7c Signed-off-by: karthik-us <ksubrahm@redhat.com>
* features/index: Update xlator options tableKaushal M2017-11-271-0/+4
| | | | | | | Updates #302 Change-Id: I2bc99394d89e94ae6aeee9de8d85a3d09991fad9 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* geo-rep: Fix slave side custom config issueAravinda VK2017-11-272-4/+21
| | | | | | | | | | | | | Slave gsyncd will not use session config files, Slave configs are stored in Master config file itself and sent as argument to slave gsyncd. With this patch, gconf default values are overwritten if argument name starts with "slave-" Change-Id: Iebc51f52232c0cd30b29199f03015f97b70ce537 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1517068
* tests/basic/inode-leak.t: mark as known issueAmar Tumballi2017-11-271-0/+7
| | | | | | | | | | | | Mainly because the tests are consistently taking more than 20mins for each runs. One of the samples from a regression run: > /tests/basic/inode-leak.t - 1643 second Change-Id: If11572203c702f64847794f6d578a6dc19a0dee8 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* extras/devel-tools: Fix print-backtrace scriptPrashant D2017-11-261-2/+18
| | | | | | | | | | | | | | | Problem: If cpio version is less 2.11 then cpio command failing with unrecognised option --directory. Solution: Check the cpio version and run rpm2cpio/cpio with or without -D or --directory option. Fixes : #359 Change-Id: Ibd440207231807dab1b58291ab661857094f1a4a BUG: 1510874 Signed-off-by: Prashant D <pdhange@redhat.com>