int type;
LASSERT(pool != NULL);
+ if (unlikely(!test_bit(QPI_FLAG_STATE_INITED, &pool->qpi_flags)))
+ return -ENOENT;
seq_printf(m, "pool:\n"
" id: %u\n"
{
struct qmt_pool_info *pool = m->private;
LASSERT(pool != NULL);
+ if (unlikely(!test_bit(QPI_FLAG_STATE_INITED, &pool->qpi_flags)))
+ return -ENOENT;
seq_printf(m, "%lu\n", pool->qpi_soft_least_qunit);
return 0;
int rc;
LASSERT(pool != NULL);
+ if (unlikely(!test_bit(QPI_FLAG_STATE_INITED, &pool->qpi_flags)))
+ return -ENOENT;
/* Not tuneable for inode limit */
if (pool->qpi_rtype != LQUOTA_RES_DT)
init_rwsem(&pool->qpi_recalc_sem);
pool->qpi_rtype = pool_type;
+ pool->qpi_flags = 0;
/* initialize refcount to 1, hash table will then grab an additional
* reference */
qmt->qmt_svname, PFID(&qti->qti_fid), rc);
#endif
}
+ set_bit(QPI_FLAG_STATE_INITED, &pool->qpi_flags);
if (name)
break;
}
}
run_test 78 "Check fallocate increase quota usage"
+test_79()
+{
+ local qpool="qpool1"
+ local cmd="$LCTL get_param -n qmt.$FSNAME-QMT0000.dt-$qpool.info"
+ local stopf=$TMP/$tfile
+
+ do_facet mds1 "touch $stopf"
+ stack_trap "do_facet mds1 'rm -f $stopf'"
+ do_facet mds1 "while [ -e $stopf ]; do $cmd &>/dev/null; done"&
+ local pid=$!
+ pool_add $qpool || error "pool_add failed"
+ do_facet mds1 "rm $stopf"
+ wait $pid
+}
+run_test 79 "access to non-existed dt-pool/info doesn't cause a panic"
+
quota_fini()
{
do_nodes $(comma_list $(nodes_list)) \