diff options
author | Dave Chinner <dchinner@redhat.com> | 2011-03-06 18:05:35 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2011-03-06 18:05:35 -0500 |
commit | 5348778699bba92bf28b79863e09e7181d8cf95c (patch) | |
tree | 77f5349bc85bf4d35b73a9a66de304535e507bf4 /fs/xfs/xfs_ialloc.c | |
parent | af34e09da42801c97f39f768c715f5511d914b52 (diff) |
xfs: convert xfs_fs_cmn_err to new error logging API
Continue to clean up the error logging code by converting all the
callers of xfs_fs_cmn_err() to the new API. Once done, remove the
unused old API function.
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/xfs_ialloc.c')
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 0626a32c3447..fc3a2cb2c075 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -1218,10 +1218,9 @@ xfs_imap_lookup( | |||
1218 | 1218 | ||
1219 | error = xfs_ialloc_read_agi(mp, tp, agno, &agbp); | 1219 | error = xfs_ialloc_read_agi(mp, tp, agno, &agbp); |
1220 | if (error) { | 1220 | if (error) { |
1221 | xfs_fs_cmn_err(CE_ALERT, mp, "xfs_imap: " | 1221 | xfs_alert(mp, |
1222 | "xfs_ialloc_read_agi() returned " | 1222 | "%s: xfs_ialloc_read_agi() returned error %d, agno %d", |
1223 | "error %d, agno %d", | 1223 | __func__, error, agno); |
1224 | error, agno); | ||
1225 | return error; | 1224 | return error; |
1226 | } | 1225 | } |
1227 | 1226 | ||
@@ -1299,24 +1298,21 @@ xfs_imap( | |||
1299 | if (flags & XFS_IGET_UNTRUSTED) | 1298 | if (flags & XFS_IGET_UNTRUSTED) |
1300 | return XFS_ERROR(EINVAL); | 1299 | return XFS_ERROR(EINVAL); |
1301 | if (agno >= mp->m_sb.sb_agcount) { | 1300 | if (agno >= mp->m_sb.sb_agcount) { |
1302 | xfs_fs_cmn_err(CE_ALERT, mp, | 1301 | xfs_alert(mp, |
1303 | "xfs_imap: agno (%d) >= " | 1302 | "%s: agno (%d) >= mp->m_sb.sb_agcount (%d)", |
1304 | "mp->m_sb.sb_agcount (%d)", | 1303 | __func__, agno, mp->m_sb.sb_agcount); |
1305 | agno, mp->m_sb.sb_agcount); | ||
1306 | } | 1304 | } |
1307 | if (agbno >= mp->m_sb.sb_agblocks) { | 1305 | if (agbno >= mp->m_sb.sb_agblocks) { |
1308 | xfs_fs_cmn_err(CE_ALERT, mp, | 1306 | xfs_alert(mp, |
1309 | "xfs_imap: agbno (0x%llx) >= " | 1307 | "%s: agbno (0x%llx) >= mp->m_sb.sb_agblocks (0x%lx)", |
1310 | "mp->m_sb.sb_agblocks (0x%lx)", | 1308 | __func__, (unsigned long long)agbno, |
1311 | (unsigned long long) agbno, | 1309 | (unsigned long)mp->m_sb.sb_agblocks); |
1312 | (unsigned long) mp->m_sb.sb_agblocks); | ||
1313 | } | 1310 | } |
1314 | if (ino != XFS_AGINO_TO_INO(mp, agno, agino)) { | 1311 | if (ino != XFS_AGINO_TO_INO(mp, agno, agino)) { |
1315 | xfs_fs_cmn_err(CE_ALERT, mp, | 1312 | xfs_alert(mp, |
1316 | "xfs_imap: ino (0x%llx) != " | 1313 | "%s: ino (0x%llx) != XFS_AGINO_TO_INO() (0x%llx)", |
1317 | "XFS_AGINO_TO_INO(mp, agno, agino) " | 1314 | __func__, ino, |
1318 | "(0x%llx)", | 1315 | XFS_AGINO_TO_INO(mp, agno, agino)); |
1319 | ino, XFS_AGINO_TO_INO(mp, agno, agino)); | ||
1320 | } | 1316 | } |
1321 | xfs_stack_trace(); | 1317 | xfs_stack_trace(); |
1322 | #endif /* DEBUG */ | 1318 | #endif /* DEBUG */ |
@@ -1388,10 +1384,9 @@ out_map: | |||
1388 | */ | 1384 | */ |
1389 | if ((imap->im_blkno + imap->im_len) > | 1385 | if ((imap->im_blkno + imap->im_len) > |
1390 | XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)) { | 1386 | XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)) { |
1391 | xfs_fs_cmn_err(CE_ALERT, mp, "xfs_imap: " | 1387 | xfs_alert(mp, |
1392 | "(imap->im_blkno (0x%llx) + imap->im_len (0x%llx)) > " | 1388 | "%s: (im_blkno (0x%llx) + im_len (0x%llx)) > sb_dblocks (0x%llx)", |
1393 | " XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks) (0x%llx)", | 1389 | __func__, (unsigned long long) imap->im_blkno, |
1394 | (unsigned long long) imap->im_blkno, | ||
1395 | (unsigned long long) imap->im_len, | 1390 | (unsigned long long) imap->im_len, |
1396 | XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)); | 1391 | XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)); |
1397 | return XFS_ERROR(EINVAL); | 1392 | return XFS_ERROR(EINVAL); |