diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 1dd0526606100204a48788046cbdc3fae18e083b..09397fe8a23043fcee54b0f989cfe036c19db167 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -654,6 +654,13 @@ Details : If a OST has no remain object, system will block on the creating pre-created objects when available, instead of blocking on an empty osc while others are not empty. If we must block, we block for the shortest possible period of time. + +Severity : normal +Bugzilla : 13148 +Frequency : only in recovery +Description: Mark OST as as early accessible if his start SYNC. +Details : osc_precreate return flag early accessible if oscc marked as + OSCC_FLAG_SYNC_IN_PROGRESS. -------------------------------------------------------------------------------- diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index e8fc4a9349d1f9f8421bc97e86d33c17c3b383a6..f2c842d2ce30977cfaa2eaf63b022b790b23bb94 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -256,9 +256,17 @@ int osc_precreate(struct obd_export *exp, int need_create) RETURN(2); if (oscc->oscc_last_id < oscc->oscc_next_id) { + spin_lock(&oscc->oscc_lock); + if (oscc->oscc_flags & OSCC_FLAG_SYNC_IN_PROGRESS) { + spin_unlock(&oscc->oscc_lock); + RETURN(1); + } if (oscc->oscc_flags & OSCC_FLAG_NOSPC || - oscc_recovering(oscc)) + oscc->oscc_flags & OSCC_FLAG_RECOVERING) { + spin_unlock(&oscc->oscc_lock); RETURN(2); + } + spin_unlock(&oscc->oscc_lock); if (oscc->oscc_flags & OSCC_FLAG_CREATING) RETURN(1);