From a688bd37911e400e80f1eed3e42407efc6c1ad9e Mon Sep 17 00:00:00 2001 From: zhanghc Date: Tue, 11 Nov 2008 03:47:05 +0000 Subject: [PATCH] branch HEAD b=17495 move the check of recovering state of the OST in osc_precreate out of "if (oscc->oscc_last_id < oscc->oscc_next_id)" condition so create operation don't use recovering OST i=adilger i=nathan.rutman --- lustre/osc/osc_create.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index b022304..b34341b 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -283,6 +283,9 @@ int osc_precreate(struct obd_export *exp) if (imp != NULL && imp->imp_deactive) RETURN(1000); + if (oscc_recovering(oscc)) + RETURN(2); + if (oscc->oscc_last_id < oscc->oscc_next_id) { spin_lock(&oscc->oscc_lock); if (oscc->oscc_flags & OSCC_FLAG_NOSPC) { @@ -293,11 +296,6 @@ int osc_precreate(struct obd_export *exp) spin_unlock(&oscc->oscc_lock); RETURN(1); } - if (oscc->oscc_flags & OSCC_FLAG_RECOVERING) { - spin_unlock(&oscc->oscc_lock); - RETURN(2); - } - if (oscc->oscc_flags & OSCC_FLAG_CREATING) { spin_unlock(&oscc->oscc_lock); RETURN(1); -- 1.8.3.1