diff options
Diffstat (limited to 'fs/xfs/xfs_rw.c')
-rw-r--r-- | fs/xfs/xfs_rw.c | 58 |
1 files changed, 22 insertions, 36 deletions
diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c index 56861d5daaef..d6d6fdfe9422 100644 --- a/fs/xfs/xfs_rw.c +++ b/fs/xfs/xfs_rw.c | |||
@@ -49,9 +49,9 @@ xfs_do_force_shutdown( | |||
49 | logerror = flags & SHUTDOWN_LOG_IO_ERROR; | 49 | logerror = flags & SHUTDOWN_LOG_IO_ERROR; |
50 | 50 | ||
51 | if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { | 51 | if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { |
52 | cmn_err(CE_NOTE, "xfs_force_shutdown(%s,0x%x) called from " | 52 | xfs_notice(mp, |
53 | "line %d of file %s. Return address = 0x%p", | 53 | "%s(0x%x) called from line %d of file %s. Return address = 0x%p", |
54 | mp->m_fsname, flags, lnnum, fname, __return_address); | 54 | __func__, flags, lnnum, fname, __return_address); |
55 | } | 55 | } |
56 | /* | 56 | /* |
57 | * No need to duplicate efforts. | 57 | * No need to duplicate efforts. |
@@ -69,30 +69,25 @@ xfs_do_force_shutdown( | |||
69 | return; | 69 | return; |
70 | 70 | ||
71 | if (flags & SHUTDOWN_CORRUPT_INCORE) { | 71 | if (flags & SHUTDOWN_CORRUPT_INCORE) { |
72 | xfs_cmn_err(XFS_PTAG_SHUTDOWN_CORRUPT, CE_ALERT, mp, | 72 | xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_CORRUPT, |
73 | "Corruption of in-memory data detected. Shutting down filesystem: %s", | 73 | "Corruption of in-memory data detected. Shutting down filesystem"); |
74 | mp->m_fsname); | 74 | if (XFS_ERRLEVEL_HIGH <= xfs_error_level) |
75 | if (XFS_ERRLEVEL_HIGH <= xfs_error_level) { | ||
76 | xfs_stack_trace(); | 75 | xfs_stack_trace(); |
77 | } | ||
78 | } else if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { | 76 | } else if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { |
79 | if (logerror) { | 77 | if (logerror) { |
80 | xfs_cmn_err(XFS_PTAG_SHUTDOWN_LOGERROR, CE_ALERT, mp, | 78 | xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_LOGERROR, |
81 | "Log I/O Error Detected. Shutting down filesystem: %s", | 79 | "Log I/O Error Detected. Shutting down filesystem"); |
82 | mp->m_fsname); | ||
83 | } else if (flags & SHUTDOWN_DEVICE_REQ) { | 80 | } else if (flags & SHUTDOWN_DEVICE_REQ) { |
84 | xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp, | 81 | xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_IOERROR, |
85 | "All device paths lost. Shutting down filesystem: %s", | 82 | "All device paths lost. Shutting down filesystem"); |
86 | mp->m_fsname); | ||
87 | } else if (!(flags & SHUTDOWN_REMOTE_REQ)) { | 83 | } else if (!(flags & SHUTDOWN_REMOTE_REQ)) { |
88 | xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp, | 84 | xfs_alert_tag(mp, XFS_PTAG_SHUTDOWN_IOERROR, |
89 | "I/O Error Detected. Shutting down filesystem: %s", | 85 | "I/O Error Detected. Shutting down filesystem"); |
90 | mp->m_fsname); | ||
91 | } | 86 | } |
92 | } | 87 | } |
93 | if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { | 88 | if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { |
94 | cmn_err(CE_ALERT, "Please umount the filesystem, " | 89 | xfs_alert(mp, |
95 | "and rectify the problem(s)"); | 90 | "Please umount the filesystem and rectify the problem(s)"); |
96 | } | 91 | } |
97 | } | 92 | } |
98 | 93 | ||
@@ -106,10 +101,9 @@ xfs_ioerror_alert( | |||
106 | xfs_buf_t *bp, | 101 | xfs_buf_t *bp, |
107 | xfs_daddr_t blkno) | 102 | xfs_daddr_t blkno) |
108 | { | 103 | { |
109 | cmn_err(CE_ALERT, | 104 | xfs_alert(mp, |
110 | "I/O error in filesystem (\"%s\") meta-data dev %s block 0x%llx" | 105 | "I/O error occurred: meta-data dev %s block 0x%llx" |
111 | " (\"%s\") error %d buf count %zd", | 106 | " (\"%s\") error %d buf count %zd", |
112 | (!mp || !mp->m_fsname) ? "(fs name not set)" : mp->m_fsname, | ||
113 | XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)), | 107 | XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)), |
114 | (__uint64_t)blkno, func, | 108 | (__uint64_t)blkno, func, |
115 | XFS_BUF_GETERROR(bp), XFS_BUF_COUNT(bp)); | 109 | XFS_BUF_GETERROR(bp), XFS_BUF_COUNT(bp)); |
@@ -173,17 +167,9 @@ xfs_extlen_t | |||
173 | xfs_get_extsz_hint( | 167 | xfs_get_extsz_hint( |
174 | struct xfs_inode *ip) | 168 | struct xfs_inode *ip) |
175 | { | 169 | { |
176 | xfs_extlen_t extsz; | 170 | if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_d.di_extsize) |
177 | 171 | return ip->i_d.di_extsize; | |
178 | if (unlikely(XFS_IS_REALTIME_INODE(ip))) { | 172 | if (XFS_IS_REALTIME_INODE(ip)) |
179 | extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) | 173 | return ip->i_mount->m_sb.sb_rextsize; |
180 | ? ip->i_d.di_extsize | 174 | return 0; |
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; | ||
189 | } | 175 | } |