From 1139d95c367f540a960622c656990cd835997acf Mon Sep 17 00:00:00 2001 From: shaver Date: Wed, 12 Nov 2003 14:10:30 +0000 Subject: [PATCH] b=2239 - rq_timeout halving for imp_server_timeout imps - set sending_error in the resent-RPC case in check_set - wake and error out if a create fails due to invalidated OSC r=phik --- lustre/osc/osc_create.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index c52ad4b..8977fe7 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -154,6 +154,7 @@ static int oscc_wait_for_objects(struct osc_creator *oscc, int count) { int have_objs; int ost_full; + int osc_invalid; have_objs = oscc_has_objects(oscc, count); @@ -161,7 +162,9 @@ static int oscc_wait_for_objects(struct osc_creator *oscc, int count) ost_full = (oscc->oscc_flags & OSCC_FLAG_NOSPC); spin_unlock(&oscc->oscc_lock); - return have_objs || ost_full; + osc_invalid = class_exp2cliimp(oscc->oscc_exp)->imp_invalid; + + return have_objs || ost_full || osc_invalid; } static int oscc_precreate(struct osc_creator *oscc, int wait) @@ -182,6 +185,9 @@ static int oscc_precreate(struct osc_creator *oscc, int wait) if (!oscc_has_objects(oscc, 1) && (oscc->oscc_flags & OSCC_FLAG_NOSPC)) rc = -ENOSPC; + if (class_exp2cliimp(oscc->oscc_exp)->imp_invalid) + rc = -EIO; + RETURN(rc); } @@ -240,6 +246,8 @@ int osc_create(struct obd_export *exp, struct obdo *oa, } spin_unlock(&oscc->oscc_lock); rc = oscc_precreate(oscc, try_again); + if (rc == -EIO) + break; } if (rc == 0) -- 1.8.3.1