[XFS] When issuing metadata readahead, submit bio with READA not READ.
[safe/jmp/linux-2.6] / fs / xfs / xfs_log_recover.c
index a17218e..3cb678e 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dir.h"
 #include "xfs_dir2.h"
 #include "xfs_dmapi.h"
 #include "xfs_mount.h"
@@ -32,7 +31,6 @@
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
 #include "xfs_ialloc_btree.h"
-#include "xfs_dir_sf.h"
 #include "xfs_dir2_sf.h"
 #include "xfs_attr_sf.h"
 #include "xfs_dinode.h"
@@ -193,14 +191,14 @@ xlog_header_check_dump(
 {
        int                     b;
 
-       printk("%s:  SB : uuid = ", __FUNCTION__);
+       cmn_err(CE_DEBUG, "%s:  SB : uuid = ", __FUNCTION__);
        for (b = 0; b < 16; b++)
-               printk("%02x",((unsigned char *)&mp->m_sb.sb_uuid)[b]);
-       printk(", fmt = %d\n", XLOG_FMT);
-       printk("    log : uuid = ");
+               cmn_err(CE_DEBUG, "%02x", ((uchar_t *)&mp->m_sb.sb_uuid)[b]);
+       cmn_err(CE_DEBUG, ", fmt = %d\n", XLOG_FMT);
+       cmn_err(CE_DEBUG, "    log : uuid = ");
        for (b = 0; b < 16; b++)
-               printk("%02x",((unsigned char *)&head->h_fs_uuid)[b]);
-       printk(", fmt = %d\n", INT_GET(head->h_fmt, ARCH_CONVERT));
+               cmn_err(CE_DEBUG, "%02x",((uchar_t *)&head->h_fs_uuid)[b]);
+       cmn_err(CE_DEBUG, ", fmt = %d\n", INT_GET(head->h_fmt, ARCH_CONVERT));
 }
 #else
 #define xlog_header_check_dump(mp, head)
@@ -992,6 +990,8 @@ xlog_find_zeroed(
        xfs_daddr_t     num_scan_bblks;
        int             error, log_bbnum = log->l_logBBsize;
 
+       *blk_no = 0;
+
        /* check totally zeroed log */
        bp = xlog_get_bp(log, 1);
        if (!bp)
@@ -3444,13 +3444,13 @@ xlog_unpack_data_checksum(
            if (rhead->h_chksum ||
                ((log->l_flags & XLOG_CHKSUM_MISMATCH) == 0)) {
                    cmn_err(CE_DEBUG,
-                       "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)",
+                       "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)\n",
                            INT_GET(rhead->h_chksum, ARCH_CONVERT), chksum);
                    cmn_err(CE_DEBUG,
 "XFS: Disregard message if filesystem was created with non-DEBUG kernel");
                    if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb)) {
                            cmn_err(CE_DEBUG,
-                               "XFS: LogR this is a LogV2 filesystem");
+                               "XFS: LogR this is a LogV2 filesystem\n");
                    }
                    log->l_flags |= XLOG_CHKSUM_MISMATCH;
            }
@@ -3999,7 +3999,7 @@ xlog_recover_finish(
                log->l_flags &= ~XLOG_RECOVERY_NEEDED;
        } else {
                cmn_err(CE_DEBUG,
-                       "!Ending clean XFS mount for filesystem: %s",
+                       "!Ending clean XFS mount for filesystem: %s\n",
                        log->l_mp->m_fsname);
        }
        return 0;