aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-09 01:29:40 -0400
committerNathan Scott <nathans@sgi.com>2006-06-09 01:29:40 -0400
commitb65745205fc00d8c7722ec74e9bd955f3861c7e2 (patch)
tree524f5bacfcdf54828e97b5368eb35de938651ada /fs/xfs
parent9c48876a05b6fbe41f1933fae3529c268d78cad0 (diff)
[XFS] Portability changes: remove prdev, stick to one diagnostic
interface. SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26103a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/support/debug.c4
-rw-r--r--fs/xfs/support/debug.h3
-rw-r--r--fs/xfs/xfs_buf_item.c6
-rw-r--r--fs/xfs/xfs_inode.c5
-rw-r--r--fs/xfs/xfs_log_recover.c18
-rw-r--r--fs/xfs/xfs_mount.c5
-rw-r--r--fs/xfs/xfs_rtalloc.c12
-rw-r--r--fs/xfs/xfs_trans_buf.c4
-rw-r--r--fs/xfs/xfs_trans_item.c2
-rw-r--r--fs/xfs/xfs_vfsops.c59
10 files changed, 67 insertions, 51 deletions
diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c
index b08b3d9345b7..36fbeccdc722 100644
--- a/fs/xfs/support/debug.c
+++ b/fs/xfs/support/debug.c
@@ -47,7 +47,7 @@ cmn_err(register int level, char *fmt, ...)
47 va_start(ap, fmt); 47 va_start(ap, fmt);
48 if (*fmt == '!') fp++; 48 if (*fmt == '!') fp++;
49 len = vsprintf(message, fp, ap); 49 len = vsprintf(message, fp, ap);
50 if (message[len-1] != '\n') 50 if (level != CE_DEBUG && message[len-1] != '\n')
51 strcat(message, "\n"); 51 strcat(message, "\n");
52 printk("%s%s", err_level[level], message); 52 printk("%s%s", err_level[level], message);
53 va_end(ap); 53 va_end(ap);
@@ -68,7 +68,7 @@ icmn_err(register int level, char *fmt, va_list ap)
68 level = XFS_MAX_ERR_LEVEL; 68 level = XFS_MAX_ERR_LEVEL;
69 spin_lock_irqsave(&xfs_err_lock,flags); 69 spin_lock_irqsave(&xfs_err_lock,flags);
70 len = vsprintf(message, fmt, ap); 70 len = vsprintf(message, fmt, ap);
71 if (message[len-1] != '\n') 71 if (level != CE_DEBUG && message[len-1] != '\n')
72 strcat(message, "\n"); 72 strcat(message, "\n");
73 spin_unlock_irqrestore(&xfs_err_lock,flags); 73 spin_unlock_irqrestore(&xfs_err_lock,flags);
74 printk("%s%s", err_level[level], message); 74 printk("%s%s", err_level[level], message);
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h
index e3bf58112e7e..4f54dca662a8 100644
--- a/fs/xfs/support/debug.h
+++ b/fs/xfs/support/debug.h
@@ -33,9 +33,6 @@ extern void cmn_err(int, char *, ...)
33 __attribute__ ((format (printf, 2, 3))); 33 __attribute__ ((format (printf, 2, 3)));
34extern void assfail(char *expr, char *f, int l); 34extern void assfail(char *expr, char *f, int l);
35 35
36#define prdev(fmt,targ,args...) \
37 printk("Device %s - " fmt "\n", XFS_BUFTARG_NAME(targ), ## args)
38
39#define ASSERT_ALWAYS(expr) \ 36#define ASSERT_ALWAYS(expr) \
40 (unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) 37 (unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
41 38
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 59013e1f16e5..290912cbff63 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -1030,9 +1030,9 @@ xfs_buf_iodone_callbacks(
1030 if ((XFS_BUF_TARGET(bp) != lasttarg) || 1030 if ((XFS_BUF_TARGET(bp) != lasttarg) ||
1031 (time_after(jiffies, (lasttime + 5*HZ)))) { 1031 (time_after(jiffies, (lasttime + 5*HZ)))) {
1032 lasttime = jiffies; 1032 lasttime = jiffies;
1033 prdev("XFS write error in file system meta-data " 1033 cmn_err(CE_ALERT, "Device %s, XFS metadata write error"
1034 "block 0x%llx in %s", 1034 " block 0x%llx in %s",
1035 XFS_BUF_TARGET(bp), 1035 XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)),
1036 (__uint64_t)XFS_BUF_ADDR(bp), mp->m_fsname); 1036 (__uint64_t)XFS_BUF_ADDR(bp), mp->m_fsname);
1037 } 1037 }
1038 lasttarg = XFS_BUF_TARGET(bp); 1038 lasttarg = XFS_BUF_TARGET(bp);
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index b30bffa99edc..50119a00885b 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -352,8 +352,9 @@ xfs_itobp(
352 if (unlikely(XFS_TEST_ERROR(!di_ok, mp, XFS_ERRTAG_ITOBP_INOTOBP, 352 if (unlikely(XFS_TEST_ERROR(!di_ok, mp, XFS_ERRTAG_ITOBP_INOTOBP,
353 XFS_RANDOM_ITOBP_INOTOBP))) { 353 XFS_RANDOM_ITOBP_INOTOBP))) {
354#ifdef DEBUG 354#ifdef DEBUG
355 prdev("bad inode magic/vsn daddr %lld #%d (magic=%x)", 355 cmn_err(CE_ALERT, "Device %s - bad inode magic/vsn "
356 mp->m_ddev_targp, 356 "daddr %lld #%d (magic=%x)",
357 XFS_BUFTARG_NAME(mp->m_ddev_targp),
357 (unsigned long long)imap.im_blkno, i, 358 (unsigned long long)imap.im_blkno, i,
358 INT_GET(dip->di_core.di_magic, ARCH_CONVERT)); 359 INT_GET(dip->di_core.di_magic, ARCH_CONVERT));
359#endif 360#endif
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index a17218e81536..f952f9dbf74a 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -193,14 +193,14 @@ xlog_header_check_dump(
193{ 193{
194 int b; 194 int b;
195 195
196 printk("%s: SB : uuid = ", __FUNCTION__); 196 cmn_err(CE_DEBUG, "%s: SB : uuid = ", __FUNCTION__);
197 for (b = 0; b < 16; b++) 197 for (b = 0; b < 16; b++)
198 printk("%02x",((unsigned char *)&mp->m_sb.sb_uuid)[b]); 198 cmn_err(CE_DEBUG, "%02x", ((uchar_t *)&mp->m_sb.sb_uuid)[b]);
199 printk(", fmt = %d\n", XLOG_FMT); 199 cmn_err(CE_DEBUG, ", fmt = %d\n", XLOG_FMT);
200 printk(" log : uuid = "); 200 cmn_err(CE_DEBUG, " log : uuid = ");
201 for (b = 0; b < 16; b++) 201 for (b = 0; b < 16; b++)
202 printk("%02x",((unsigned char *)&head->h_fs_uuid)[b]); 202 cmn_err(CE_DEBUG, "%02x",((uchar_t *)&head->h_fs_uuid)[b]);
203 printk(", fmt = %d\n", INT_GET(head->h_fmt, ARCH_CONVERT)); 203 cmn_err(CE_DEBUG, ", fmt = %d\n", INT_GET(head->h_fmt, ARCH_CONVERT));
204} 204}
205#else 205#else
206#define xlog_header_check_dump(mp, head) 206#define xlog_header_check_dump(mp, head)
@@ -3444,13 +3444,13 @@ xlog_unpack_data_checksum(
3444 if (rhead->h_chksum || 3444 if (rhead->h_chksum ||
3445 ((log->l_flags & XLOG_CHKSUM_MISMATCH) == 0)) { 3445 ((log->l_flags & XLOG_CHKSUM_MISMATCH) == 0)) {
3446 cmn_err(CE_DEBUG, 3446 cmn_err(CE_DEBUG,
3447 "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)", 3447 "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)\n",
3448 INT_GET(rhead->h_chksum, ARCH_CONVERT), chksum); 3448 INT_GET(rhead->h_chksum, ARCH_CONVERT), chksum);
3449 cmn_err(CE_DEBUG, 3449 cmn_err(CE_DEBUG,
3450"XFS: Disregard message if filesystem was created with non-DEBUG kernel"); 3450"XFS: Disregard message if filesystem was created with non-DEBUG kernel");
3451 if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb)) { 3451 if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb)) {
3452 cmn_err(CE_DEBUG, 3452 cmn_err(CE_DEBUG,
3453 "XFS: LogR this is a LogV2 filesystem"); 3453 "XFS: LogR this is a LogV2 filesystem\n");
3454 } 3454 }
3455 log->l_flags |= XLOG_CHKSUM_MISMATCH; 3455 log->l_flags |= XLOG_CHKSUM_MISMATCH;
3456 } 3456 }
@@ -3999,7 +3999,7 @@ xlog_recover_finish(
3999 log->l_flags &= ~XLOG_RECOVERY_NEEDED; 3999 log->l_flags &= ~XLOG_RECOVERY_NEEDED;
4000 } else { 4000 } else {
4001 cmn_err(CE_DEBUG, 4001 cmn_err(CE_DEBUG,
4002 "!Ending clean XFS mount for filesystem: %s", 4002 "!Ending clean XFS mount for filesystem: %s\n",
4003 log->l_mp->m_fsname); 4003 log->l_mp->m_fsname);
4004 } 4004 }
4005 return 0; 4005 return 0;
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 4b7be49cc4de..9378408a69d5 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1006,8 +1006,9 @@ xfs_mountfs(
1006 1006
1007 if (unlikely((rip->i_d.di_mode & S_IFMT) != S_IFDIR)) { 1007 if (unlikely((rip->i_d.di_mode & S_IFMT) != S_IFDIR)) {
1008 cmn_err(CE_WARN, "XFS: corrupted root inode"); 1008 cmn_err(CE_WARN, "XFS: corrupted root inode");
1009 prdev("Root inode %llu is not a directory", 1009 cmn_err(CE_WARN, "Device %s - root %llu is not a directory",
1010 mp->m_ddev_targp, (unsigned long long)rip->i_ino); 1010 XFS_BUFTARG_NAME(mp->m_ddev_targp),
1011 (unsigned long long)rip->i_ino);
1011 xfs_iunlock(rip, XFS_ILOCK_EXCL); 1012 xfs_iunlock(rip, XFS_ILOCK_EXCL);
1012 XFS_ERROR_REPORT("xfs_mountfs_int(2)", XFS_ERRLEVEL_LOW, 1013 XFS_ERROR_REPORT("xfs_mountfs_int(2)", XFS_ERRLEVEL_LOW,
1013 mp); 1014 mp);
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index f5944c8b3788..af290cf37ac1 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -2404,10 +2404,10 @@ xfs_rtprint_range(
2404{ 2404{
2405 xfs_extlen_t i; /* block number in the extent */ 2405 xfs_extlen_t i; /* block number in the extent */
2406 2406
2407 printk("%Ld: ", (long long)start); 2407 cmn_err(CE_DEBUG, "%Ld: ", (long long)start);
2408 for (i = 0; i < len; i++) 2408 for (i = 0; i < len; i++)
2409 printk("%d", xfs_rtcheck_bit(mp, tp, start + i, 1)); 2409 cmn_err(CE_DEBUG, "%d", xfs_rtcheck_bit(mp, tp, start + i, 1));
2410 printk("\n"); 2410 cmn_err(CE_DEBUG, "\n");
2411} 2411}
2412 2412
2413/* 2413/*
@@ -2431,17 +2431,17 @@ xfs_rtprint_summary(
2431 (void)xfs_rtget_summary(mp, tp, l, i, &sumbp, &sb, &c); 2431 (void)xfs_rtget_summary(mp, tp, l, i, &sumbp, &sb, &c);
2432 if (c) { 2432 if (c) {
2433 if (!p) { 2433 if (!p) {
2434 printk("%Ld-%Ld:", 1LL << l, 2434 cmn_err(CE_DEBUG, "%Ld-%Ld:", 1LL << l,
2435 XFS_RTMIN((1LL << l) + 2435 XFS_RTMIN((1LL << l) +
2436 ((1LL << l) - 1LL), 2436 ((1LL << l) - 1LL),
2437 mp->m_sb.sb_rextents)); 2437 mp->m_sb.sb_rextents));
2438 p = 1; 2438 p = 1;
2439 } 2439 }
2440 printk(" %Ld:%d", (long long)i, c); 2440 cmn_err(CE_DEBUG, " %Ld:%d", (long long)i, c);
2441 } 2441 }
2442 } 2442 }
2443 if (p) 2443 if (p)
2444 printk("\n"); 2444 cmn_err(CE_DEBUG, "\n");
2445 } 2445 }
2446 if (sumbp) 2446 if (sumbp)
2447 xfs_trans_brelse(tp, sumbp); 2447 xfs_trans_brelse(tp, sumbp);
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 422913645709..8cedd1583bc8 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -320,7 +320,7 @@ xfs_trans_read_buf(
320 if (xfs_error_target == target) { 320 if (xfs_error_target == target) {
321 if (((xfs_req_num++) % xfs_error_mod) == 0) { 321 if (((xfs_req_num++) % xfs_error_mod) == 0) {
322 xfs_buf_relse(bp); 322 xfs_buf_relse(bp);
323 printk("Returning error!\n"); 323 cmn_err(CE_DEBUG, "Returning error!\n");
324 return XFS_ERROR(EIO); 324 return XFS_ERROR(EIO);
325 } 325 }
326 } 326 }
@@ -425,7 +425,7 @@ xfs_trans_read_buf(
425 xfs_force_shutdown(tp->t_mountp, 425 xfs_force_shutdown(tp->t_mountp,
426 SHUTDOWN_META_IO_ERROR); 426 SHUTDOWN_META_IO_ERROR);
427 xfs_buf_relse(bp); 427 xfs_buf_relse(bp);
428 printk("Returning error in trans!\n"); 428 cmn_err(CE_DEBUG, "Returning trans error!\n");
429 return XFS_ERROR(EIO); 429 return XFS_ERROR(EIO);
430 } 430 }
431 } 431 }
diff --git a/fs/xfs/xfs_trans_item.c b/fs/xfs/xfs_trans_item.c
index 1117d600d741..2912aac07c7b 100644
--- a/fs/xfs/xfs_trans_item.c
+++ b/fs/xfs/xfs_trans_item.c
@@ -493,7 +493,7 @@ xfs_trans_add_busy(xfs_trans_t *tp, xfs_agnumber_t ag, xfs_extlen_t idx)
493 break; 493 break;
494 } else { 494 } else {
495 /* out-of-order vacancy */ 495 /* out-of-order vacancy */
496 printk("OOO vacancy lbcp 0x%p\n", lbcp); 496 cmn_err(CE_DEBUG, "OOO vacancy lbcp 0x%p\n", lbcp);
497 ASSERT(0); 497 ASSERT(0);
498 } 498 }
499 } 499 }
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 36ea1b2094f2..ec85a2e24b52 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -1708,42 +1708,48 @@ xfs_parseargs(
1708 1708
1709 if (!strcmp(this_char, MNTOPT_LOGBUFS)) { 1709 if (!strcmp(this_char, MNTOPT_LOGBUFS)) {
1710 if (!value || !*value) { 1710 if (!value || !*value) {
1711 printk("XFS: %s option requires an argument\n", 1711 cmn_err(CE_WARN,
1712 "XFS: %s option requires an argument",
1712 this_char); 1713 this_char);
1713 return EINVAL; 1714 return EINVAL;
1714 } 1715 }
1715 args->logbufs = simple_strtoul(value, &eov, 10); 1716 args->logbufs = simple_strtoul(value, &eov, 10);
1716 } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) { 1717 } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) {
1717 if (!value || !*value) { 1718 if (!value || !*value) {
1718 printk("XFS: %s option requires an argument\n", 1719 cmn_err(CE_WARN,
1720 "XFS: %s option requires an argument",
1719 this_char); 1721 this_char);
1720 return EINVAL; 1722 return EINVAL;
1721 } 1723 }
1722 args->logbufsize = suffix_strtoul(value, &eov, 10); 1724 args->logbufsize = suffix_strtoul(value, &eov, 10);
1723 } else if (!strcmp(this_char, MNTOPT_LOGDEV)) { 1725 } else if (!strcmp(this_char, MNTOPT_LOGDEV)) {
1724 if (!value || !*value) { 1726 if (!value || !*value) {
1725 printk("XFS: %s option requires an argument\n", 1727 cmn_err(CE_WARN,
1728 "XFS: %s option requires an argument",
1726 this_char); 1729 this_char);
1727 return EINVAL; 1730 return EINVAL;
1728 } 1731 }
1729 strncpy(args->logname, value, MAXNAMELEN); 1732 strncpy(args->logname, value, MAXNAMELEN);
1730 } else if (!strcmp(this_char, MNTOPT_MTPT)) { 1733 } else if (!strcmp(this_char, MNTOPT_MTPT)) {
1731 if (!value || !*value) { 1734 if (!value || !*value) {
1732 printk("XFS: %s option requires an argument\n", 1735 cmn_err(CE_WARN,
1736 "XFS: %s option requires an argument",
1733 this_char); 1737 this_char);
1734 return EINVAL; 1738 return EINVAL;
1735 } 1739 }
1736 strncpy(args->mtpt, value, MAXNAMELEN); 1740 strncpy(args->mtpt, value, MAXNAMELEN);
1737 } else if (!strcmp(this_char, MNTOPT_RTDEV)) { 1741 } else if (!strcmp(this_char, MNTOPT_RTDEV)) {
1738 if (!value || !*value) { 1742 if (!value || !*value) {
1739 printk("XFS: %s option requires an argument\n", 1743 cmn_err(CE_WARN,
1744 "XFS: %s option requires an argument",
1740 this_char); 1745 this_char);
1741 return EINVAL; 1746 return EINVAL;
1742 } 1747 }
1743 strncpy(args->rtname, value, MAXNAMELEN); 1748 strncpy(args->rtname, value, MAXNAMELEN);
1744 } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) { 1749 } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) {
1745 if (!value || !*value) { 1750 if (!value || !*value) {
1746 printk("XFS: %s option requires an argument\n", 1751 cmn_err(CE_WARN,
1752 "XFS: %s option requires an argument",
1747 this_char); 1753 this_char);
1748 return EINVAL; 1754 return EINVAL;
1749 } 1755 }
@@ -1752,7 +1758,8 @@ xfs_parseargs(
1752 args->iosizelog = (uint8_t) iosize; 1758 args->iosizelog = (uint8_t) iosize;
1753 } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) { 1759 } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) {
1754 if (!value || !*value) { 1760 if (!value || !*value) {
1755 printk("XFS: %s option requires an argument\n", 1761 cmn_err(CE_WARN,
1762 "XFS: %s option requires an argument",
1756 this_char); 1763 this_char);
1757 return EINVAL; 1764 return EINVAL;
1758 } 1765 }
@@ -1761,7 +1768,8 @@ xfs_parseargs(
1761 args->iosizelog = ffs(iosize) - 1; 1768 args->iosizelog = ffs(iosize) - 1;
1762 } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) { 1769 } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) {
1763 if (!value || !*value) { 1770 if (!value || !*value) {
1764 printk("XFS: %s option requires an argument\n", 1771 cmn_err(CE_WARN,
1772 "XFS: %s option requires an argument",
1765 this_char); 1773 this_char);
1766 return EINVAL; 1774 return EINVAL;
1767 } 1775 }
@@ -1782,7 +1790,8 @@ xfs_parseargs(
1782 } else if (!strcmp(this_char, MNTOPT_INO64)) { 1790 } else if (!strcmp(this_char, MNTOPT_INO64)) {
1783 args->flags |= XFSMNT_INO64; 1791 args->flags |= XFSMNT_INO64;
1784#if !XFS_BIG_INUMS 1792#if !XFS_BIG_INUMS
1785 printk("XFS: %s option not allowed on this system\n", 1793 cmn_err(CE_WARN,
1794 "XFS: %s option not allowed on this system",
1786 this_char); 1795 this_char);
1787 return EINVAL; 1796 return EINVAL;
1788#endif 1797#endif
@@ -1792,14 +1801,16 @@ xfs_parseargs(
1792 args->flags |= XFSMNT_SWALLOC; 1801 args->flags |= XFSMNT_SWALLOC;
1793 } else if (!strcmp(this_char, MNTOPT_SUNIT)) { 1802 } else if (!strcmp(this_char, MNTOPT_SUNIT)) {
1794 if (!value || !*value) { 1803 if (!value || !*value) {
1795 printk("XFS: %s option requires an argument\n", 1804 cmn_err(CE_WARN,
1805 "XFS: %s option requires an argument",
1796 this_char); 1806 this_char);
1797 return EINVAL; 1807 return EINVAL;
1798 } 1808 }
1799 dsunit = simple_strtoul(value, &eov, 10); 1809 dsunit = simple_strtoul(value, &eov, 10);
1800 } else if (!strcmp(this_char, MNTOPT_SWIDTH)) { 1810 } else if (!strcmp(this_char, MNTOPT_SWIDTH)) {
1801 if (!value || !*value) { 1811 if (!value || !*value) {
1802 printk("XFS: %s option requires an argument\n", 1812 cmn_err(CE_WARN,
1813 "XFS: %s option requires an argument",
1803 this_char); 1814 this_char);
1804 return EINVAL; 1815 return EINVAL;
1805 } 1816 }
@@ -1807,7 +1818,8 @@ xfs_parseargs(
1807 } else if (!strcmp(this_char, MNTOPT_64BITINODE)) { 1818 } else if (!strcmp(this_char, MNTOPT_64BITINODE)) {
1808 args->flags &= ~XFSMNT_32BITINODES; 1819 args->flags &= ~XFSMNT_32BITINODES;
1809#if !XFS_BIG_INUMS 1820#if !XFS_BIG_INUMS
1810 printk("XFS: %s option not allowed on this system\n", 1821 cmn_err(CE_WARN,
1822 "XFS: %s option not allowed on this system",
1811 this_char); 1823 this_char);
1812 return EINVAL; 1824 return EINVAL;
1813#endif 1825#endif
@@ -1831,36 +1843,41 @@ xfs_parseargs(
1831 args->flags &= ~XFSMNT_ATTR2; 1843 args->flags &= ~XFSMNT_ATTR2;
1832 } else if (!strcmp(this_char, "osyncisdsync")) { 1844 } else if (!strcmp(this_char, "osyncisdsync")) {
1833 /* no-op, this is now the default */ 1845 /* no-op, this is now the default */
1834printk("XFS: osyncisdsync is now the default, option is deprecated.\n"); 1846 cmn_err(CE_WARN,
1847 "XFS: osyncisdsync is now the default, option is deprecated.");
1835 } else if (!strcmp(this_char, "irixsgid")) { 1848 } else if (!strcmp(this_char, "irixsgid")) {
1836printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n"); 1849 cmn_err(CE_WARN,
1850 "XFS: irixsgid is now a sysctl(2) variable, option is deprecated.");
1837 } else { 1851 } else {
1838 printk("XFS: unknown mount option [%s].\n", this_char); 1852 cmn_err(CE_WARN,
1853 "XFS: unknown mount option [%s].", this_char);
1839 return EINVAL; 1854 return EINVAL;
1840 } 1855 }
1841 } 1856 }
1842 1857
1843 if (args->flags & XFSMNT_NORECOVERY) { 1858 if (args->flags & XFSMNT_NORECOVERY) {
1844 if ((vfsp->vfs_flag & VFS_RDONLY) == 0) { 1859 if ((vfsp->vfs_flag & VFS_RDONLY) == 0) {
1845 printk("XFS: no-recovery mounts must be read-only.\n"); 1860 cmn_err(CE_WARN,
1861 "XFS: no-recovery mounts must be read-only.");
1846 return EINVAL; 1862 return EINVAL;
1847 } 1863 }
1848 } 1864 }
1849 1865
1850 if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) { 1866 if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) {
1851 printk( 1867 cmn_err(CE_WARN,
1852 "XFS: sunit and swidth options incompatible with the noalign option\n"); 1868 "XFS: sunit and swidth options incompatible with the noalign option");
1853 return EINVAL; 1869 return EINVAL;
1854 } 1870 }
1855 1871
1856 if ((dsunit && !dswidth) || (!dsunit && dswidth)) { 1872 if ((dsunit && !dswidth) || (!dsunit && dswidth)) {
1857 printk("XFS: sunit and swidth must be specified together\n"); 1873 cmn_err(CE_WARN,
1874 "XFS: sunit and swidth must be specified together");
1858 return EINVAL; 1875 return EINVAL;
1859 } 1876 }
1860 1877
1861 if (dsunit && (dswidth % dsunit != 0)) { 1878 if (dsunit && (dswidth % dsunit != 0)) {
1862 printk( 1879 cmn_err(CE_WARN,
1863 "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)\n", 1880 "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)",
1864 dswidth, dsunit); 1881 dswidth, dsunit);
1865 return EINVAL; 1882 return EINVAL;
1866 } 1883 }