summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests : workaround for the spurious failure in mount-nfs-auth.tJiffin Tony Thottan2015-09-012-3/+6
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12006/ Upstream reference : >Change-Id: I459a0c60743291a2e164a5e0a76a7e2577afdae0 >BUG: 1256352 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/12006 >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >cherry-picked as 9f52d22690b3b0aac0a736eb15fe649fde6286b5 Change-Id: I82ab11692e84e13ae94623d38610e05c21fc4dbe BUG: 1258717 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/12071 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* gluster/cli: snapshot delete all does not work with xmlRajesh Joseph2015-08-316-121/+357
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/12027/ Problem: snapshot delete all command fails with --xml option Fix: Provided xml support for delete all command Change-Id: I77cad131473a9160e188c783f442b6a38a37f758 BUG: 1258113 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/12027 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit fd47635a4ffab621a2357c99cd1edd0482940bd5) Reviewed-on: http://review.gluster.org/12042
* snapshot:cleanup snaps during unprobeMohammed Rafi KC2015-08-314-22/+104
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/9930/ When doing an unprobe, the volume that doesnot contain any brick of the particular node will be deleted. So the snaps associated with that volume should also delete Change-Id: I9f3d23bd11b254ebf7d7722cc1e12455d6b024ff BUG: 1255384 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11970 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* debug/trace: Print total write size in trace_writevKrutika Dhananjay2015-08-311-2/+7
| | | | | | | | | | | | | | | Backport of: http://review.gluster.org/12053 This is some information I find useful while debugging issues in shard translator. Change-Id: Ia33f656741750b4d5306599ea71ba1dc85bf311d BUG: 1258411 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12065 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Make [f]xattrop metadata transactionPranith Kumar K2015-08-315-183/+272
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.com/11809 Problem: When xlators above afr do [f]xattrop when one of the bricks is down, after the brick comes backup, the metadata is not healed because [f]xattrop is not considered a transaction. Fix: Treat [f]xattrop as transaction so that changes done by xlators above afr are marked for heal when some of the bricks were down at the time of [f]xattrop. BUG: 1248890 Change-Id: Ibe69aa0ca6be9b4b4134dc2879b306e2e9c4cde8 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11810 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
* libgfapi : port missing gf_log's to gf_msgManikandan Selvaganesh2015-08-313-11/+13
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11891/ Cherry-picked from commit 1e0644031c7ac0fa28f0912e951a9238f7bbe8ab > Change-Id: I0c5320c09b4a5ff1e9df61a86ac7bd47c1bb1bbb > BUG: 1252807 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11891 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra Talur <rtalur@redhat.com> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I0c5320c09b4a5ff1e9df61a86ac7bd47c1bb1bbb BUG: 1258406 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12063 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: Don't set posix acls on linkto filesNithya Balachandran2015-08-315-7/+114
| | | | | | | | | | | | | | | | | | | | | | Posix acls on a linkto file change the file's permission bits and cause DHT to treat it as a non-linkto file.This happens on the migration failure of a file on which posix acls were set. The fix prevents posix acls from being set on a linkto file and copies them across only after a file has been successfully migrated. Change-Id: Iccf7ff6fba49fe05d691d9b83bf76a240848b212 BUG: 1258377 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12025 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12062 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Add v3.7.4 release notesKaushal M2015-08-311-0/+121
| | | | | Change-Id: Ibff29b5e2bdb590dfa63a823641e840535d26d88 Signed-off-by: Kaushal M <kaushal@redhat.com>
* features/shard: Fix unlink failure due to non-existent shard(s)v3.7.4Krutika Dhananjay2015-08-312-4/+44
| | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12059/ Unlink of a sharded file with holes was leading to EINVAL errors because it was being wound on non-existent shards (those blocks that fall in the hole region). loc->inode was NULL in these cases and dht_unlink used to fail the FOP with EINVAL for failure to fetch cached subvol for the inode. The fix involves winding unlink on only those shards whose corresponding inodes exist in memory. Change-Id: I1e5d492a2e60491601da23f64a5d0089e536b305 BUG: 1258353 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12061 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli: on error invoke cli_cmd_broadcast_response function in separate threadvmallika2015-08-314-19/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11990/ There is a problem in current CLI framework CLI holds the lock when processing command. When processing quota list command, below sequence of steps executed in the same thread and causing deadlock 1) CLI holds the lock 2) Send rpc_clnt_submit request to quotad for quota usage 3) If quotad is down, rpc_clnt_submit invokes cbk function with error 4) cbk function cli_quotad_getlimit_cbk tries to hold lock to broadcast the results and hangs, because same thread has already holding the lock This patch fixes the problem by creating seperate thread for broadcasting the result > Change-Id: I53be006eadf6aaf348083d9168535530d70a8ab3 > BUG: 1242819 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ic3c651c143e4143cfb4542d99b4856e582022e36 BUG: 1257881 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12038 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* afr: modify afr_txn_nothing_failed()Ravishankar N2015-08-313-12/+94
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11827/ In an AFR transaction, we need to consider something as failed only if the failure (either in the pre-op or the FOP phase) occurs on the bricks on which a transaction lock was obtained. Without this, we would end up considering the transaction as failure even on the bricks on which the lock was not obtained, resulting in unnecessary fsyncs during the post-op phase of every write transaction for non-appending writes. Change-Id: Iee79e5d85dc7b4c41459d8bdd04a8454bdaf9a9d BUG: 1255698 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/11985 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* tests: rebasing bad tests from mainline branch to release-3.7 branchGaurav Kumar Garg2015-08-311-0/+7
| | | | | | | | | | | | | | | Currently mainline and release-3.7 branch not having same bad tests. So bad tests which are bypassing in mainline still failing in release-3.7 branch. Rebasing all bad test from mainline branch to release-3.7 branch. Change-Id: I2d4b9d1d3c1f37dcdfb092ca0d9c552bf1ddbef7 BUG: 1258344 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12056 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* marker: preserve previous dirty flag during update txnvmallika2015-08-311-15/+91
| | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/12032/ In case if dir has become dirty because of crash, this dirty flag on disk was getting reset in the next update txn. This patch now gets the dirty flag before setting in the update txn and it the value is dirty, it keeps the flag dirty, so that inspect_directory can fix the dirty dir > Change-Id: Iab2c343dbe19bd3b291adbfeebe6d9785b6bb9e3 > BUG: 1251454 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I10b81e5c0d9ffa00082171e295199d924a81ee0e BUG: 1257441 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12037 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com>
* protocol/server : porting missing gf_log's to gf_msgManikandan Selvaganesh2015-08-313-13/+69
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11895/ Cherry-picked form commit a26dbb38acdb2ec5fe16068caee189709faae76e > Change-Id: I8818931fafea3c013551a5de23a9f77c81164841 > BUG: 1252808 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11895 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I8818931fafea3c013551a5de23a9f77c81164841 BUG: 1257193 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12018 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/shard: Fix permission issuesKrutika Dhananjay2015-08-314-19/+121
| | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/11992 This patch does the following: * reverts commit b467af0e99b39ef708420d3f7f6696b0ca618512 * changes ownership on shards under /.shard to be root:root * makes readv, writev, [f]truncate, rename, and unlink fops to perform operations on files under /.shard with frame->root->{uid,gid} as 0. This would ensure that a [f]setattr on a sharded file does not need to be called on all the shards associated with it. Change-Id: I50d8533bd2b769a4dfe8cd1b49bdcfc117a7e660 BUG: 1253151 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12052 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* tests: Mark bug-1238706-daemons-stop-on-peer-cleanup.t as badRaghavendra Talur2015-08-301-1/+2
| | | | | | | | | | | | | | | | | | | backport of http://review.gluster.org/#/c/12036/ This test fails frequently. Use bug number 1257792 when you move this test out of bad_tests. Change-Id: Ib65f22096dc9af131c4d2f38b59a857c549a674a BUG: 1258306 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/12036 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12050 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/shard: Fix size update for writes at hole regionKrutika Dhananjay2015-08-293-2/+46
| | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/12020 Change-Id: I4b6e9101ccb881d3d285704902484e1e89ccaceb BUG: 1257204 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12026 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* ec : trusted.ec.version xattr of all root directories of all bricks should ↵Ashish Pandey2015-08-293-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | be same. Problem: After replacing the brick using "replace-brick" command and running "heal full", the version of the root directory of the newly added brick is not getting healed. heal starts running on the dentries of the root but does not run on root directory. Solution: Run heal on root directory. > Change-Id: Ifd42a3fb341b049c895817e892e5b484a5aa6f80 > BUG: 1243382 > Signed-off-by: Ashish Pandey <aspandey@redhat.com> > Reviewed-on: http://review.gluster.org/11676 > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Ifd42a3fb341b049c895817e892e5b484a5aa6f80 BUG: 1243384 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/11755 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* fuse: fix return value check for setuidPrasanna Kumar Kalever2015-08-291-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setuid() sets the effective user ID of the calling process. If the effective UID of the caller is root, the real UID and saved set-user-ID are also set. On success, zero is returned. On error, -1 is returned, and errno is set appropriately. there are cases where setuid() can fail even when the caller is UID 0; it is a grave security error to omit checking for a failure return from setuid(). if an environment limits the number of processes a user can have, setuid() might fail if the target uid already is at the limit. Fix is to check return value of setuid. Backport: >Change-Id: I7aa5ab5e347603c69dc93188417cc4f4c81ffc75 >BUG: 1221490 >Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> >Reviewed-on: http://review.gluster.org/10780 >Reviewed-by: Prasanna Kumar Kalever >Tested-by: Prasanna Kumar Kalever >Reviewed-by: Niels de Vos <ndevos@redhat.com> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> >(cherry picked from commit b5ceb1a9de9af563b0f91e2a3138fa5a95cad9f6) Change-Id: I5643ccecb56ea1d3c16de57bace3f5481931a539 BUG: 1254503 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/11950 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: Don't allow remove brick start/commit if glusterd is down of the ↵Atin Mukherjee2015-08-283-31/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | host of the brick Backport of http://review.gluster.org/#/c/11726/ remove brick stage blindly starts the remove brick operation even if the glusterd instance of the node hosting the brick is down. Operationally its incorrect and this could result into a inconsistent rebalance status across all the nodes as the originator of this command will always have the rebalance status to 'DEFRAG_NOT_STARTED', however when the glusterd instance on the other nodes comes up, will trigger rebalance and make the status to completed once the rebalance is finished. This patch fixes two things: 1. Add a validation in remove brick to check whether all the peers hosting the bricks to be removed are up. 2. Don't copy volinfo->rebal.dict from stale volinfo during restore as this might end up in a incosistent node_state.info file resulting into volume status command failure. Change-Id: Ia4a76865c05037d49eec5e3bbfaf68c1567f1f81 BUG: 1256265 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11726 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11996 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* cluster/afr : Examine data/metadata readable for read-subvolAnuradha Talur2015-08-283-23/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | During lookup and discover, currently read_subvol is based only on data_readable. read_subvol should be decided based on both data_readable and metadata_readable. Credits to Ravishankar N for the logic of afr_first_up_child from http://review.gluster.org/10905/ . > Change-Id: I98580b23c278172ee2902be08eeaafb6722e830c > BUG: 1240244 > Signed-off-by: Anuradha Talur <atalur@redhat.com> > Reviewed-on: http://review.gluster.org/11551 > Reviewed-by: Ravishankar N <ravishankar@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > (cherry picked from commit 36349fa250ace6109002dfa41305d9dcd54ce0a9) Change-Id: Ia068ef9deb97f7bc48ea0c56d5ab6851f8860118 BUG: 1256909 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/12011 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* marker: fix log when loc.parent and inode gfid is NULLvmallika2015-08-272-89/+168
| | | | | | | | | | | | | | | | | | | | | | | This is the backport of http://review.gluster.org/#/c/11863 This patch does the following 1) Set loc.parent if it is NULL Don't log warning in txn if parent is NULL 2) Don't initiate txn when inode gfid is NULL 3) optimize invoking dirty txn with status flag > Change-Id: I67dd9e6268014b0b257c136e951e6ded0a2e911f > BUG: 1251454 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I6134aa37fc36141767afcc00d604806f349c74d1 BUG: 1257441 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12023 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* posix: xattrop 'GF_XATTROP_GET_AND_SET' implementationvmallika2015-08-272-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11995 GF_XATTROP_GET_AND_SET stores the existing xattr value in xdata and sets the new value xattrop was reusing input xattr dict to set the results instead of creating new dict. This can be problem for server side xlators as the inout dict will have the value changed. > Change-Id: I43369082e1d0090d211381181e9f3b9075b8e771 > BUG: 1251454 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I7e0c27fd415131e9983a10d27067f63ed3a7701e BUG: 1257441 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12022 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: avoid mknod on decommissioned brickSusant Palai2015-08-272-35/+334
| | | | | | | | | | | | BUG: 1256702 Change-Id: I0795720cb77a9c77e608f34fbb69574fd2acb542 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/11998 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12024
* features/bitrot: Fix scrubber frequency setKotresh HR2015-08-272-5/+22
| | | | | | | | | | | | | | | | | | | | | | When bitrot is configured on multiple volumes in a cluster and scrubber-frequency is changed for one volume, it is resetting frequency for all other volumes w.r.t to its scrubber-frequency. This should not happen. Changing scrubber-frequency should affect only that volume on which it is set. This patch fixes the issue. Also restricted the logs to the configure volume. BUG: 1256669 Change-Id: I6eba385b50b3bdc86bc8f4ef295a004b3b87b68a Reviewed-on: http://review.gluster.org/11897 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12010
* heal: Add check for healing directories in split-brainRavishankar N2015-08-271-1/+27
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11937/ 1. Healing using `bigger-file' option does not make much sense for directories, hence disallow it and notify the user. 2. Healing using 'source-brick' option for directories performs a conservative merge. Notify the user about it. Change-Id: I0acff7b438bdb256615ed0f40d45694f37a77dd5 BUG: 1256605 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 97bae6371b5e841f03a61d6700033f40afd5cdc7) Reviewed-on: http://review.gluster.org/12007 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* dht: block/handle create op falling to decommissioned brickSusant Palai2015-08-265-56/+455
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: Post remove-brick start till commit phase, the client layout may not be in sync with disk layout because of lack of lookup. Hence,a create call may fall on the decommissioned brick. Solution: Will acquire a lock on hashed subvol. So that a fix-layout or selfheal can not step on layout while reading the layout. Even if we read a layout before remove-brick fix-layout and the file falls on the decommissioned brick, the file should be migrated to a new brick as per the fix-layout. BUG: 1256283 Change-Id: I3ef1adaf20dfb9524396a3648d1a664464eda8c1 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/11260 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12001
* libgfapi: Gracefully exit when glfd is invalidPrashanth Pai2015-08-263-5/+7
| | | | | | | | | | | | | | | | | | | | | | This is a backport of: http://review.gluster.org/10759 When glfs_* methods operating on glfd are invoked after calling glfs_close(), the program segfaults inside __GLFS_ENTRY_VALIDATE_FD trying to deference glfd->fd->inode which is invalid. Also, returning EBADF seemed more specific than EINVAL. BUG: 1240920 Change-Id: I13a92dca52da9a300252b69e026581b3a9e931fd Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on-master: http://review.gluster.org/10759 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-on: http://review.gluster.org/11571 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: bipin kunal <bkunal@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* quota :display the size of soft limit percentageManikandan Selvaganesh2015-08-262-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Display the size equivalent to the soft limit percentage in gluster v quota <volname> list <path> and gluster v quota <volname> list-objects <path> command Backport of http://review.gluster.org/#/c/11808/ Cherry picked from commit b9e87f39386fc9c591c7698357c2899afc255b95 > Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87 > BUG: 1248521 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11808 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87 BUG: 1255644 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11977 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd: stop all the daemons services on peer detachGaurav Kumar Garg2015-08-264-23/+90
| | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/11509/ Currently glusterd is not stopping all the deamon service on peer detach With this fix it will do peer detach cleanup properlly and will stop all the daemon which was running before peer detach on the node. Change-Id: Ifed403ed09187e84f2a60bf63135156ad1f15775 BUG: 1238706 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11971 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* tests: remove unwanted tests from volume-snapshot.tAtin Mukherjee2015-08-261-12/+0
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11972/ volume-snapshot.t failspuriously because of having additional test cases which restarts glusterd and they are really not needed as far as the test coverage is concerned. Currently glusterd doesn't have a mechanism to indicate that volumes handshaking has been completed or not, due to this even if the peer handshaking finishes and all the peers are back to the cluster there could be a case where any command which accesses the volume structure might end up in corruption as volume handshaking is still in progress. This is because of volume list is still not been made URCU protected. Change-Id: Id8669c22584384f988be5e0a5a0deca7708a277d BUG: 1255636 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11975 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* snapshot: Make fops static for correct resolution of symbolsSoumya Koduri2015-08-251-36/+38
| | | | | | | | | | | | | | | | | | | | Few of the snapshot fops (like 'svc_lookup') may not get resolved while using dynamic loading as there could be other libraries(like libntirpc) with same routine names. Making them static to resolve the same. This is backport of the below fix - http://review.gluster.org/#/c/11805/ Change-Id: I6577bf3705864f5583425c94427b4e1025a59bcd BUG: 1256485 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11805 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/12008 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd : Display status of Self Heal Daemon for disperse volumeAshish Pandey2015-08-251-16/+22
| | | | | | | | | | | | | | | | Problem : Status of Self Heal Daemon is not displayed in "gluster volume status" Fix : As disperse volumes are self heal compatible, show the status of self heal daemon in gluster volume status command Change-Id: I83d3e6a2fd122b171f15cfd76ce8e6b6e00f92e2 BUG: 1228216 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/10994 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* rpm: include required directory for glusterfindNiels de Vos2015-08-254-9/+16
| | | | | | | | | | | | | | | | | | | | The directory was marked as %ghost, which causes the following installation failure: Error unpacking rpm package glusterfs-server-3.8dev-0.446.git45e13fe.el7.centos.x86_64 error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py;5581f20e: cpio: open Also, *all* Python files should be part of the RPM package. This includes generated .pyc and .pyo files. BUG: 1256307 Change-Id: Iee74905b101912c4a845257742c470c3fe42ce2a Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/11298 Reviewed-on: http://review.gluster.org/12000 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libgfapi: adding 'follow' flag to glfs_h_lookupat()Jiffin Tony Thottan2015-08-258-30/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is backport of http://review.gluster.org/#/c/11883/ Previously glfs_h_lookupat won't follow the symlink, this patch introduces new flag `follow` which will resolve the same. Applications linking against the new library will need to use the new glfs_h_lookupat API call. In order to stay compatible with existing binaries that use the previous glfs_h_lookupat() function, the old symbol needs to stay available. Verification that there are two versions of glfs_h_lookupat: $ objdump -T /usr/lib64/libgfapi.so.0 | grep -w glfs_h_lookupat 0000000000015070 g DF .text 000000000000021e GFAPI_3.7.4 glfs_h_lookupat 0000000000015290 g DF .text 0000000000000008 (GFAPI_3.4.2) glfs_h_lookupat Testing with a binary (based on anonymous_fd_read_write.c from ./tests/) that was linked against the old library: $ objdump -T ./lookupat | grep -w glfs_h_lookupat 0000000000000000 DF *UND* 0000000000000000 GFAPI_3.4.2 glfs_h_lookupat Enable debugging for 'ld.so' so that we can check that the GFAPI_3.4.2 version of the symbol gets loaded: $ export LD_DEBUG_OUTPUT=lookupat.ld.log LD_DEBUG=all $ ./lookupat $ grep -w glfs_h_lookupat lookupat.ld.log.2543 2543: symbol=glfs_h_lookupat; lookup in file=./lookupat [0] 2543: symbol=glfs_h_lookupat; lookup in file=/lib64/libgfapi.so.0 [0] 2543: binding file ./lookupat [0] to /lib64/libgfapi.so.0 [0]: normal symbol `glfs_h_lookupat' [GFAPI_3.4.2] This change has been successfully cherry-picked as 1ead86a8bcbfe4045729466e4b98f765f3c13c8d in master Upstream reference >Change-Id: I8bf9b1c19a0585f681bc1a7f84aad1ccd0f75f6a >BUG: 1252410 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Signed-off-by: Niels de Vos <ndevos@redhat.com> >Reviewed-on: http://review.gluster.org/11883 >Reviewed-by: soumya k <skoduri@redhat.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: Idbbf0cd6802f86c53b16377d90d08ff6d99e7b08 BUG: 1256616 Reviewed-on: http://review.gluster.org/12009 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* libglusterfs: write error handling when filesystem have no space leftGaurav Kumar Garg2015-08-241-6/+6
| | | | | | | | | | | | | | | | | | | | | When no space left on filesystem and user want to perform any operation which result to change in /var/lib/glusterd/* files then glusterd is failing to write on temporary file. Fix is to handle error when write failed on temporary files due to no space left on file system. Change-Id: I79d595776b42580da35e1282b4a3cd7fe3d14afe BUG: 1253148 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11029 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Cedric Buissart (cherry picked from commit e7f737e62a9ea9eac730b6ba3ef8739e497e1540) Reviewed-on: http://review.gluster.org/11902 Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* common-ha : refresh-config should print sensible outputMeghana M2015-08-241-12/+40
| | | | | | | | | | | | | | | | | | | | | | ganesha-ha.sh --refresh-config printed the dbus-send output messages as is on the console. Improving the output of the operation by redirecting the messages to /var/log/messages and by checking the exit code of the command executed. The behaviour is also changed a litlle by exiting when refresh-config fails on any of the nodes. We don't want to continue changing config files on other nodes when refresh-config has already failed on one of the nodes. Change-Id: Ic2e4e26bc09b1ba23cc6b62a1590c6083a0bde80 BUG: 1254494 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11949 Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* snapshot/scheduler: Output correction of initialisationAvra Sengupta2015-08-241-2/+2
| | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11924/ Change-Id: I4a6e00805da7b254b8b08e7bb142960fb6c64923 BUG: 1245922 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11925 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* snapshot/scheduler: Check if volume exists before adding/editing schedulesAvra Sengupta2015-08-231-21/+67
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11830/ Before adding or editing a scheduler, check if the volume name provided in the schedule, exists in the cluster or not. Added return code VOLUME_DOES_NOT_EXIST(17) for the same. Change-Id: Ia3fe3cc1e1568ddd10f9193bbf40a098f0fe990a BUG: 1245923 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11917 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* afr: launch index heal on local subvols up on a child-up eventRavishankar N2015-08-231-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11912/ Problem: When a replica's child goes down and comes up, the index heal is triggered only on the child that just came up. This does not serve the intended purpose as the list of files that need to be healed to this child is actually captured on the other child of the replica. Fix: Launch index-heal on all local children of the replica xlator which just received a child up. Note that afr_selfheal_childup() eventually calls afr_shd_index_healer() which will not run the heal on non-local children. Signed-off-by: Ravishankar N <ravishankar@redhat.com> Change-Id: Ia23e47d197f983c695ec0bcd283e74931119ee55 BUG: 1255690 Reviewed-on: http://review.gluster.org/11982 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* snapshot: Log deletion of snapshot, during auto-deleteAvra Sengupta2015-08-232-2/+8
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11963/ When auto-delete is enabled, and soft-limit is reached, on creation of a snapshot, the oldest snapshot for that volume is deleted. Displaying a warning log before deleting the oldest snapshot. Change-Id: I75f0366935966a223b63a4ec5ac13f9fe36c0e82 BUG: 1255311 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11964 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* SSL improvements: do not fail if certificate purpose is setEmmanuel Dreyfus2015-08-232-0/+9
| | | | | | | | | | | | | | | | | | Since glusterfs shares the same settings for client-side and server-side of SSL, we need to ignore any certificate usage specification (SSL client vs SSL server), otherwise SSL connexions will fail with 'unsupported cerritifcate" Backport of I7ef60271718d2d894176515aa530ff106127bceb BUG: 1247153 Change-Id: I04e2f50dafd84d6eee15010f045016c91a0e1aac Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/11842 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* common-ha: concise output for HA statusKaleb S. KEITHLEY2015-08-231-1/+26
| | | | | | | | | | | | | filter out unnecessary detail from the HA status Change-Id: I407fbec1c61aa35afa7a433187a122975bf3e04d BUG: 1250628 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11942 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Meghana M <mmadhusu@redhat.com>
* features/bitrot: Fix rescheduling scrub-frequencyKotresh HR2015-08-231-20/+11
| | | | | | | | | | | | | | | | | | While rescheduling scrub frequency, boot time of the brick was considered where it is not required and also delta is calculated using unsigned int resulting in the loss of fractional part leading to wrong scrub frequency. Boot time is completely removed and delta calculation is simplified. BUG: 1253160 Change-Id: I98dd1fa99304c6d91c0a330dfca7fef57a770397 Reviewed-on: http://review.gluster.org/11853 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11904
* common-ha: delete virt-IP entry of deleted nodeKaleb S. KEITHLEY2015-08-212-5/+16
| | | | | | | | | | | | | | | | | | Avoid accumulating invalid/defunct virtual IP entries in the HA config file. use correct 'clean' name when adding a node and its virtual IP Also fix a nit in the sample HA config file Change-Id: I2b7ca279f6390ee34b4e0689039eb7d846ed7e34 BUG: 1250601 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11841 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Meghana M <mmadhusu@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com>
* protocol/server: forget the inodes which got ENOENT in lookupRaghavendra Bhat2015-08-214-22/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11489 If a looked up object is removed from the backend, then upon getting a revalidated lookup on that object ENOENT error is received. protocol/server xlator handles it by removing dentry upon which ENOENT is received. But the inode associated with it still remains in the inode table, and whoever does nameless lookup on the gfid of that object will be able to do it successfully despite the object being not present. For handling this issue, upon getting ENOENT on a looked up entry in revalidate lookups, protocol/server should forget the inode as well. Though removing files directly from the backend is not allowed, in case of objects corrupted due to bitrot and marked as bad by scrubber, objects are removed directly from the backend in case of replicate volumes, so that the object is healed from the good copy. For handling this, the inode of the bad object removed from the backend should be forgotten. Otherwise, the inode which knows the object it represents is bad, does not allow read/write operations happening as part of self-heal. Change-Id: I268eeaf37969458687425187be6622347a6cc1f1 BUG: 1255604 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/11973 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* bitrot: Scrubber log should mark bad file as a ALERT in the scrubber logGaurav Kumar Garg2015-08-211-2/+2
| | | | | | | | | | | | | | | If bad file detected by scrubber then scrubber should log that bad file as a ALERT message in scrubber log. Change-Id: I410429e78fd3768655230ac028fa66f7fc24b938 BUG: 1255605 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11965 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> (cherry picked from commit 6cb73b4fe798b7bf3aface0aac2a4e6c7c618c0e) Reviewed-on: http://review.gluster.org/11974 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/bit-rot-stub: fail the fop if inode context get failsRaghavendra Bhat2015-08-213-23/+138
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11449 In stub, for fops like readv, writev etc, if the the object is bad, then the fop is denied. But for checking if the object is bad inode context should be checked. Now, if the inode context is not there, then the fop is allowed to continue. This patch fixes it and the fop is unwound with an error, if the inode context is not found. Change-Id: I0dcbf80889427d4c0404e00bc6c773f6fe8fc8db BUG: 1255351 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/11966 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com>
* quota/marker: fix inode quota with renamevmallika2015-08-207-536/+540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/11578 There are three problems with marker-rename which is fixed in this patch Problem 1) 1) mq_reduce_parent_size is not handling inode-quota contribution 2) When dest files exists and IO is happening Now renaming will overwrite existing file mq_reduce_parent_size called on dest file with saved contribution, this can be a problem is IO is still happening contribution might have changed Problem 2) There is a small race between rename and in-progress write Consider below scenario 1) rename FOP invoked on file 'x' 2) write is still in progress for file 'x' 3) rename takes a lock on old-parent 4) write-update txn blocked on old-parent to acquire lock 5) in rename_cbk, contri xattrs are removed and contribution is deleted and lock is released 6) now write-update txn gets the lock and updates the wrong parent as it was holding lock on old parent so validate parent once the lock is acquired Problem 3) when a rename operation is performed, a lock is held on old parent. This lock is release before unwinding the rename operation. This can be a problem if there are in-progress writes happening during rename, where update txn can take a lock and update the old parent as inode table is not updated with new parent > Change-Id: Ic3316097c001c33533f98592e8fcf234b1ee2aa2 > BUG: 1240991 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/11578 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: Ie8e43c711a0e3dbe8494f0d64ab10c7b7a55e0d1 BUG: 1255244 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11961 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* dht/tiering : create new dictionary during migrationMohammed Rafi KC2015-08-191-2/+10
| | | | | | | | | | | | | | | | | | | | | | | To avoid setting wrong xattr during creating link file Back port of: >Change-Id: Iad8de3521eae17e510035ed42e3e01933d647096 >BUG: 1250828 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/11838 >Reviewed-by: N Balachandran <nbalacha@redhat.com> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit a3faffb259d5288907fac33a2822a8f61c3e86fe) Change-Id: I76ef168cd881c8fd828283a1ae70ed251fc44aaa BUG: 1254438 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11945 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>