aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rw.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_rw.c')
-rw-r--r--fs/xfs/xfs_rw.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c
index a59c102cf214..d33e4f5808e5 100644
--- a/fs/xfs/xfs_rw.c
+++ b/fs/xfs/xfs_rw.c
@@ -109,12 +109,12 @@ xfs_do_force_shutdown(
109 xfs_mount_t *mp; 109 xfs_mount_t *mp;
110 110
111 mp = XFS_BHVTOM(bdp); 111 mp = XFS_BHVTOM(bdp);
112 logerror = flags & XFS_LOG_IO_ERROR; 112 logerror = flags & SHUTDOWN_LOG_IO_ERROR;
113 113
114 if (!(flags & XFS_FORCE_UMOUNT)) { 114 if (!(flags & SHUTDOWN_FORCE_UMOUNT)) {
115 cmn_err(CE_NOTE, 115 cmn_err(CE_NOTE, "xfs_force_shutdown(%s,0x%x) called from "
116 "xfs_force_shutdown(%s,0x%x) called from line %d of file %s. Return address = 0x%p", 116 "line %d of file %s. Return address = 0x%p",
117 mp->m_fsname,flags,lnnum,fname,__return_address); 117 mp->m_fsname, flags, lnnum, fname, __return_address);
118 } 118 }
119 /* 119 /*
120 * No need to duplicate efforts. 120 * No need to duplicate efforts.
@@ -125,33 +125,37 @@ xfs_do_force_shutdown(
125 /* 125 /*
126 * This flags XFS_MOUNT_FS_SHUTDOWN, makes sure that we don't 126 * This flags XFS_MOUNT_FS_SHUTDOWN, makes sure that we don't
127 * queue up anybody new on the log reservations, and wakes up 127 * queue up anybody new on the log reservations, and wakes up
128 * everybody who's sleeping on log reservations and tells 128 * everybody who's sleeping on log reservations to tell them
129 * them the bad news. 129 * the bad news.
130 */ 130 */
131 if (xfs_log_force_umount(mp, logerror)) 131 if (xfs_log_force_umount(mp, logerror))
132 return; 132 return;
133 133
134 if (flags & XFS_CORRUPT_INCORE) { 134 if (flags & SHUTDOWN_CORRUPT_INCORE) {
135 xfs_cmn_err(XFS_PTAG_SHUTDOWN_CORRUPT, CE_ALERT, mp, 135 xfs_cmn_err(XFS_PTAG_SHUTDOWN_CORRUPT, CE_ALERT, mp,
136 "Corruption of in-memory data detected. Shutting down filesystem: %s", 136 "Corruption of in-memory data detected. Shutting down filesystem: %s",
137 mp->m_fsname); 137 mp->m_fsname);
138 if (XFS_ERRLEVEL_HIGH <= xfs_error_level) { 138 if (XFS_ERRLEVEL_HIGH <= xfs_error_level) {
139 xfs_stack_trace(); 139 xfs_stack_trace();
140 } 140 }
141 } else if (!(flags & XFS_FORCE_UMOUNT)) { 141 } else if (!(flags & SHUTDOWN_FORCE_UMOUNT)) {
142 if (logerror) { 142 if (logerror) {
143 xfs_cmn_err(XFS_PTAG_SHUTDOWN_LOGERROR, CE_ALERT, mp, 143 xfs_cmn_err(XFS_PTAG_SHUTDOWN_LOGERROR, CE_ALERT, mp,
144 "Log I/O Error Detected. Shutting down filesystem: %s", 144 "Log I/O Error Detected. Shutting down filesystem: %s",
145 mp->m_fsname); 145 mp->m_fsname);
146 } else if (!(flags & XFS_SHUTDOWN_REMOTE_REQ)) { 146 } else if (flags & SHUTDOWN_DEVICE_REQ) {
147 xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp, 147 xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp,
148 "I/O Error Detected. Shutting down filesystem: %s", 148 "All device paths lost. Shutting down filesystem: %s",
149 mp->m_fsname);
150 } else if (!(flags & SHUTDOWN_REMOTE_REQ)) {
151 xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp,
152 "I/O Error Detected. Shutting down filesystem: %s",
149 mp->m_fsname); 153 mp->m_fsname);
150 } 154 }
151 } 155 }
152 if (!(flags & XFS_FORCE_UMOUNT)) { 156 if (!(flags & SHUTDOWN_FORCE_UMOUNT)) {
153 cmn_err(CE_ALERT, 157 cmn_err(CE_ALERT, "Please umount the filesystem, "
154 "Please umount the filesystem, and rectify the problem(s)"); 158 "and rectify the problem(s)");
155 } 159 }
156} 160}
157 161
@@ -335,7 +339,7 @@ xfs_bwrite(
335 * from bwrite and we could be tracing a buffer that has 339 * from bwrite and we could be tracing a buffer that has
336 * been reused. 340 * been reused.
337 */ 341 */
338 xfs_force_shutdown(mp, XFS_METADATA_IO_ERROR); 342 xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR);
339 } 343 }
340 return (error); 344 return (error);
341} 345}