Whamcloud - gitweb
b=21563 Metadata performance has degraded for some operations between 1.6.5 and 1.8.1
authorDmitry Zogin <dmitry.zoguine@oracle.com>
Wed, 9 Jun 2010 20:04:10 +0000 (16:04 -0400)
committerRobert Read <robert.read@oracle.com>
Thu, 10 Jun 2010 04:29:29 +0000 (21:29 -0700)
 Remove the check for OSCC_FLAG_CREATING flag in osc_precreate(), so that
 it enters oscc_internal_create(). Also remove the check for in
 oscc_internal_create() for OSCC_FLAG_DEGRADED - let the chance to create
 objects in case all OSTs are degraded.

 i=andreas.dilger
 i=johann

lustre/osc/osc_create.c

index 6c555d5..5fd149b 100644 (file)
@@ -361,8 +361,8 @@ int osc_precreate(struct obd_export *exp)
                 RETURN(1000);
         }
 
-        if (oscc->oscc_flags & OSCC_FLAG_RECOVERING ||
-            oscc->oscc_flags & OSCC_FLAG_DEGRADED) {
+        /* Do not check for a degraded OST here - bug21563/bug18539 */
+        if (oscc->oscc_flags & OSCC_FLAG_RECOVERING) {
                 cfs_spin_unlock(&oscc->oscc_lock);
                 RETURN(2);
         }
@@ -372,8 +372,10 @@ int osc_precreate(struct obd_export *exp)
                 RETURN(0);
         }
 
-        if ((oscc->oscc_flags & OSCC_FLAG_SYNC_IN_PROGRESS) ||
-            (oscc->oscc_flags & OSCC_FLAG_CREATING)) {
+        /* Do not check for OSCC_FLAG_CREATING flag here, let
+         * osc_precreate() call oscc_internal_create() and
+         * adjust oscc_grow_count bug21563 */
+        if (oscc->oscc_flags & OSCC_FLAG_SYNC_IN_PROGRESS) {
                 cfs_spin_unlock(&oscc->oscc_lock);
                 RETURN(1);
         }