Whamcloud - gitweb
b=2239
authorshaver <shaver>
Wed, 12 Nov 2003 14:10:30 +0000 (14:10 +0000)
committershaver <shaver>
Wed, 12 Nov 2003 14:10:30 +0000 (14:10 +0000)
- rq_timeout halving for imp_server_timeout imps

- set sending_error in the resent-RPC case in check_set

- wake and error out if a create fails due to invalidated OSC
r=phik

lustre/osc/osc_create.c

index c52ad4b..8977fe7 100644 (file)
@@ -154,6 +154,7 @@ static int oscc_wait_for_objects(struct osc_creator *oscc, int count)
 {
         int have_objs;
         int ost_full;
+        int osc_invalid;
 
         have_objs = oscc_has_objects(oscc, count);
 
@@ -161,7 +162,9 @@ static int oscc_wait_for_objects(struct osc_creator *oscc, int count)
         ost_full = (oscc->oscc_flags & OSCC_FLAG_NOSPC);
         spin_unlock(&oscc->oscc_lock);
 
-        return have_objs || ost_full;
+        osc_invalid = class_exp2cliimp(oscc->oscc_exp)->imp_invalid;
+
+        return have_objs || ost_full || osc_invalid;
 }
 
 static int oscc_precreate(struct osc_creator *oscc, int wait)
@@ -182,6 +185,9 @@ static int oscc_precreate(struct osc_creator *oscc, int wait)
         if (!oscc_has_objects(oscc, 1) && (oscc->oscc_flags & OSCC_FLAG_NOSPC))
                 rc = -ENOSPC;
 
+        if (class_exp2cliimp(oscc->oscc_exp)->imp_invalid)
+                rc = -EIO;
+
         RETURN(rc);
 }
 
@@ -240,6 +246,8 @@ int osc_create(struct obd_export *exp, struct obdo *oa,
                 }
                 spin_unlock(&oscc->oscc_lock);
                 rc = oscc_precreate(oscc, try_again);
+                if (rc == -EIO)
+                        break;
         }
 
         if (rc == 0)