From 6e1303d7f876cd8e3f9ba2061b51e30bb2c0357b Mon Sep 17 00:00:00 2001 From: braam Date: Tue, 26 Aug 2003 13:17:56 +0000 Subject: [PATCH] - basic replay code for open; passes sanity as well as without it I think --- lustre/osc/osc_create.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index 80bc9dc..71f415e 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -161,6 +161,17 @@ int osc_create(struct lustre_handle *exph, struct obdo *oa, RETURN(rc); } + /* this is the special case where we recover and only increase the next_id */ + if (oa->o_valid == (OBD_MD_FLID | OBD_MD_FLFLAGS) && + oa->o_flags == OBD_FL_IDONLY) { + spin_lock(&oscc->oscc_lock); + /* this is the recovery case: be firm for now */ + LASSERT(lsm->lsm_object_id == oscc->oscc_next_id); + oscc->oscc_next_id++; + spin_unlock(&oscc->oscc_lock); + RETURN(0); + } + while (try_again) { spin_lock(&oscc->oscc_lock); if (oscc->oscc_last_id >= oscc->oscc_next_id) { -- 1.8.3.1