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);
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);