STATIC int xfs_dqtest_cmp2( xfs_dqtest_t *d, xfs_dquot_t *dqp) { int err = 0; if (INT_GET(dqp->q_core.d_icount, ARCH_CONVERT) != d->d_icount) { xfs_qm_dqtest_failed(d, dqp, "icount mismatch", INT_GET(dqp->q_core.d_icount, ARCH_CONVERT), d->d_icount, 0); err++; } if (INT_GET(dqp->q_core.d_bcount, ARCH_CONVERT) != d->d_bcount) { xfs_qm_dqtest_failed(d, dqp, "bcount mismatch", INT_GET(dqp->q_core.d_bcount, ARCH_CONVERT), d->d_bcount, 0); err++; } if (INT_GET(dqp->q_core.d_blk_softlimit, ARCH_CONVERT) && INT_GET(dqp->q_core.d_bcount, ARCH_CONVERT) >= INT_GET(dqp->q_core.d_blk_softlimit, ARCH_CONVERT)) { if (INT_ISZERO(dqp->q_core.d_btimer, ARCH_CONVERT) && !INT_ISZERO(dqp->q_core.d_id, ARCH_CONVERT)) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] BLK TIMER NOT STARTED", d->d_id, DQFLAGTO_TYPESTR(d), d->q_mount); err++; } } if (INT_GET(dqp->q_core.d_ino_softlimit, ARCH_CONVERT) && INT_GET(dqp->q_core.d_icount, ARCH_CONVERT) >= INT_GET(dqp->q_core.d_ino_softlimit, ARCH_CONVERT)) { if (INT_ISZERO(dqp->q_core.d_itimer, ARCH_CONVERT) && !INT_ISZERO(dqp->q_core.d_id, ARCH_CONVERT)) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] INO TIMER NOT STARTED", d->d_id, DQFLAGTO_TYPESTR(d), d->q_mount); err++; } } #ifdef QUOTADEBUG if (!err) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] qchecked", d->d_id, XFS_QM_ISUDQ(d) ? "USR" : "GRP", d->q_mount); } #endif return (err); }
void xfs_qm_dqprint(xfs_dquot_t *dqp) { cmn_err(CE_DEBUG, "-----------KERNEL DQUOT----------------"); cmn_err(CE_DEBUG, "---- dquotID = %d", (int)be32_to_cpu(dqp->q_core.d_id)); cmn_err(CE_DEBUG, "---- type = %s", DQFLAGTO_TYPESTR(dqp)); cmn_err(CE_DEBUG, "---- fs = 0x%p", dqp->q_mount); cmn_err(CE_DEBUG, "---- blkno = 0x%x", (int) dqp->q_blkno); cmn_err(CE_DEBUG, "---- boffset = 0x%x", (int) dqp->q_bufoffset); cmn_err(CE_DEBUG, "---- blkhlimit = %Lu (0x%x)", be64_to_cpu(dqp->q_core.d_blk_hardlimit), (int)be64_to_cpu(dqp->q_core.d_blk_hardlimit)); cmn_err(CE_DEBUG, "---- blkslimit = %Lu (0x%x)", be64_to_cpu(dqp->q_core.d_blk_softlimit), (int)be64_to_cpu(dqp->q_core.d_blk_softlimit)); cmn_err(CE_DEBUG, "---- inohlimit = %Lu (0x%x)", be64_to_cpu(dqp->q_core.d_ino_hardlimit), (int)be64_to_cpu(dqp->q_core.d_ino_hardlimit)); cmn_err(CE_DEBUG, "---- inoslimit = %Lu (0x%x)", be64_to_cpu(dqp->q_core.d_ino_softlimit), (int)be64_to_cpu(dqp->q_core.d_ino_softlimit)); cmn_err(CE_DEBUG, "---- bcount = %Lu (0x%x)", be64_to_cpu(dqp->q_core.d_bcount), (int)be64_to_cpu(dqp->q_core.d_bcount)); cmn_err(CE_DEBUG, "---- icount = %Lu (0x%x)", be64_to_cpu(dqp->q_core.d_icount), (int)be64_to_cpu(dqp->q_core.d_icount)); cmn_err(CE_DEBUG, "---- btimer = %d", (int)be32_to_cpu(dqp->q_core.d_btimer)); cmn_err(CE_DEBUG, "---- itimer = %d", (int)be32_to_cpu(dqp->q_core.d_itimer)); cmn_err(CE_DEBUG, "---------------------------"); }
STATIC int xfs_dqtest_cmp2( xfs_dqtest_t *d, xfs_dquot_t *dqp) { int err = 0; if (be64_to_cpu(dqp->q_core.d_icount) != d->d_icount) { xfs_qm_dqtest_failed(d, dqp, "icount mismatch", be64_to_cpu(dqp->q_core.d_icount), d->d_icount, 0); err++; } if (be64_to_cpu(dqp->q_core.d_bcount) != d->d_bcount) { xfs_qm_dqtest_failed(d, dqp, "bcount mismatch", be64_to_cpu(dqp->q_core.d_bcount), d->d_bcount, 0); err++; } if (dqp->q_core.d_blk_softlimit && be64_to_cpu(dqp->q_core.d_bcount) >= be64_to_cpu(dqp->q_core.d_blk_softlimit)) { if (!dqp->q_core.d_btimer && dqp->q_core.d_id) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] BLK TIMER NOT STARTED", d->d_id, DQFLAGTO_TYPESTR(d), d->q_mount); err++; } } if (dqp->q_core.d_ino_softlimit && be64_to_cpu(dqp->q_core.d_icount) >= be64_to_cpu(dqp->q_core.d_ino_softlimit)) { if (!dqp->q_core.d_itimer && dqp->q_core.d_id) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] INO TIMER NOT STARTED", d->d_id, DQFLAGTO_TYPESTR(d), d->q_mount); err++; } } #ifdef QUOTADEBUG if (!err) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] qchecked", d->d_id, DQFLAGTO_TYPESTR(d), d->q_mount); } #endif return (err); }