From 4bb3128041015fe32fc5cd80f99987c07b4e663e Mon Sep 17 00:00:00 2001
From: shadow <shadow>
Date: Mon, 24 Nov 2008 12:20:11 +0000
Subject: [PATCH] Drop slow OSCs if we can, but not for requested start idx.
 This means "if OSC is slow and it is not the requested start OST, then it can
 be skipped, otherwise skip it only if it is inactive/recovering/out-of-space.

Branch b1_6
b=16081
i=shadow
i=green
---
 lustre/ChangeLog     | 9 +++++++++
 lustre/lov/lov_qos.c | 8 ++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 43f7a8ef1c..bf6cdff462 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -44,6 +44,15 @@ tbd Sun Microsystems, Inc.
 	  Lustre filesystem with 4K stack may cause a stack overflow. For more
 	  information, please refer to bugzilla 17630.
 
+Severity   : normal
+Frequency  : rare
+Bugzilla   : 16081
+Description: don't skip ost target if they assigned to file
+Details    : Drop slow OSCs if we can, but not for requested start idx.
+             This means "if OSC is slow and it is not the requested
+             start OST, then it can be skipped, otherwise skip it only
+             if it is inactive/recovering/out-of-space.
+
 Severity   : enhancement
 Bugzilla   : 17201
 Description: Update to RHEL5 kernel-2.6.18-92.1.17.el5.
diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c
index 2e807f3b79..a84137b055 100644
--- a/lustre/lov/lov_qos.c
+++ b/lustre/lov/lov_qos.c
@@ -636,9 +636,13 @@ repeat_find:
                 if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && ost_idx == 0)
                         continue;
 
-                /* Drop slow OSCs if we can, but not for requested start idx */
+                /* Drop slow OSCs if we can, but not for requested start idx.
+                 *
+                 * This means "if OSC is slow and it is not the requested
+                 * start OST, then it can be skipped, otherwise skip it only
+                 * if it is inactive/recovering/out-of-space." */
                 if ((obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed) &&
-                    (i != 0 || speed < 2))
+                    (i != 0 || speed >= 2))
                         continue;
 
                 *idx_pos = ost_idx;
-- 
GitLab