From 705c7c9bacafc22b714ac15e3925cb5eaeb45b0a Mon Sep 17 00:00:00 2001 From: Basavanagowda Kanur Date: Thu, 2 Apr 2009 06:07:25 +0530 Subject: cluster/{dht,nufa} propogate ESTALE (when at least one subvolume returns ESTALE for revalidate) to parent translator. Signed-off-by: Anand V. Avati --- xlators/cluster/dht/src/dht-common.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index b96db22cb..41daac677 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -207,11 +207,20 @@ dht_revalidate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret == -1) { local->op_errno = op_errno; - if (op_errno != ENOTCONN && op_errno != ENOENT) { + if ((op_errno != ENOTCONN) + && (op_errno != ENOENT) + && (op_errno != ESTALE)) { gf_log (this->name, GF_LOG_WARNING, "subvolume %s returned -1 (%s)", prev->this->name, strerror (op_errno)); } + + if (op_errno == ESTALE) { + /* propogate the ESTALE to parent. + * setting local->layout_mismatch would send + * ESTALE to parent. */ + local->layout_mismatch = 1; + } goto unlock; } -- cgit