aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2011-03-06 18:07:35 -0500
committerDave Chinner <david@fromorbit.com>2011-03-06 18:07:35 -0500
commit8221112b4377a3b69f2016b5cc3c550d51dd3139 (patch)
tree4f2f29917a57338ba6069f723d0d899aca8d7f4f /fs/xfs
parent6d4a8ecb344bddbbb8c71deb4dcea0be6955cfc3 (diff)
xfs: convert the quota debug prints to new API
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index bdebc183223e..603ab867259e 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -41,12 +41,6 @@
41#include "xfs_qm.h" 41#include "xfs_qm.h"
42#include "xfs_trace.h" 42#include "xfs_trace.h"
43 43
44#ifdef DEBUG
45# define qdprintk(s, args...) cmn_err(CE_DEBUG, s, ## args)
46#else
47# define qdprintk(s, args...) do { } while (0)
48#endif
49
50STATIC int xfs_qm_log_quotaoff(xfs_mount_t *, xfs_qoff_logitem_t **, uint); 44STATIC int xfs_qm_log_quotaoff(xfs_mount_t *, xfs_qoff_logitem_t **, uint);
51STATIC int xfs_qm_log_quotaoff_end(xfs_mount_t *, xfs_qoff_logitem_t *, 45STATIC int xfs_qm_log_quotaoff_end(xfs_mount_t *, xfs_qoff_logitem_t *,
52 uint); 46 uint);
@@ -294,7 +288,8 @@ xfs_qm_scall_trunc_qfiles(
294 int error = 0, error2 = 0; 288 int error = 0, error2 = 0;
295 289
296 if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) { 290 if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) {
297 qdprintk("qtrunc flags=%x m_qflags=%x\n", flags, mp->m_qflags); 291 xfs_debug(mp, "%s: flags=%x m_qflags=%x\n",
292 __func__, flags, mp->m_qflags);
298 return XFS_ERROR(EINVAL); 293 return XFS_ERROR(EINVAL);
299 } 294 }
300 295
@@ -331,7 +326,8 @@ xfs_qm_scall_quotaon(
331 sbflags = 0; 326 sbflags = 0;
332 327
333 if (flags == 0) { 328 if (flags == 0) {
334 qdprintk("quotaon: zero flags, m_qflags=%x\n", mp->m_qflags); 329 xfs_debug(mp, "%s: zero flags, m_qflags=%x\n",
330 __func__, mp->m_qflags);
335 return XFS_ERROR(EINVAL); 331 return XFS_ERROR(EINVAL);
336 } 332 }
337 333
@@ -352,8 +348,9 @@ xfs_qm_scall_quotaon(
352 (flags & XFS_GQUOTA_ACCT) == 0 && 348 (flags & XFS_GQUOTA_ACCT) == 0 &&
353 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 && 349 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) == 0 &&
354 (flags & XFS_OQUOTA_ENFD))) { 350 (flags & XFS_OQUOTA_ENFD))) {
355 qdprintk("Can't enforce without acct, flags=%x sbflags=%x\n", 351 xfs_debug(mp,
356 flags, mp->m_sb.sb_qflags); 352 "%s: Can't enforce without acct, flags=%x sbflags=%x\n",
353 __func__, flags, mp->m_sb.sb_qflags);
357 return XFS_ERROR(EINVAL); 354 return XFS_ERROR(EINVAL);
358 } 355 }
359 /* 356 /*
@@ -541,7 +538,7 @@ xfs_qm_scall_setqlim(
541 q->qi_bsoftlimit = soft; 538 q->qi_bsoftlimit = soft;
542 } 539 }
543 } else { 540 } else {
544 qdprintk("blkhard %Ld < blksoft %Ld\n", hard, soft); 541 xfs_debug(mp, "blkhard %Ld < blksoft %Ld\n", hard, soft);
545 } 542 }
546 hard = (newlim->d_fieldmask & FS_DQ_RTBHARD) ? 543 hard = (newlim->d_fieldmask & FS_DQ_RTBHARD) ?
547 (xfs_qcnt_t) XFS_BB_TO_FSB(mp, newlim->d_rtb_hardlimit) : 544 (xfs_qcnt_t) XFS_BB_TO_FSB(mp, newlim->d_rtb_hardlimit) :
@@ -557,7 +554,7 @@ xfs_qm_scall_setqlim(
557 q->qi_rtbsoftlimit = soft; 554 q->qi_rtbsoftlimit = soft;
558 } 555 }
559 } else { 556 } else {
560 qdprintk("rtbhard %Ld < rtbsoft %Ld\n", hard, soft); 557 xfs_debug(mp, "rtbhard %Ld < rtbsoft %Ld\n", hard, soft);
561 } 558 }
562 559
563 hard = (newlim->d_fieldmask & FS_DQ_IHARD) ? 560 hard = (newlim->d_fieldmask & FS_DQ_IHARD) ?
@@ -574,7 +571,7 @@ xfs_qm_scall_setqlim(
574 q->qi_isoftlimit = soft; 571 q->qi_isoftlimit = soft;
575 } 572 }
576 } else { 573 } else {
577 qdprintk("ihard %Ld < isoft %Ld\n", hard, soft); 574 xfs_debug(mp, "ihard %Ld < isoft %Ld\n", hard, soft);
578 } 575 }
579 576
580 /* 577 /*
@@ -1137,8 +1134,8 @@ xfs_qm_internalqcheck_adjust(
1137 1134
1138 if (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino) { 1135 if (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino) {
1139 *res = BULKSTAT_RV_NOTHING; 1136 *res = BULKSTAT_RV_NOTHING;
1140 qdprintk("internalqcheck: ino=%llu, uqino=%llu, gqino=%llu\n", 1137 xfs_debug(mp, "%s: ino=%llu, uqino=%llu, gqino=%llu\n",
1141 (unsigned long long) ino, 1138 __func__, (unsigned long long) ino,
1142 (unsigned long long) mp->m_sb.sb_uquotino, 1139 (unsigned long long) mp->m_sb.sb_uquotino,
1143 (unsigned long long) mp->m_sb.sb_gquotino); 1140 (unsigned long long) mp->m_sb.sb_gquotino);
1144 return XFS_ERROR(EINVAL); 1141 return XFS_ERROR(EINVAL);