summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-05-07 14:59:51 -0400
committerVijay Bellur <vbellur@redhat.com>2015-05-08 01:55:41 -0700
commiteee703473f17e3784e15dba291cc3df00fde9f96 (patch)
tree6be0d1730697a17ab139c6472957d84b1f30c516
parent268b7fcb307e14cce5bcd28495f24333710ba82c (diff)
guster/dht: tiered volumes may not allow access to files undergoing migration
This is a backport of fix 10324 to Gluster 3.7. If a read IO occurs against a file that has reached rebalance phase 2, we redirect the IO to the destination. For tiered volumes, when we try to reopen the file (on the destination), the lower level DHT receives the open call and fails; it does not have a "cached subvol". Fix is to "teach" the lower level DHT of the new location by sending a locate before the open. > http://review.gluster.org/#/c/10324/ > Change-Id: Ia4acb0035ff1da15f6a8f9ed54f43c76e8b98f5f > BUG: 1214048 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Signed-off-by: root <root@gprfs018.sbu.lab.eng.bos.redhat.com> > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/10324 > Tested-by: NetBSD Build System > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Tested-by: Raghavendra G <rgowdapp@redhat.com> > Signed-off-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ia4acb0035ff1da15f6a8f9ed54f43c76e8b98f5f BUG: 1219608 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/10654 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Joseph Fernandes Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-helper.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index b5114b620ce..312717198b1 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -946,6 +946,28 @@ dht_migration_complete_check_task (void *data)
local->op_errno = EIO;
goto out;
}
+ } else {
+ tmp_loc.inode = inode;
+ gf_uuid_copy (tmp_loc.gfid, inode->gfid);
+ ret = syncop_lookup (dst_node, &tmp_loc, &stbuf, 0, 0, 0);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "%s: failed to lookup the file on %s",
+ tmp_loc.path, dst_node->name);
+ local->op_errno = -ret;
+ ret = -1;
+ goto out;
+ }
+
+ if (gf_uuid_compare (stbuf.ia_gfid, tmp_loc.inode->gfid)) {
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ DHT_MSG_GFID_MISMATCH,
+ "%s: gfid different on the target file on %s",
+ tmp_loc.path, dst_node->name);
+ ret = -1;
+ local->op_errno = EIO;
+ goto out;
+ }
}
/* update inode ctx (the layout) */
8c73f2ffc60b8e5c23a33e6b996fb5053'>glusterd: run 'volume top read-perf/write-perf' in different threadKaushal M2011-09-191-1/+1 * cli : check for bad brick order while creating replicate volumeKaushal M2011-09-181-0/+14 * modify to the way we used XDR definitions files (.x files)Amar Tumballi2011-09-071-2/+1 * Change Copyright current yearPranith Kumar K2011-08-101-1/+1 * LICENSE: s/GNU Affero General Public/GNU General Public/Pranith Kumar K2011-08-061-3/+3 * Variable IOBUF: Use variable iobuf for cli/glusterd/glusterfsd(mgmt)shishir gowda2011-07-311-1/+1 * cli: changes in struct cli_cmd to disable gluster command at run-timeKaushik BV2011-04-221-3/+6 * cli: gluster profile CLIPranith K2011-03-101-0/+9 * glusterd,cli: print single error message on failurePranith K2010-12-271-0/+1 * Copyright changesVijay Bellur2010-10-111-1/+1 * Add confirmation to volume delete commandshishir gowda2010-10-111-0/+3 * cli: add system namespaceCsaba Henk2010-09-161-0/+2 * cli: add script mode for glusterPranith Kumar K2010-09-071-0/+5 * cli: Changes for GET_NEXT volume infoVijay Bellur2010-09-021-0/+7 * 'gluster volume log' feature addedAmar Tumballi2010-08-311-1/+0 * changed GNU General Public License to GNU Affero General Public LicensePranith Kumar K2010-08-171-3/+3 * cli: Implement help commandVijay Bellur2010-08-171-0/+1 * make some not implemented commands return successAmar Tumballi2010-08-031-0/+1 * DVM: Changes in CLI outputVijay Bellur2010-07-271-0/+13 * cli: Changes to provide proper exit status for gluster commandlineVijay Bellur2010-07-271-1/+1 * Changes in CLI and glusterdVijay Bellur2010-07-121-0/+2 * gluster-CLI-and-mgmt-glusterd-added-to-codebaseAmar Tumballi2010-07-081-0/+46