tot_granted - tgd->tgd_tot_pending) ?
D_ERROR : D_CACHE;
- CDEBUG_LIMIT(mask, "%s: cli %s/%p left %llu < tot_grant "
- "%llu unstable %llu pending %llu "
- "dirty %llu\n",
+ /* the below message is checked in sanityn.sh test_15 */
+ CDEBUG_LIMIT(mask,
+ "%s: cli %s/%p left=%llu < tot_grant=%llu unstable=%llu pending=%llu dirty=%llu\n",
obd->obd_name, exp->exp_client_uuid.uuid, exp,
left, tot_granted, unstable,
tgd->tgd_tot_pending,
/* Align left on block size */
left &= ~((1ULL << tgd->tgd_blockbits) - 1);
- CDEBUG(D_CACHE, "%s: cli %s/%p avail %llu left %llu unstable "
- "%llu tot_grant %llu pending %llu\n", obd->obd_name,
- exp->exp_client_uuid.uuid, exp, avail, left, unstable,
- tot_granted, tgd->tgd_tot_pending);
+ CDEBUG(D_CACHE,
+ "%s: cli %s/%p avail=%llu left=%llu unstable=%llu tot_grant=%llu pending=%llu\n",
+ obd->obd_name, exp->exp_client_uuid.uuid, exp, avail, left,
+ unstable, tot_granted, tgd->tgd_tot_pending);
RETURN(left);
}
ENTRY;
+ if (OBD_FAIL_CHECK(OBD_FAIL_TGT_NO_GRANT))
+ RETURN(0);
+
/* When tgd_grant_compat_disable is set, we don't grant any space to
* clients not supporting OBD_CONNECT_GRANT_PARAM.
* Otherwise, space granted to such a client is inflated since it
tgd = &lut->lut_tgd;
spin_lock(&tgd->tgd_grant_lock);
- LASSERTF(tgd->tgd_tot_granted >= ted->ted_grant,
- "%s: tot_granted %llu cli %s/%p ted_grant %ld\n",
- obd->obd_name, tgd->tgd_tot_granted,
- exp->exp_client_uuid.uuid, exp, ted->ted_grant);
+ if (tgd->tgd_tot_granted < ted->ted_grant) {
+ CERROR("%s: tot_granted %llu < cli %s/%p ted_grant %ld\n",
+ obd->obd_name, tgd->tgd_tot_granted,
+ exp->exp_client_uuid.uuid, exp, ted->ted_grant);
+ }
tgd->tgd_tot_granted -= ted->ted_grant;
ted->ted_grant = 0;
- LASSERTF(tgd->tgd_tot_pending >= ted->ted_pending,
- "%s: tot_pending %llu cli %s/%p ted_pending %ld\n",
- obd->obd_name, tgd->tgd_tot_pending,
- exp->exp_client_uuid.uuid, exp, ted->ted_pending);
+ if (tgd->tgd_tot_pending < ted->ted_pending) {
+ CERROR("%s: tot_pending %llu < cli %s/%p ted_pending %ld\n",
+ obd->obd_name, tgd->tgd_tot_pending,
+ exp->exp_client_uuid.uuid, exp, ted->ted_pending);
+ }
/* tgd_tot_pending is handled in tgt_grant_commit as bulk
* commmits */
- LASSERTF(tgd->tgd_tot_dirty >= ted->ted_dirty,
- "%s: tot_dirty %llu cli %s/%p ted_dirty %ld\n",
- obd->obd_name, tgd->tgd_tot_dirty,
- exp->exp_client_uuid.uuid, exp, ted->ted_dirty);
+ if (tgd->tgd_tot_dirty < ted->ted_dirty) {
+ CERROR("%s: tot_dirty %llu < cli %s/%p ted_dirty %ld\n",
+ obd->obd_name, tgd->tgd_tot_dirty,
+ exp->exp_client_uuid.uuid, exp, ted->ted_dirty);
+ }
tgd->tgd_tot_dirty -= ted->ted_dirty;
ted->ted_dirty = 0;
spin_unlock(&tgd->tgd_grant_lock);