From: shadow Date: Tue, 31 Jul 2007 13:05:25 +0000 (+0000) Subject: Mark OST as as early accessible if his start SYNC. X-Git-Tag: v1_8_0_110~1402 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=4533e339c1a329be3d4a4c375dbebb63e302c825;p=fs%2Flustre-release.git Mark OST as as early accessible if his start SYNC. b=13148 i=green i=adilger --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 1dd0526..09397fe 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 e8fc4a9..f2c842d 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);