~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/xfs/xfs_rw.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        logerror = flags & SHUTDOWN_LOG_IO_ERROR;
50
50
 
51
51
        if (!(flags & SHUTDOWN_FORCE_UMOUNT)) {
52
 
                cmn_err(CE_NOTE, "xfs_force_shutdown(%s,0x%x) called from "
53
 
                                 "line %d of file %s.  Return address = 0x%p",
54
 
                        mp->m_fsname, flags, lnnum, fname, __return_address);
 
52
                xfs_notice(mp,
 
53
        "%s(0x%x) called from line %d of file %s.  Return address = 0x%p",
 
54
                        __func__, flags, lnnum, fname, __return_address);
55
55
        }
56
56
        /*
57
57
         * No need to duplicate efforts.
69
69
                return;
70
70
 
71
71
        if (flags & SHUTDOWN_CORRUPT_INCORE) {
72
 
                xfs_cmn_err(XFS_PTAG_SHUTDOWN_CORRUPT, CE_ALERT, mp,
73
 
    "Corruption of in-memory data detected.  Shutting down filesystem: %s",
74
 
                        mp->m_fsname);
75
 
                if (XFS_ERRLEVEL_HIGH <= xfs_error_level) {
 
72
                xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_CORRUPT,
 
73
    "Corruption of in-memory data detected.  Shutting down filesystem");
 
74
                if (XFS_ERRLEVEL_HIGH <= xfs_error_level)
76
75
                        xfs_stack_trace();
77
 
                }
78
76
        } else if (!(flags & SHUTDOWN_FORCE_UMOUNT)) {
79
77
                if (logerror) {
80
 
                        xfs_cmn_err(XFS_PTAG_SHUTDOWN_LOGERROR, CE_ALERT, mp,
81
 
                "Log I/O Error Detected.  Shutting down filesystem: %s",
82
 
                                mp->m_fsname);
 
78
                        xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_LOGERROR,
 
79
                "Log I/O Error Detected.  Shutting down filesystem");
83
80
                } else if (flags & SHUTDOWN_DEVICE_REQ) {
84
 
                        xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp,
85
 
                "All device paths lost.  Shutting down filesystem: %s",
86
 
                                mp->m_fsname);
 
81
                        xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_IOERROR,
 
82
                "All device paths lost.  Shutting down filesystem");
87
83
                } else if (!(flags & SHUTDOWN_REMOTE_REQ)) {
88
 
                        xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp,
89
 
                "I/O Error Detected.  Shutting down filesystem: %s",
90
 
                                mp->m_fsname);
 
84
                        xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_IOERROR,
 
85
                "I/O Error Detected. Shutting down filesystem");
91
86
                }
92
87
        }
93
88
        if (!(flags & SHUTDOWN_FORCE_UMOUNT)) {
94
 
                cmn_err(CE_ALERT, "Please umount the filesystem, "
95
 
                                  "and rectify the problem(s)");
 
89
                xfs_alert(mp,
 
90
        "Please umount the filesystem and rectify the problem(s)");
96
91
        }
97
92
}
98
93
 
106
101
        xfs_buf_t               *bp,
107
102
        xfs_daddr_t             blkno)
108
103
{
109
 
        cmn_err(CE_ALERT,
110
 
 "I/O error in filesystem (\"%s\") meta-data dev %s block 0x%llx"
111
 
 "       (\"%s\") error %d buf count %zd",
112
 
                (!mp || !mp->m_fsname) ? "(fs name not set)" : mp->m_fsname,
 
104
        xfs_alert(mp,
 
105
                 "I/O error occurred: meta-data dev %s block 0x%llx"
 
106
                 "       (\"%s\") error %d buf count %zd",
113
107
                XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)),
114
108
                (__uint64_t)blkno, func,
115
109
                XFS_BUF_GETERROR(bp), XFS_BUF_COUNT(bp));
173
167
xfs_get_extsz_hint(
174
168
        struct xfs_inode        *ip)
175
169
{
176
 
        xfs_extlen_t            extsz;
177
 
 
178
 
        if (unlikely(XFS_IS_REALTIME_INODE(ip))) {
179
 
                extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)
180
 
                                ? ip->i_d.di_extsize
181
 
                                : ip->i_mount->m_sb.sb_rextsize;
182
 
                ASSERT(extsz);
183
 
        } else {
184
 
                extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)
185
 
                                ? ip->i_d.di_extsize : 0;
186
 
        }
187
 
 
188
 
        return extsz;
 
170
        if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_d.di_extsize)
 
171
                return ip->i_d.di_extsize;
 
172
        if (XFS_IS_REALTIME_INODE(ip))
 
173
                return ip->i_mount->m_sb.sb_rextsize;
 
174
        return 0;
189
175
}