diff options
author | shishir gowda <sgowda@redhat.com> | 2013-01-15 00:35:21 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-01-21 12:03:03 -0800 |
commit | 9f7ff7df94067e8e7e571354835406ba5574a53a (patch) | |
tree | 4c42e8c38a3e75f1115968bebd96bb2d323019c1 /xlators/cluster | |
parent | e95e8f87152dc2895b7e2dcd0c43ed939e2f4058 (diff) | |
download | glusterfs-9f7ff7df94067e8e7e571354835406ba5574a53a.tar.gz glusterfs-9f7ff7df94067e8e7e571354835406ba5574a53a.tar.xz glusterfs-9f7ff7df94067e8e7e571354835406ba5574a53a.zip |
cluster/distribute: If cached_subvol is down, return ENOTCONN in lookup
When we follow a linkfile, and the lookup returns a ENOTCONN error, return
the error, as the cached subvol is down, and lookup_everywhere wont succeed,
but actually ends up clearing the linkfile, and clearing the namespace.
Change-Id: I772bf71531bc646e8fb62d3e8549a5fe0f3896da
BUG: 893378
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/4383
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index ded86bcc37..540c2ed87a 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1095,7 +1095,16 @@ dht_lookup_linkfile_cbk (call_frame_t *frame, void *cookie, gf_log (this->name, GF_LOG_INFO, "lookup of %s on %s (following linkfile) failed (%s)", local->loc.path, subvol->name, strerror (op_errno)); - goto err; + + /* If cached subvol returned ENOTCONN, do not do + lookup_everywhere. We need to make sure linkfile does not get + removed, which can take away the namespace, and subvol is + anyways down. */ + + if (op_errno != ENOTCONN) + goto err; + else + goto unwind; } if (check_is_dir (inode, stbuf, xattr)) { |