Whamcloud - gitweb
Mark OST as as early accessible if his start SYNC.
authorshadow <shadow>
Tue, 31 Jul 2007 13:05:25 +0000 (13:05 +0000)
committershadow <shadow>
Tue, 31 Jul 2007 13:05:25 +0000 (13:05 +0000)
b=13148
i=green
i=adilger

lustre/ChangeLog
lustre/osc/osc_create.c

index 1dd0526..09397fe 100644 (file)
@@ -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.
             
 --------------------------------------------------------------------------------
 
index e8fc4a9..f2c842d 100644 (file)
@@ -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);