summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* cluster/ec: Restrict the launch of replace brick healAshish Pandey2016-06-061-1/+2
| | | | | | | | | | | | | | | | | | | | Problem: When features.cache-invalidation is ON, a lot of ec_notify function gets called which leads to launch of too many heals. This leads to no heal completion, which causes accumulation of heals. Solution: ec_launch_replace_heal should not be launch for every event. Replace brick will trigger a child up event and then only this heal function should be called. Change-Id: I57b44c6a279d57230daea1d93229be6069245b7d BUG: 1342796 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/14649 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* nfs: fix a typo in the help text for option rpc-auth.addr.rejectDustin Black2016-06-061-1/+1
| | | | | | | | | | | | | | Added space to .description Reported-by: James Shubin <purpleidea@gmail.com> Change-Id: Ie4dd8774567ac4d8e1e8ec39aa3ab595d037101a BUG: 1005257 Signed-off-by: Dustin Black <dblack@redhat.com> Reviewed-on: http://review.gluster.org/14621 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* features/shard: Don't modify readv sizePranith Kumar K2016-06-061-14/+1
| | | | | | | | | | | | | | | | For o-direct reads application sends aligned size which needs to be sent as is, otherwise o-direct writes where the file-size is not aligned fails. Change-Id: I097418ad92eda6c835d7352a3d2e53ea9d8e2424 BUG: 1342298 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14623 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* glusterd/geo-rep: upgrade path when slave vol uuid involvedSaravanakumar Arumugam2016-06-031-10/+189
| | | | | | | | | | | | | | | | | | slave volume uuid is involved in identifying a geo-replication session. This patch addresses upgrade path, where existing geo-rep session is gracefully upgraded to involve slave volume uuid. Change-Id: Ib7ff5109b161592f24fc86fc7e93a407655fab86 BUG: 1337473 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14425 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* cluster/ec: Add/Modify description for eager-lock optionAshish Pandey2016-06-032-6/+17
| | | | | | | | | | | | | | | | | | | This patch provides description for disperse.eager-lock option for disperse volume. It also modifies the description for cluster.eager-lock option to indicate that this option is only for replica volume. Change-Id: Ie73298947fcaaa6aaf825978bc2d27ceaff386d2 BUG: 1327171 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/13999 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* posix, shard: Use page-aligned buffer for o-direct readsKrutika Dhananjay2016-06-032-8/+35
| | | | | | | | | | | | | | and also make shard_readv_do() pass the correct flags when the original fd is opened with O_DIRECT. Change-Id: Ic2f8ad900743ed3f7cab56948bcf1358d247a311 BUG: 1342171 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14639 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* dht : add metalock/unlockSusant Palai2016-06-031-5/+98
| | | | | | | | | | | | Change-Id: I842a7ea1b286f1b893b200fe647597e7fd0f2105 BUG: 1331720 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14252 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* posix/lock: implement meta-lock/unlock functionalitySusant Palai2016-06-035-27/+462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem : The lock state needs to be protected when rebalance is reading the lock state on the source. Otherwise there will be locks left unmigrated. Hence, to synchronize incoming lock requests with lock-migration, meta lock is needed. Any new lock request will be queued if there is an active meta-lock and with sucessful lock migration, will be unwound with EREMOTE, so that dht module can wind the request to the correct destination. On a successful lock migration, "pl_inode->migrated" flag is enabled. Hence, any further request would be unwound with EREMOTE and will be redirected to new destination. More details can be found here: https://github.com/gluster/glusterfs-specs/blob/master/accepted/Lock-Migration.md design discussion: https://www.gluster.org/pipermail/gluster-devel/2016-January/048088.html Change-Id: Ief033d5652b5ca4ba6f499110a521cae283d6aba BUG: 1331720 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14251 Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd/snapshot: remove quota related options from snap volfileMohammed Rafi KC2016-06-021-16/+137
| | | | | | | | | | | | | | | | | | | | enabling inode-quota on a snapshot volume is unnecessary, because snapshot is a read-only volume. So we don't need to enforce quota on a snapshot volume. This patch will remove the quota related options from snapshot volfile. Change-Id: Iddabcb83820dac2384924a01d45abe1ef1e95600 BUG: 1341796 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/14608 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* glusterd: volgen and volume set changes for leasesPoornima G2016-06-023-0/+36
| | | | | | | | | | | | | Add leases xlator in volgen and also add corresponding volume set options Change-Id: Ic5de50cdb87eaf6a833e739bc7e08fecbeca3de3 BUG: 1319992 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/11722 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd/snapshot: Fix snapshot creation with geo-repKotresh HR2016-06-011-2/+4
| | | | | | | | | | | | | | | | The construction of path to geo-rep session directory is broken with the commit "http://review.gluster.org/13111" as it saves the slave volume uuid in 'gsync_slaves' dictionary. This patch fixes the same. Change-Id: Ic7fc3c37d368549feb44b3a08d60157ce61227c3 Signed-off-by: Kotresh HR <khiremat@redhat.com> BUG: 1341474 Reviewed-on: http://review.gluster.org/14595 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* libglusterfs (timer): race conditions, illegal mem access, mem leakKaleb S KEITHLEY2016-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating gfapi memory consumption with valgrind, valgrind reported several memory access issues. Also see the timer 'registry' being recreated (shortly) after being freed during teardown due to the way it's currently written. Passing ctx as data to gf_timer_proc() is prone to memory access issues if ctx is freed before gf_timer_proc() terminates. (And in fact this does happen, at least in valgrind.) gf_timer_proc() doesn't need ctx for anything, it only needs ctx->timer, so just pass that. Nothing ever calls gf_timer_registry_init(). Nothing outside of timer.c that is. Making it and gf_timer_proc() static. Change-Id: Ia28454dda0cf0de2fec94d76441d98c3927a906a BUG: 1333925 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14247 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* __inode_ctx_put: fix mem leak on failurePrasanna Kumar Kalever2016-06-014-3/+18
| | | | | | | | | | | | | | | | | | | up on failure case __inode_ctx_put need to free the allocated memory Indirect leak of 104 byte(s) in 1 object(s) allocated from: #0 0x496669 in __interceptor_calloc (/usr/local/sbin/glusterfsd+0x496669) #1 0x7f8a288522f9 in __gf_calloc libglusterfs/src/mem-pool.c:117 #2 0x7f8a17235962 in __posix_acl_ctx_get xlators/system/posix-acl/src/posix-acl.c:308 Change-Id: I0ce6da3967c55931a70f77d8551ccf52e4cdfda3 BUG: 1338733 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14505 Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/afr: Unwind with xdata in inode-write fopsPranith Kumar K2016-06-014-10/+12
| | | | | | | | | | | | | | | When there is a failure afr was not unwinding xdata to xlators above. xdata need not be NULL on failures. So it is important to send it to parent xlators. Change-Id: Ic36aac10a79fa91121961932dd1920cb1c2c3a4c BUG: 1340623 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14567 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* glusterfsd/main: Add ability to set oom_score_adjOleksandr Natalenko2016-06-011-0/+7
| | | | | | | | | | | | | | Give the administrator a possibility to set oom_score_adj for glusterfs process. Applies to Linux only. Change-Id: Iff13c2f4cb28457871c6ebeff6130bce4a8bf543 BUG: 1336818 Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/14399 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/index: Exclude gfid-type for '.', '..'Pranith Kumar K2016-06-011-1/+8
| | | | | | | | | | | | | | | | | index_get_gfid_type is assuming all names are gfids where as some of these entry->d_names can be '.' or '..' Thanks a lot to Nithya for RC BUG: 1336630 Change-Id: I06ad688a5865ab25b4f6c8a91af8c7fb2ed62186 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14589 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* leases: Fix the recall code pathPoornima G2016-06-013-28/+36
| | | | | | | | | | | | | | | | | 1. Replace frame->op usage with frame->root->op, as frame->op is not filled with appropriate value in all cases 2. Add few log messages 3. Fix boolean assignment Change-Id: I340f2200c1fcc4f4ce5a139b0fd22508cb8ac1e3 BUG: 1319992 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14434 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* protocol/client: Reflect readv/writev changes in filter-O_DIRECT descriptionPranith Kumar K2016-05-311-4/+5
| | | | | | | | | | | | | | | | Commit 74837896c38bafdd862f164d147b75fcbb619e8f introduced filtering of O_DIRECT option even for readv/writev but the option description is not updated. Change-Id: I7c2b69fdb496ca27d1b06a458f2f3eab0d16d417 BUG: 1322214 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14441 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/changelog: Change barrier notification mechanismKotresh HR2016-05-313-80/+69
| | | | | | | | | | | | | | | | | | | | The barrier notification mechanism was fd based and 'select' was being used. 'select' breaks when number of fds opened by brick process exceeds 1024. To avoid this and also the maintainance of pipe between notify and 'changelog_rollover', the pipe has been replaced with pthread condition signal and timed wait mechanism. Change-Id: I530ea90d9a06953f8b23b4e12d122872ee1925de BUG: 1334314 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14272 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* snapshot/uss: client-side log is filled with "invalid-argument" errorRajesh Joseph2016-05-311-1/+7
| | | | | | | | | | | | | xdata is used without checking if it is NULL or not. Change-Id: Ib6ddaab28ec3b430b8d646aada0456d3cc9978cb BUG: 1339149 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/14511 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* features/worm: updating function names & unwinding FOPs with op_errnokarthik-us2016-05-314-260/+251
| | | | | | | | | | | | | | | | | | - Added gf_worm prefix to some of the functions in worm-helper files so that they do not clash with other functions - Made the functions in worm.c static - Unwinding the FOPs with op_errno instead of using different unwind statements - Removed the multiple goto labels (wind & unwind) Change-Id: I3a2f114061aae4b422df54e91c4b3f702af5d0b0 BUG: 1333263 Signed-off-by: karthik-us <ksubrahm@redhat.com> Reviewed-on: http://review.gluster.org/14222 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* storage/posix: Print offset,size and gfid too when readv failsKrutika Dhananjay2016-05-311-1/+3
| | | | | | | | | | | | | | | | | | | | ... for better debuggability. Here's a sample log: [2016-05-31 05:18:34.893951] E [MSGID: 113040] [posix.c:3089:posix_readv] 0-dis-posix: read failed on gfid=3744d34b-f798-4ce2-b421-cc632a9903bd, fd=0x7f8b3c015abc, offset=131072 size=131072 [Invalid argument] Change-Id: I069c17fecbb01a4a2b5dea1eb482c7f56a191fd3 BUG: 1341009 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14271 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ashish Pandey <aspandey@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* fuse: accept the -s option to allow automountingNiels de Vos2016-05-311-1/+4
| | | | | | | | | | | | | | | | | | | autofs passes the -s option when mounting. All /sbin/mount.<fs> helpers accept this, except mount.glusterfs. Because the helper fails when -s is passed accessing the mountpoint through autofs gives the following error: $ ls /lan/storage.lan.example.net/repos ls: cannot open directory /lan/storage.lan.example.net/repos: Too many levels of symbolic links BUG: 1340936 Change-Id: I84755cdac59e630618cb745c0eb3228cc1e93a1a Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14559 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name>
* cluster/afr: Unwind xdata_rsp even in case of failuresPranith Kumar K2016-05-307-21/+120
| | | | | | | | | | | | | | | | | | | DHT expects GF_PREOP_CHECK_FAILED to be present in xdata_rsp in case of mkdir failures because of stale layout. But AFR was unwinding null xdata_rsp in case of failures. This was leading to mkdir failures just after remove-brick. Unwind the xdata_rsp in case of failures to make sure the response from brick reaches dht. BUG: 1340623 Change-Id: Idd3f7b95730e8ea987b608e892011ff190e181d1 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14553 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* cluster/afr: Fix warning about unused variablePranith Kumar K2016-05-291-1/+0
| | | | | | | | | | | BUG: 1336612 Change-Id: Ife1ce4b11776a303df04321b4a8fc5de745389d6 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14545 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
* core: assorted spelling mistakes reported by DebianKaleb S KEITHLEY2016-05-262-2/+2
| | | | | | | | | | | | | | | | | See also > Change-Id: I567a4be8f0f31f6285550f243fe802895f6bc43b Reported-by: Patrick Matthäi <pmatthaei@debian.org> BUG: 1336793 Change-Id: Icb9a6ff94d86663a5bca4ba931d810439c02556e Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14526 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* jbr/locking: Define path for lock/unlock fops in JBRAvra Sengupta2016-05-264-39/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lock/unlock fops need to be handled differently than other 'regular' fops, so as to avoid chances of deadlock in blocking calls. This patch addresses the same in the following manner, with a caveat. 1. On receiving the fop if the node is a follower, it performs the operation (irrespective of it being lock/unlock fop), and returns the result. 2. If the node is a leader it follows the following paths for lock and unlock fops: For lock fops : -> It performs the fop on itself. If it is a failure, it sends -ve ack to the client. If it is successful, it dispatches the fop to the followers. -> On receiving responses from the followers, it checks for quorum (including the leader's outcome). If quorum is met, it sends +ve ack to the client. -> If quorum is not met, then it *should* issue a rollback to the followers, followed by the rollback on the leader. It should then send -ve ack to he client. For unlock fops: -> It dispatches the fop on the followers first. -> On receiving responses from the followers, it performs the fop on itself. On completion, it checks for quorum (including the leader's outcome). If quorum is met, it sends +ve ack to the client. -> If quorum is not met, then it *should* issue a rollback on itslef, followed by the rollback on the followers. It should then send -ve ack to he client. Caveat: -> jbr-server does not have a rollback framework yet, and hence this patch does not perform the rollbacks as discussed in the failure scenarios above. The rollback framework will be a different dependent patch. Change-Id: I26961b27cb85f324c1ffeee80e82ec082ffa4465 BUG: 1333370 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14226 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/afr: Attempt name-index purge even on full-heal of directoryKrutika Dhananjay2016-05-261-58/+72
| | | | | | | | | | | Change-Id: Ief71cc68a4fbf8113e15b4254ebcabf7e30f74e2 BUG: 1339181 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14516 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* afr: Automagic unsplit-brain by [ctime|mtime|size|majority]Ravishankar N2016-05-258-22/+362
| | | | | | | | | | | | | | | | | | | | | Introduce cluster.favorite-child-policy which when enabled with [ctime|mtime|size|majority], automatically heals files that are in split-brian. The majority policy will not pick a source if there is no majority. The other three policies pick the first brick with a valid reply and non-zero ctime/mtime/size as source. Change-Id: I3c099a0404082213860f74f2c9b4d207cfaedb76 BUG: 1328224 Original-author: Richard Wareing <rwareing@fb.com> Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14026 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* jbr: Making fop functions more modular to reuse more codeAvra Sengupta2016-05-253-124/+313
| | | | | | | | | | | | | | | | | | | | | | | Putting bigger chunks of re-usable code like leader checks and init into functions thereby reducing the size of the 'fop' call. Introduced 'perform_local_op' in the 'fop' call, where regular functions as of now just call dispatch, but fops like 'lk' can do their fop specific operations. Introduced selective_generate to allow certain functions for a particular fop to be generated. The rest of the functions can be customised and added in jbr.c Change-Id: I3754ed68983e763329e14a2faef911428e36e4f0 BUG: 1336328 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14355 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* Glusterd: printing the node details on error message of rebalancehari2016-05-251-5/+7
| | | | | | | | | | | | | | | | | | Problem: on the rebalance start with one of the glusterd being down among the volume, the error message says only about the brick path. Fix: adding the node details Change-Id: I5827d3a9a15b0461c9ce3a51c0b16246ca58f335 BUG: 1337899 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/14495 Tested-by: hari gowtham <hari.gowtham005@gmail.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* snapshot/uss: client log is filled with "invalid argument: inode" errorRajesh Joseph2016-05-251-2/+6
| | | | | | | | | | | | | | svc_inode_ctx_get is called even if inode is NULL. We should not call this function if inode is NULL Change-Id: I5c3f17633ca88e5b6f40d4acf14a09e14b7ef62b BUG: 1339149 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/14525 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* snapshot/uss: log is filled with gfid is NULL errorRajesh Joseph2016-05-251-1/+3
| | | | | | | | | | | | | | | | | In snapview-server if the lookup came on missing entry then it does not have proper context to see if it is the case of "Stale file handle" or ENOENT. We should not log this error in GF_LOG_ERROR level, instead this should be a debug log. Change-Id: I8f7cc0e117e9a6dd9482da2e94a56f2ed731a442 BUG: 1339149 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/14514 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* dht: selfheal should wind mkdir call to subvols with ESTALE errorSakshi Bansal2016-05-251-1/+2
| | | | | | | | | | | | Change-Id: I7140e50263b5f28b900829592c664fa1d79f3f99 BUG: 1338634 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/14496 Reviewed-by: N Balachandran <nbalacha@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* dht/rebalance: mark hardlink failures as skipped in rebalanceSusant Palai2016-05-251-0/+8
| | | | | | | | | | | | | | | Since rebalance(not remove-brick) process does not migrate hardlinks mark them as skipped rather than failed as it creates confusion for the users. Change-Id: I5d469d10146274f00bb91482d0373c5235a9b8b2 BUG: 1339071 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14493 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com>
* cluster/ec: Use correct log levelsAshish Pandey2016-05-245-7/+7
| | | | | | | | | | | | | | | | | | | | | | Problem : Misleading messages are getting logged in mount logs and bricks log. "Mismatching xdata" and "Heal failed" are getting logged Solution : Reduce the level of logs from INFO, WARNING and NOTICE to DEBUG level wherever applicable OR use fop_log_level to get proper log level. Change-Id: Ia824c71e75ab683d3cb8949e1966ea09c9ccce72 BUG: 1231224 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/13266 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/afr: Check for required number of entrylksRavishankar N2016-05-241-5/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Parallel rmdir operations on the same directory results in ENOTCONN messages eventhough there was no network disconnect. In blocking entry lock during rmdir, AFR takes 2 set of locks on all its children-One (parentdir,name of dir to be deleted), the other (full lock on the dir being deleted). We proceed to pre-op stage even if only a single lock (but not all the needed locks) was obtained, only to fail it with ENOTCONN because afr_locked_nodes_get() returns zero nodes in afr_changelog_pre_op(). Fix: After we get replies for all blocking lock requests, if we don't have the minimum number of locks to carry out the FOP, unlock and fail the FOP. The op_errno will be that of the last failed reply we got, i.e. whatever is set in afr_lock_cbk(). Change-Id: Ibef25e65b468ebb5ea6ae1f5121a5f1201072293 BUG: 1336381 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14358 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* fuse: unref dict even if fuse_first_lookup failsKremmyda, Olia (NSN - GR/Athens)2016-05-231-2/+1
| | | | | | | | | | | | | | | | | In fuse_first_lookup function, "dict_unref (dict)" should be included in the out label, in case create_frame returns an empty pointer the dict to be unreferenced as well. Bug: 1338544 Change-Id: Ifb8a3378aec6521c1aa848f818968b6bfdb72089 Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> Reviewed-on: http://review.gluster.org/14464 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* nfs: strip trailing / when clients do subdir mountsNiels de Vos2016-05-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mounting a volume over NFS with a subdir followed by a / does not work: # mount -t nfs -o vers=3 storage.example.com:/media/installation/ /mnt mount.nfs: an incorrect mount option was specified In the nfs.log: [client-rpc-fops.c:2930:client3_3_lookup_cbk] 0-media-client-0: remote operation failed. Path: /installation/ (00000000-0000-0000-0000-000000000000) [Invalid argument] [client-rpc-fops.c:2930:client3_3_lookup_cbk] 0-media-client-1: remote operation failed. Path: /installation/ (00000000-0000-0000-0000-000000000000) [Invalid argument] [mount3.c:1134:mnt3_resolve_subdir_cbk] 0-nfs: path=/installation/ (Invalid argument) [Invalid argument] It is not possible to resolve paths with a trailing /. Stripping trailing /'s from the subdir to mount is sufficient to make it work again. Change-Id: I4075d4cd351438de58e1ff81f0fb65a1ff076da4 BUG: 1337597 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14421 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* index: improve compiler warning fixNiels de Vos2016-05-232-3/+4
| | | | | | | | | | | | | | | | Commit 137bd83029458ecd461718a891c74cd1afd8f6cb introduced some typecasting to work around a compiler warning. It is much cleaner to add a -1 value in the enumeration and use that in if-statements. BUG: 1335232 Change-Id: I830a565b8d96d7b51ff775e94aa23dd567ffe0d9 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14409 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* features/shard: Get hard-link-count in {unlink,rename}_cbk before deleting ↵Krutika Dhananjay2016-05-203-164/+299
| | | | | | | | | | | | | shards Change-Id: I0606b74f11f5412c4d9af44a6505635ed9022c15 BUG: 1335858 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14334 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* core: Honour mandatory lock flags during lock migrationAnoop C S2016-05-203-0/+12
| | | | | | | | | | | | | | | | | | | | | | lk_flags from posix_lock_t structure is the primary key used to differentiate locks as either advisory and mandatory type. During lock migration this field is not read in getactivelk() call path. So in order to copy the exact lock state from source to destination it is necessary to include lk_flags within lock_migration_info_t structure to maintain accurate state. This change also includes minor modifications to setactivelk() call to consider lk_flags during lock migration. Change-Id: I20a7b6b6a0f3bdac5734cce8a2cd2349eceff195 BUG: 1332501 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/14189 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-by: Poornima G <pgurusid@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/afr: Do not inode_link in afrPranith Kumar K2016-05-203-5/+46
| | | | | | | | | | | | | | | | | | Race is explained at https://bugzilla.redhat.com/show_bug.cgi?id=1337405#c0 This patch also handles performing of self-heal with shd-pid. Also performs the healing with this->itable's inode rather than main itable. BUG: 1337405 Change-Id: Id657a6623b71998b027b1dff6af5bbdf8cab09c9 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14422 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* cluster/afr: Refresh inode for inode-write fops in needPranith Kumar K2016-05-194-37/+98
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: If a named fresh-lookup is done on an loc and the fop fails on one of the bricks or not sent on one of the bricks, but by the time response comes to afr, if the brick is up, 'can_interpret' will be set to false in afr_lookup_done(), this will lead to inode-ctx for that inode to be not set, this can lead to EIO in case of a transaction as it depends on 'readable' array to be available by that point. Fix: Refresh inode for inode-write fops for the ctx to be set if it is not already done at the time of named fresh-lookup or if the file is in split-brain where we need to perform one more refresh before failing the fop to check if the file is still in split-brain or not. BUG: 1336612 Change-Id: I5c50b62c8de06129b8516039f7c252e5008c47a5 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14368 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cli/glusterd: add/remove brick fixes for arbiter volumesRavishankar N2016-05-197-66/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.Provide a command to convert replica 2 volumes to arbiter volumes. Existing self-heal logic will automatically heal the file hierarchy into the arbiter brick, the progress of which can be monitored using the heal info command. Syntax: gluster volume add-brick <VOLNAME> replica 3 arbiter 1 <HOST:arbiter-brick-path> 2. Add checks when removing bricks from arbiter volumes: - When converting from arbiter to replica 2 volume, allow only arbiter brick to be removed. - When converting from arbiter to plain distribute volume, allow only if arbiter is one of the bricks that is removed. 3. Some clean-up: - Use GD_MSG_DICT_GET_SUCCESS instead of GD_MSG_DICT_GET_FAILED to log messages that are not failures. - Remove unused variable `brick_list` - Move 'brickinfo->group' related functions to glusted-utils. Change-Id: Ic87b8c7e4d7d3ab03f93e7b9f372b314d80947ce BUG: 1318289 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14126 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* leases: Do not init the threads when lease is disabledPoornima G2016-05-192-13/+60
| | | | | | | | | | | Change-Id: I08c4caf94bf3dfceba6f7d3cc8945c61d9b12dbc BUG: 1319992 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14360 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* leases: Send "this" as cookie to the timer handlerPoornima G2016-05-193-6/+27
| | | | | | | | | | | | | | | | | | | | | Issue: timer-wheel implementation doesn't set the THIS to point to the xlator who registered the timer, before calling the handler. Hence referencing to THIS is any timer handler will point to the global_xlator. Fix: This is a bug from the timer wheel, but until that gets fixed passing "this" as a cookie to the timer handler. Change-Id: Ife1be56dc100372f9211e8fc7a885ac717cbcf47 BUG: 1319992 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14370 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* upcall: pass dict with xattrs on xattr invalidationPoornima G2016-05-195-80/+162
| | | | | | | | | | | | | | | | | | In case of xattr invalidation, return a dict containing the updated xattrs. [ndevos: move chunks to change 12995 and only address the xattrs-dict here] Change-Id: I8733f06a519a9a0f24be1bb4b2c38c9c9dce0ce2 BUG: 1211863 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/12996 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: soumya k <skoduri@redhat.com>
* leases: Fix failure of RD_lease request in certain scenarioPoornima G2016-05-191-1/+3
| | | | | | | | | | | | | | | | | | | Issue: When RW_lease exists for a given lease id and another request for RD_lease comes in with the same lease id, it gets rejected. Fix: Allow the RD_lease when RW_lease is present iff its from the same lease id. Change-Id: Id8ad542c649497f5e58f2acf5681c640d9202046 BUG: 1319992 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/14374 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: If possible give errno received from lower xlatorsPranith Kumar K2016-05-181-1/+3
| | | | | | | | | | | | | | | | | | In case of 3 way replication with quorum enabled with sharding, if one bricks is brought down and brought back up sometimes fops fail with EROFS because the mknod of shard file fails with two good nodes with EEXIST. So even when quorum is not met, it makes sense to unwind with the errno returned by lower xlators as much as possible. Change-Id: Iabd91cd7c270f5dfe6cbd18c50e59c299a331552 BUG: 1336612 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14369 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com>