From f48750a9e7050bafe32e1e4f6a0b284016ab4190 Mon Sep 17 00:00:00 2001 From: girish <girish> Date: Thu, 30 Oct 2008 18:04:57 +0000 Subject: [PATCH] Remove the LBUG and instead, return an error if npages > OST_THREAD_POOL_SIZE i=johann i=adilger b=17448 --- lustre/ost/ost_handler.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index fc699efa35..fc40f5d473 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -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); -- GitLab