summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests : add a test to check if there is an inode leakMohamed Ashiq Liyazudeen2017-11-221-0/+41
| | | | | | | | | | | This test check if there is inode leak in bricks. lru_size for mount is expected to be zero. active_size for mount is expected to be 1 which is of root. Change-Id: I18762b4255af411f1b55c0be98451c8ef1b35478 BUG: 1370116 Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com>
* cluster/dht: make rebalance use truncate incaseSusant Palai2017-11-223-71/+99
| | | | | | | | | .. the brick file system does not support fallocate. Change-Id: Id76cda2d8bb3b223b779e5e7a34f17c8bfa6283c BUG: 1488103 Signed-off-by: Susant Palai <spalai@redhat.com>
* features/locks: Fix memory leaksXavier Hernandez2017-11-225-5/+11
| | | | | | Change-Id: Ic1d2e17a7d14389b6734d1b88bd28c0a2907bbd6 BUG: 1515161 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* cluster/afr: Print heal info summary output in stream fashionkarthik-us2017-11-221-0/+1
| | | | | | | | | | | | | | Problem: The heal info summary was printing the output at the end after crawling for pending heal entries completes on all the bricks. Fix: Printing the output immediately after the crawl on individual brick completes, so that it won't give the impression of CLI being hung. Change-Id: Ieaf5718736a7ee6837bac02bd30a95836e605dab BUG: 1506104 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* libglusterfs: Handle FS errors gracefullyPranith Kumar K2017-11-224-95/+182
| | | | | | | | | | | | | | | Problem: FS sometimes doesn't give the expected return values. We need our common functions to guard against this. Example BUG: https://bugzilla.redhat.com/show_bug.cgi?id=864401 Fix: When the return value is not as per specification, change the return value to -1 and errno to EIO BUG: 1469487 Change-Id: I14739ab2e5ae225b1a91438b87f8928af56f2934 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* ec: Use tiebreaker_inodelk where necessaryPranith Kumar K2017-11-221-8/+11
| | | | | | | | | | | | | | | | | When there are big directories or files that need to be healed, other shds are stuck on getting lock on self-heal domain for these directories/files. If there is a tie-breaker logic, other shds can heal some other files/directories while 1 of the shds is healing the big file/directory. Before this patch: 96.67 4890.64 us 12.89 us 646115887.30us 340869 INODELK After this patch: 40.76 42.35 us 15.09 us 6546.50us 438478 INODELK Fixes gluster/glusterfs#354 Change-Id: Ia995b5576b44f770c064090705c78459e543cc64 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* cluster-syncop: Implement tiebreaker inodelk/entrylkPranith Kumar K2017-11-222-0/+103
| | | | | | | | | | | | In this implementation, inodelk/entrylk will be tried for the subvols given with trylock. In this attempt if all locks are obtained, then inodelk is successful, otherwise, if it gets success on the first available subvolume, then it will go for blocking lock, where as other subvolumes will not try and this acts as tie-breaker. Updates gluster/glusterfs#354 Change-Id: Ia2521b9ccb81a42bd6104ab21f610f761ba2b801 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* build: Allow libtirpc to be explicitly requestedJames Le Cuirot2017-11-221-2/+10
| | | | | | | | Some distributions like Gentoo no longer include the RPC stuff in their glibc packages. Change-Id: Ic47065e9c2f5a0ccd860df9d7185eff59990ff10 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* cli: Fix coverity errors for cli-rpc-ops.cKaushal M2017-11-211-34/+106
| | | | | | | | | | | | | Fixes issues 147, 168, 169, 219, 715, 718, 766, 768, 772, 774, 776, 782, 790 from the report at [1]. Also, fixed some other possible static checker errors as well. [1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ BUG: 789278 Change-Id: I985cea1ef787d239b2632d5a7f467070846f92e4 Signed-off-by: Kaushal M <kaushal@redhat.com>
* cluster/dht: Coverity fixes for dht-rebalance.ckarthik-us2017-11-211-80/+54
| | | | | | | | | | | | | | | | | | Warning Functions DEADCODE gf_defrag_handle_migrate_error gf_defrag_get_entry gf_defrag_process_dir gf_defrag_start_crawl dht_migrate_file UNUSED_VALUE migrate_special_files dht_migrate_file FORWARD_NULL gf_tier_do_fix_layout Change-Id: I6f408585b83a267581a4273dae7c22b8993163d5 BUG: 789278 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* protocol/server: use common function to reduce duplicate codeAmar Tumballi2017-11-211-1031/+216
| | | | | Change-Id: Ifad0a88245fa6fdbf4c43d813b47c314d2c50435 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* Disable gfid2path by default on NetBSDEmmanuel Dreyfus2017-11-211-0/+11
| | | | | | | | | | | NetBSD storage of extended attributes for UFS1 badly scales when the list of extended attributes names rises. gfid2path can add as many extended attributes names as we have files, hence we keep it disabled for performance sake. Change-Id: Id77b5f5ceb4d5eba1b3362b4b9fc693450ffbc2b Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> BUG: 1129939
* timer: Fix possible race during cleanupSoumya Koduri2017-11-211-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in bug1509189, there is a possible race between gf_timer_cancel(), gf_timer_proc() and gf_timer_registry_destroy() leading to use_after_free. Problem: 1) gf_timer_proc() is called, locks reg, and gets an event. It unlocks reg, and calls the callback. 2) Meanwhile gf_timer_registry_destroy() is called, and removes reg from ctx, and joins on gf_timer_proc(). 3) gf_timer_call_cancel() is called on the event being processed. It cannot find reg (since it's been removed from reg), so it frees event. 4) the callback returns into gf_timer_proc(), and it tries to free event, but it's already free, so double free. Solution: The fix is to bail out in gf_timer_cancel() when registry is not found. The logic behind this is that, gf_timer_cancel() is called only on any existing event. That means there was a valid registry earlier while creating that event. And the only reason we cannot find that registry now is that it must have got set to NULL when context cleanup is started. Since gf_timer_proc() takes care of releasing all the remaining events active on that registry, it seems safe to bail out in gf_timer_cancel(). Change-Id: Ia9b088533141c3bb335eff2fe06b52d1575bb34f BUG: 1509189 Reported-by: Daniel Gryniewicz <dang@redhat.com> Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* rpc/rpc-transport: dead code coverity fixKartik_Burmee2017-11-211-3/+0
| | | | | | | | | | | | issue: Execution cannot reach this statement: "iobuf_unref(iobuf);" function: gf_rdma_do_reads fix: removed the statement and the corresponding 'if' block Change-Id: Ia21b872996dbc8e0a66c8c28dd90b367d3c9aadd BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* libglusterfs:checked return coverity fixSubha sree Mohankumar2017-11-211-1/+8
| | | | | | | | | | Problem:Calling "gf_thread_create" without checking return value. Fix:The return value is saved and checked if gf_thread_create fails. Change-Id: Ibdaac1c90a1a8369e92ade50825598b041063da8 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* cluster/dht: dead code coverity fixKartik_Burmee2017-11-211-3/+0
| | | | | | | | | | | | issue: Execution cannot reach this statement: "call_stub_destroy(stub);" function: dht_mkdir_hashed_cbk fix: removed the statement and the corresponding 'if' condition block. Change-Id: I3e31056ee489ede6864e51a8e666edc7da3c175f BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* Revert "debug/io-stats: Append stats for each interval in the same file"cholcombe9732017-11-201-1/+1
| | | | | | | | | This reverts commit fc73ae5f81ef5926e3dc2311db116250d0f2a321. See bug: https://bugzilla.redhat.com/show_bug.cgi?id=1513692 Change-Id: I00d5989b042d4e345621c596d5370d324948557f Bug: 1513692 Signed-off-by: Chris Holcombe <xfactor973@gmail.com>
* features/worm: new config option to manage deletion of Worm files.Vishal Pandey2017-11-205-1/+28
| | | | | | | | | | | | | | | | | | | | Add a new configuration option worm-files-deletable to file-level Worm in order to control behaviour of Worm files upon deletion. Steps to Test: 1. Add all the configuration options to a volume to activate file-level-worm 2. Option features.worm-files-deletable is set to 1 by default. 3. Create a new file and wait for the retention time to expire. 4. After retention time expires, do an truncate, rename, unlink, link or write to send the file in Worm state. 5. After that do `rm -f filename`. 6. The file is successfully removed. 7. Repeat from step 2 by setting features.worm-files-deletable 0. This time deletion should not be successful. Change-Id: Ibc89861ee296e065330b93a9f9606be5da40af31 BUG: 1508898 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* rpc : Change the way client uuid is builtPoornima G2017-11-203-27/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Today the main users of client uuid are protocol layers, locks, leases. Protocol layers requires each client uuid to be unique, even across connects and disconnects. Locks and leases on the server side also use the same client uid which changes across file migrations. Which makes the graph switch and file migration tedious for locks and leases. file migration across bricks becomes difficult as client uuid for the same client, is different on the other brick. The exact set of issues exists for leases as well. Solution would be to introduce a constant in the client-uid string which the locks and leases can use to identify the owner client across bricks. Client uuid currently: %s(ctx uuid)-%s(protocol client name)-%d(graph id)%s(setvolume count/reconnect count) Proposed Client uuid: "CTX_ID:%s-GRAPH_ID:%d-PID:%d-HOST:%s-PC_NAME:%s-RECON_NO:%s" - CTX_ID: This is will be constant per client. - GRAPH_ID, PID, HOST, PC_NAME(protocol client name), RECON_NO(setvolume count) remains the same. Change-Id: Ia81d57a9693207cd325d7b26aee4593fcbd6482c BUG: 1369028 Signed-off-by: Susant Palai <spalai@redhat.com>
* features/marker: coverity fixKartik_Burmee2017-11-191-1/+1
| | | | | | | | | | | | issue: Calling "mq_inode_ctx_get" without checking return value function: marker_rename_unwind fix: typecasted the return value of function to void Change-Id: I552b1d76df434dfc3d9c2273ec63ccc4b9f960f2 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* cluster/dht: Don't set ACLs on linkto fileN Balachandran2017-11-191-0/+11
| | | | | | | | | | | | | | The trusted.SGI_ACL_FILE appears to set posix ACLs on the linkto file that is a target of file migration. This can mess up file permissions and cause linkto identification to fail. Now we remove all ACL xattrs from the results of the listxattr call on the source before setting them on the target. Change-Id: I56802dbaed783a16e3fb90f59f4ce849f8a4a9b4 BUG: 1514329 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* afr: add checks for allowing lookupsRavishankar N2017-11-186-116/+164
| | | | | | | | | | | | | | | | | | | | | | Problem: In an arbiter volume, lookup was being served from one of the sink bricks (source brick was down). shard uses the iatt values from lookup cbk to calculate the size and block count, which in this case were incorrect values. shard_local_t->last_block was thus initialised to -1, resulting in an infinite while loop in shard_common_resolve_shards(). Fix: Use client quorum logic to allow or fail the lookups from afr if there are no readable subvolumes. So in replica-3 or arbiter vols, if there is no good copy or if quorum is not met, fail lookup with ENOTCONN. With this fix, we are also removing support for quorum-reads xlator option. So if quorum is not met, neither read nor write txns are allowed and we fail the fop with ENOTCONN. Change-Id: Ic65c00c24f77ece007328b421494eee62a505fa0 BUG: 1467250 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* cluster/afr: Fix for arbiter becoming sourcekarthik-us2017-11-184-6/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When eager-lock is on, and two writes happen in parallel on a FD we were observing the following behaviour: - First write fails on one data brick - Since the post-op is not yet happened, the inode refresh will get both the data bricks as readable and set it in the inode context - In flight split brain check see both the data bricks as readable and allows the second write - Second write fails on the other data brick - Now the post-op happens and marks both the data bricks as bad and arbiter will become source for healing Fix: Adding one more variable called write_suvol in inode context and it will have the in memory representation of the writable subvols. Inode refresh will not update this value and its lifetime is pre-op through unlock in the afr transaction. Initially the pre-op will set this value same as read_subvol in inode context and then in the in flight split brain check we will use this value instead of read_subvol. After all the checks we will update the value of this and set the read_subvol same as this to avoid having incorrect value in that. Change-Id: I2ef6904524ab91af861d59690974bbc529ab1af3 BUG: 1482064 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* features/changetimerecorder:unused value coverity fixSubha sree Mohankumar2017-11-171-2/+1
| | | | | | | | | | Problem : Overwritting the value of ret in extract_db_params. Fix : The value is used in out. Change-Id: Ib7bee999c6f19e0c83ef47deab61835977162bd5 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* tier/glusterd: coverity issues in glusterd-tier.chari gowtham2017-11-171-3/+13
| | | | | | | | | | | | Coverity issues fixed in this patch: 254, 256, 295, 791, 546 from: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/ master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I44b7d307a3434040125d8b1d6fb18221f30f678d BUG: 789278 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* Upcall: Add new GD2 fields to upcall xlator optionsSoumya Koduri2017-11-171-2/+8
| | | | | | | | | Add new fields used by GD2 to the upcall xlator options. Updates #302 Change-Id: Ia684648aa06312ca9649f00af17575162adb4996 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* features/changetimerecorder: xlators opts improvement for GD2hari gowtham2017-11-171-12/+46
| | | | | | | Updates: #302 Change-Id: Ib401eb6fa187ab2498de8b5cdf4686e388192208 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* protocol/server: Update xlator options tableKaushal M2017-11-171-13/+43
| | | | | | | Updates #302 Change-Id: Ifb604914a5d8b5c47ea2de0c026043b71a783387 Signed-off-by: Kaushal M <kaushal@redhat.com>
* features/changelog: xlators opts improvement for GD2Aravinda VK2017-11-171-9/+34
| | | | | | | Updates: #302 Change-Id: Ibbf0f99d4b81a5e9a5ccee1889214b74f083a7db Signed-off-by: Aravinda VK <avishwan@redhat.com>
* barrier: redefine the optionsAtin Mukherjee2017-11-171-2/+6
| | | | | | | | | | | With https://review.gluster.org/18059 introducing new fields into the volume_option structure, this change takes care of the changes required at the barrier side. Updates #302 Change-Id: If991df10b130c762a44883668a00e49943a508f8 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* feature/bitrot: stub xlators opts for GD2Kotresh HR2017-11-171-0/+5
| | | | | | Updates #302 Change-Id: I320eabf0c83295e90a312316a8373ccf5bf91dc4 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* features/index: initialize the options properlyPranith Kumar2017-11-171-3/+12
| | | | | | | watchlists should not over-write values gathered in previous invocation. Change-Id: I5634930d20e720ad6509b03a64360d7320800565 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* mailmap: add mailmap entry for potatogimJi-Hyeon Gim2017-11-161-0/+1
| | | | | Change-Id: I2dd0dbb1949a8cab0a40e08f39182366a8a44990 Signed-off-by: Ji-Hyeon Gim <potatogim@gluesys.com>
* who-wrote-glusterfs: add an alias for potatogim@potatogim.netJi-Hyeon Gim2017-11-161-0/+1
| | | | | Change-Id: Ieb3d1910f0284bd951089c197abc569ae95e5bcd Signed-off-by: Ji-Hyeon Gim <potatogim@gluesys.com>
* tier: coverity fix for tier-common.chari gowtham2017-11-161-28/+5
| | | | | | | | | fix for the coverity id: 258, 162 Change-Id: I35ba21e37e186b7c1ce54faf5b24f48858e6fc70 BUG: 789278 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* fuse-lib: checked_return coverity fixKartik_Burmee2017-11-161-1/+1
| | | | | | | | | | | | issue: Calling "chdir" without checking return value function: gf_fuse_unmount_daemon fix: typecasted return value of function to void. Change-Id: I5f06fbe886a35c2d4c9f763eeb01771e9451f232 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: Fix coverity issues in handshake moduleSanju Rakonde2017-11-151-10/+6
| | | | | | | | This patch fixes coveruty issues 737,738,172,188,728,198,235,35. Change-Id: I632ddc5edbfb03bc81ce27f02886b8e262c1d946 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* who-wrote-glusterfs: add gluesys.com to domain-mapJi-Hyeon Gim2017-11-151-0/+1
| | | | | Change-Id: Idfc62026ca50aaf8767f093b4daefd7119564a1f Signed-off-by: Ji-Hyeon Gim <potatogim@gluesys.com>
* dict: Fix several coverity issues in dictMohit Agrawal2017-11-153-10/+37
| | | | | | | | | | | | | This patch fixes issues 230,592,593,110,63 from [1] [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Note: Resolve FORWARD_NULL coverity issue in glusterfs_ctx_new is also fixed with this patch. BUG: 789278 Change-Id: Ic4199a144a14cc9ead7366fb1c9699197141bc86 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* glusterd: Fix coverity issues in glusterd-handler.cSamikshan Bairagya2017-11-151-9/+26
| | | | | | | | | | | Fixes get-state CLI related coverity issues 477, 511, 515, 523, 526 and 527 from the report at [1] [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: Ieb6f64c9035b4d9338d9515de003d607b7a4e9bc BUG: 789278 Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
* features/changelog: Structured logging supportAravinda VK2017-11-154-168/+230
| | | | | | | | | | | Structured logging infra is available in logging library with issue #240. Log messages with dynamic content are identified and converted to structured logging format(`gf_msg` to `gf_smsg` and `gf_log` to `gf_slog`) BUG: 1501054 Change-Id: I5fccc354730c07cb9ae444d0b959d1d72bd9be49 Signed-off-by: Aravinda VK <avishwan@redhat.com>
* xlators/features/trash: STRING_OVERFLOW Coverity fixes in trash.cKamal Mohanan2017-11-151-32/+59
| | | | | | | | Replaced strcpy, strcat with strncpy, strncat calls. Change-Id: Ibf46a2b5ae4a0dd1632be46d6fe3597f6ace7a41 BUG: 789278 Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
* libglusterfs/options: Add new member 'setkey' to xlator optionsKaushal M2017-11-152-2/+9
| | | | | | | | | | | | | | | | | The 'setkey' will be used as the key by GD2 when setting the option during volgen. 'setkey' also supports using varstrings. This is mainly to be used for options, which use a different key for 'volume set' and in volfiles. For eg. the 'auth.*' options of protocol/server. The protocol/server xlator has been updated to make use of this for the auth.allow and auth.reject options. Updates #302 Change-Id: I1fd2fd69625c9db48595bd3f494c221625255169 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* eventsapi: glustereventsd hardcodes working-directoryVishal Pandey2017-11-151-4/+21
| | | | | | | | | | | | | | Issue: Glusterevents daemon hardcodes glusterd working directory even though it can be changed later in .vol file which causes breaks in the code. Fix: Use python subprocess module to get the working directory of gluster daemon in eventsapiconf.py.in. Change-Id: I5e92185604f8c8aeb77dabdc00f9ea0f8e92c88d BUG: 1512455 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* glusterd: checked_return coverity fixKartik_Burmee2017-11-151-1/+1
| | | | | | | | | | | | function: glusterd_store_retrieve_options issue: Calling "gf_store_iter_destroy" without checking return value fix: typecasted the return value of the function to void Change-Id: I6dc4f4308b1eca8d6ee85834a1530ff356c73898 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* geo-rep: Refactoring Config and Arguments parsingAravinda VK2017-11-1520-2310/+2607
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixed Python pep8 issues - Removed dead code - Rewritten configuration management - Rewritten Arguments/subcommands handling - Added Args upgrade to accommodate all these changes without changing glusterd code - use of md5 removed, which was used to hash the brick path for workdir Both Master and Slave nodes will have subdir for session in the format "<mastervol>_<primary_slave_host>_<slavevol> $GLUSTER_LOGDIR/geo-replication/<mastervol>_<primary_slave_host>_<slavevol> $GLUSTER_LOGDIR/geo-replication-slaves/<mastervol>_<primary_slave_host>_<slavevol> Log file paths renamed since session info is available with directory name itself. $LOG_DIR_MASTER/ - gsyncd.log - Gsyncd, Worker monitor logs - mnt-<brick-path>.log - Aux mount logs, mounted by each worker - changes-<brick-path>.log - Changelog related logs(One per brick) $LOG_DIR_SLAVE/ - gsyncd.log - Slave Gsyncd logs - mnt-<master-node>-<master-brick-path>.log - Aux mount logs, mounted for each connection from master-node:master-brick - mnt-mbr-<master-node>-<master-brick-path>.log - Same as above, but mountbroker setup Fixes: #73 Change-Id: I2ec2a21e4e2a92fd92899d026e8543725276f021 Signed-off-by: Aravinda VK <avishwan@redhat.com>
* cluster/ec: Fix op-version for disperse.other-eager-lockXavier Hernandez2017-11-142-2/+2
| | | | | | | | | The op-version used for the new option was wrong. It has been set to 3.13.0. Change-Id: I88fbd7834e4a8018c8906303e734c251e90be8cf BUG: 1502610 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* cluster: dead_code coverity fixKartik_Burmee2017-11-141-2/+0
| | | | | | | | | | | | function: stripe_entry_self_heal issue: Execution cannot reach this statement: "dict_unref(xdata);" fix: removed the 'if' condition and the corresponding actions because if the execution reaches this statement, then the value of xdata will always be NULL Change-Id: Iebc825339e2e1236b92bed39d81a1a9aba10164e BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: dead_code coverity fixKartik_Burmee2017-11-141-3/+0
| | | | | | | | | | | | issue: Execution cannot reach this statement: "rsp.op_errno = gf_errno_to_...". function:__server_event_notify fix: removed the if statement and the corresponding actions. Also, the variable was not being used anywhere else, so removed its declaration as well Change-Id: I85259e276c482cc9c98b1a829426bcec7412ce3f BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* geo-rep: Fix data sync issue during hardlink, renameKotresh HR2017-11-141-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The data is not getting synced if master witnessed IO as below. 1. echo "test_data" > f1 2. ln f1 f2 3. mv f2 f3 4. unlink f1 On master, 'f3' exists with data "test_data" but on slave, only f3 exists with zero byte file without backend gfid link. Cause: On master, since 'f2' no longer exists, the hardlink is skipped during processing. Later, on trying to sync rename, since source ('f2') doesn't exist, dst ('f3') is created with same gfid. But in this use case, it succeeds but backend gfid would not have linked as 'f1' exists with the same gfid. So, rsync would fail with ENOENT as backend gfid is not linked with 'f3' and 'f1' is unlinked. Fix: On processing rename, if src doesn't exist on slave, don't blindly create dst with same gfid. The gfid needs to be checked, if it exists, hardlink needs to be created instead of mknod. Thanks Aravinda for helping in RCA :) Change-Id: I5af4f99798ed1bcb297598a4bc796b701d1e0130 Signed-off-by: Kotresh HR <khiremat@redhat.com> BUG: 1512483 Reporter: dimitri.ars@gmail.com