diff options
author | Dan Lambright <dlambrig@redhat.com> | 2015-05-07 12:27:49 -0400 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-08 05:17:00 -0700 |
commit | d4e9c501a2b949909c4eb0be4cdedb30648cc895 (patch) | |
tree | 725f3b4f63f4082c55394dcc5aefa0a6de89bafd /xlators/cluster/dht/src/tier.c | |
parent | f4507c2bb4a862f6ea10f7e683b5a63218103dda (diff) |
cluster/tier: don't use hot tier until subvolumes ready
This is a backport of fix 10435 to Gluster 3.7.
When we attach a tier, the hot tier becomes the hashed
subvolume. But directories may not yet have been replicated by
the fix layout process. Hence lookups to those directories
will fail on the hot subvolume. We should only go to the hashed
subvolume once the layout has been fixed. This is known if the
layout for the parent directory does not have an error. If
there is an error, the cold tier is considered the hashed
subvolume. The exception to this rules is ENOCON, in which
case we do not know where the file is and must abort.
Note we may revalidate a lookup for a directory even if the
inode has not yet been populated by FUSE. This case can
happen in tiering (where one tier has completed a lookup
but the other has not, in which case we revalidate one tier
when we call lookup the second time). Such inodes are
still invalid and should not be consulted for validation.
> http://review.gluster.org/#/c/10435/
> Change-Id: Ia2bc62e1d807bd70590bd2a8300496264d73c523
> BUG: 1214289
> Signed-off-by: Dan Lambright <dlambrig@redhat.com>
> Reviewed-on: http://review.gluster.org/10435
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
> Reviewed-by: N Balachandran <nbalacha@redhat.com>
> Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Change-Id: Ia2bc62e1d807bd70590bd2a8300496264d73c523
BUG: 1219547
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/10649
Tested-by: NetBSD Build System
Reviewed-by: Joseph Fernandes
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/tier.c')
-rw-r--r-- | xlators/cluster/dht/src/tier.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index 5be919800c2..48604374aa7 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -949,6 +949,9 @@ tier_search (xlator_t *this, dht_layout_t *layout, const char *name) search_first_subvol = 1; } + if ((layout->list[0].err > 0) && (layout->list[0].err != ENOTCONN)) + search_first_subvol = 0; + if (search_first_subvol) subvol = layout->list[0].xlator; else |