Whamcloud - gitweb
Remove the LBUG and instead, return an error if npages > OST_THREAD_POOL_SIZE
authorgirish <girish>
Thu, 30 Oct 2008 18:04:57 +0000 (18:04 +0000)
committergirish <girish>
Thu, 30 Oct 2008 18:04:57 +0000 (18:04 +0000)
i=johann
i=adilger
b=17448

lustre/ost/ost_handler.c

index fc699ef..fc40f5d 100644 (file)
@@ -759,7 +759,12 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
         if (npages < 0)
                 GOTO(out, rc = npages);
 
-        LASSERT(npages <= OST_THREAD_POOL_SIZE);
+        if (npages > OST_THREAD_POOL_SIZE) {
+                DEBUG_REQ(D_ERROR, req, "number of pages (%d) required are more"
+                          " than the thread pool size (%d)",
+                          npages, OST_THREAD_POOL_SIZE);
+                GOTO(out, rc = -EPROTO);
+        }
 
         ost_nio_pages_get(req, local_nb, npages);
 
@@ -1059,7 +1064,12 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         if (npages < 0)
                 GOTO(out, rc = npages);
 
-        LASSERT(npages <= OST_THREAD_POOL_SIZE);
+        if (npages > OST_THREAD_POOL_SIZE) {
+                DEBUG_REQ(D_ERROR, req, "number of pages (%d) required are more"
+                          " than the thread pool size (%d)",
+                          npages, OST_THREAD_POOL_SIZE);
+                GOTO(out, rc = -EPROTO);
+        }
 
         ost_nio_pages_get(req, local_nb, npages);