Commit 8221112b authored by Dave Chinner's avatar Dave Chinner Committed by Dave Chinner

xfs: convert the quota debug prints to new API

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarAlex Elder <aelder@sgi.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 6d4a8ecb
...@@ -41,12 +41,6 @@ ...@@ -41,12 +41,6 @@
#include "xfs_qm.h" #include "xfs_qm.h"
#include "xfs_trace.h" #include "xfs_trace.h"
#ifdef DEBUG
# define qdprintk(s, args...) cmn_err(CE_DEBUG, s, ## args)
#else
# define qdprintk(s, args...) do { } while (0)
#endif
STATIC int xfs_qm_log_quotaoff(xfs_mount_t *, xfs_qoff_logitem_t **, uint); STATIC int xfs_qm_log_quotaoff(xfs_mount_t *, xfs_qoff_logitem_t **, uint);
STATIC int xfs_qm_log_quotaoff_end(xfs_mount_t *, xfs_qoff_logitem_t *, STATIC int xfs_qm_log_quotaoff_end(xfs_mount_t *, xfs_qoff_logitem_t *,
uint); uint);
...@@ -294,7 +288,8 @@ xfs_qm_scall_trunc_qfiles( ...@@ -294,7 +288,8 @@ xfs_qm_scall_trunc_qfiles(
int error = 0, error2 = 0; int error = 0, error2 = 0;
if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) { if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) {
qdprintk("qtrunc flags=%x m_qflags=%x\n", flags, mp->m_qflags); xfs_debug(mp, "%s: flags=%x m_qflags=%x\n",
__func__, flags, mp->m_qflags);
return XFS_ERROR(EINVAL); return XFS_ERROR(EINVAL);
} }
...@@ -331,7 +326,8 @@ xfs_qm_scall_quotaon( ...@@ -331,7 +326,8 @@ xfs_qm_scall_quotaon(
sbflags = 0; sbflags = 0;
if (flags == 0) { if (flags == 0) {
qdprintk("quotaon: zero flags, m_qflags=%x\n", mp->m_qflags); xfs_debug(mp, "%s: zero flags, m_qflags=%x\n",
__func__, mp->m_qflags);
return XFS_ERROR(EINVAL); return XFS_ERROR(EINVAL);
} }
...@@ -352,8 +348,9 @@ xfs_qm_scall_quotaon( ...@@ -352,8 +348,9 @@ xfs_qm_scall_quotaon(
(flags & XFS_GQUOTA_ACCT) == 0 && (flags & XFS_GQUOTA_ACCT) == 0 &&
(mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 && (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 &&
(flags & XFS_OQUOTA_ENFD))) { (flags & XFS_OQUOTA_ENFD))) {
qdprintk("Can't enforce without acct, flags=%x sbflags=%x\n", xfs_debug(mp,
flags, mp->m_sb.sb_qflags); "%s: Can't enforce without acct, flags=%x sbflags=%x\n",
__func__, flags, mp->m_sb.sb_qflags);
return XFS_ERROR(EINVAL); return XFS_ERROR(EINVAL);
} }
/* /*
...@@ -541,7 +538,7 @@ xfs_qm_scall_setqlim( ...@@ -541,7 +538,7 @@ xfs_qm_scall_setqlim(
q->qi_bsoftlimit = soft; q->qi_bsoftlimit = soft;
} }
} else { } else {
qdprintk("blkhard %Ld < blksoft %Ld\n", hard, soft); xfs_debug(mp, "blkhard %Ld < blksoft %Ld\n", hard, soft);
} }
hard = (newlim->d_fieldmask & FS_DQ_RTBHARD) ? hard = (newlim->d_fieldmask & FS_DQ_RTBHARD) ?
(xfs_qcnt_t) XFS_BB_TO_FSB(mp, newlim->d_rtb_hardlimit) : (xfs_qcnt_t) XFS_BB_TO_FSB(mp, newlim->d_rtb_hardlimit) :
...@@ -557,7 +554,7 @@ xfs_qm_scall_setqlim( ...@@ -557,7 +554,7 @@ xfs_qm_scall_setqlim(
q->qi_rtbsoftlimit = soft; q->qi_rtbsoftlimit = soft;
} }
} else { } else {
qdprintk("rtbhard %Ld < rtbsoft %Ld\n", hard, soft); xfs_debug(mp, "rtbhard %Ld < rtbsoft %Ld\n", hard, soft);
} }
hard = (newlim->d_fieldmask & FS_DQ_IHARD) ? hard = (newlim->d_fieldmask & FS_DQ_IHARD) ?
...@@ -574,7 +571,7 @@ xfs_qm_scall_setqlim( ...@@ -574,7 +571,7 @@ xfs_qm_scall_setqlim(
q->qi_isoftlimit = soft; q->qi_isoftlimit = soft;
} }
} else { } else {
qdprintk("ihard %Ld < isoft %Ld\n", hard, soft); xfs_debug(mp, "ihard %Ld < isoft %Ld\n", hard, soft);
} }
/* /*
...@@ -1137,8 +1134,8 @@ xfs_qm_internalqcheck_adjust( ...@@ -1137,8 +1134,8 @@ xfs_qm_internalqcheck_adjust(
if (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino) { if (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino) {
*res = BULKSTAT_RV_NOTHING; *res = BULKSTAT_RV_NOTHING;
qdprintk("internalqcheck: ino=%llu, uqino=%llu, gqino=%llu\n", xfs_debug(mp, "%s: ino=%llu, uqino=%llu, gqino=%llu\n",
(unsigned long long) ino, __func__, (unsigned long long) ino,
(unsigned long long) mp->m_sb.sb_uquotino, (unsigned long long) mp->m_sb.sb_uquotino,
(unsigned long long) mp->m_sb.sb_gquotino); (unsigned long long) mp->m_sb.sb_gquotino);
return XFS_ERROR(EINVAL); return XFS_ERROR(EINVAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment