LASSERTF(qti->qti_pools_num >= QMT_MAX_POOL_NUM,
"Forgot init? %p\n", qti);
- if (qti->qti_pools_cnt > qti->qti_pools_num) {
+ if (qti->qti_pools_cnt >= qti->qti_pools_num) {
OBD_ALLOC(pools, sizeof(qpi) * qti->qti_pools_num * 2);
if (!pools)
return -ENOMEM;
RETURN(ERR_PTR(-ENOENT));
}
- CDEBUG(D_QUOTA, "type %d name %p index %d\n",
- rtype, pool_name, idx);
+ CDEBUG(D_QUOTA, "type %d name %s index %d\n",
+ rtype, pool_name ?: "<none>", idx);
/* Now just find a pool with correct type in a list. Further we need
* to go through the list and find a pool that includes requested OST
* or MDT. Possibly this would return a list of pools that includes
switch (qpi->qpi_rtype) {
case LQUOTA_RES_DT:
- return tgt_pool_init(&qpi->qpi_sarr.osts, 0);
+ return lu_tgt_pool_init(&qpi->qpi_sarr.osts, 0);
case LQUOTA_RES_MD:
default:
return 0;
{
switch (qpi->qpi_rtype) {
case LQUOTA_RES_DT:
- return tgt_pool_add(&qpi->qpi_sarr.osts, idx, min);
+ return lu_tgt_pool_add(&qpi->qpi_sarr.osts, idx, min);
case LQUOTA_RES_MD:
default:
return 0;
{
switch (qpi->qpi_rtype) {
case LQUOTA_RES_DT:
- return tgt_pool_remove(&qpi->qpi_sarr.osts, idx);
+ return lu_tgt_pool_remove(&qpi->qpi_sarr.osts, idx);
case LQUOTA_RES_MD:
default:
return 0;
case LQUOTA_RES_DT:
if (!qpi->qpi_sarr.osts.op_array)
return 0;
- return tgt_pool_free(&qpi->qpi_sarr.osts);
+ return lu_tgt_pool_free(&qpi->qpi_sarr.osts);
case LQUOTA_RES_MD:
default:
return 0;
switch (qpi->qpi_rtype) {
case LQUOTA_RES_DT:
- return tgt_check_index(idx, &qpi->qpi_sarr.osts);
+ return lu_tgt_check_index(idx, &qpi->qpi_sarr.osts);
case LQUOTA_RES_MD:
default:
return 0;