diff options
author | Anand Avati <avati@redhat.com> | 2013-12-12 02:04:15 -0800 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-12-24 03:32:23 -0800 |
commit | 828a6eea202e9195f323a7c4b4656c73ecb34256 (patch) | |
tree | dd68a583d3afcc60bbc8c912893fcb67f3b90f7f | |
parent | 63a3a0dd297f0615517de399f54df99041577a35 (diff) |
cluster/dht: Ignore ENOENT errors for unlink of linkfiles
Backport of http://review.gluster.org/4971
If unlink of linkfile returns ENOENT, do not fail unlink.
Proceed with unlinking of cached file.
Change-Id: If7cec92b40c39d68dd9c3606c6c2c3a6bd67d27b
BUG: 966848
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6586
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index f4a6a9136a7..02714def38f 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1620,7 +1620,9 @@ dht_unlink_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (op_ret == -1) { + if ((op_ret == -1) && (op_errno != ENOENT && + op_errno != ESTALE && + op_errno != ENOTCONN)) { local->op_errno = op_errno; gf_log (this->name, GF_LOG_DEBUG, "subvolume %s returned -1 (%s)", @@ -1633,7 +1635,7 @@ dht_unlink_linkfile_cbk (call_frame_t *frame, void *cookie, xlator_t *this, unlock: UNLOCK (&frame->lock); - if (op_ret == -1) + if (local->op_ret == -1) goto err; cached_subvol = dht_subvol_get_cached (this, local->loc.inode); |