diff options
Diffstat (limited to 'fs/xfs/xfs_error.c')
-rw-r--r-- | fs/xfs/xfs_error.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index 8c4331631337..a4634d94e561 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "xfs_inum.h" | 22 | #include "xfs_inum.h" |
23 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
24 | #include "xfs_sb.h" | 24 | #include "xfs_sb.h" |
25 | #include "xfs_ag.h" | ||
25 | #include "xfs_dir2.h" | 26 | #include "xfs_dir2.h" |
26 | #include "xfs_dmapi.h" | 27 | #include "xfs_dmapi.h" |
27 | #include "xfs_mount.h" | 28 | #include "xfs_mount.h" |
@@ -132,10 +133,14 @@ xfs_errortag_add(int error_tag, xfs_mount_t *mp) | |||
132 | } | 133 | } |
133 | 134 | ||
134 | int | 135 | int |
135 | xfs_errortag_clearall_umount(int64_t fsid, char *fsname, int loud) | 136 | xfs_errortag_clearall(xfs_mount_t *mp, int loud) |
136 | { | 137 | { |
137 | int i; | 138 | int64_t fsid; |
138 | int cleared = 0; | 139 | int cleared = 0; |
140 | int i; | ||
141 | |||
142 | memcpy(&fsid, mp->m_fixedfsid, sizeof(xfs_fsid_t)); | ||
143 | |||
139 | 144 | ||
140 | for (i = 0; i < XFS_NUM_INJECT_ERROR; i++) { | 145 | for (i = 0; i < XFS_NUM_INJECT_ERROR; i++) { |
141 | if ((fsid == 0LL || xfs_etest_fsid[i] == fsid) && | 146 | if ((fsid == 0LL || xfs_etest_fsid[i] == fsid) && |
@@ -154,20 +159,10 @@ xfs_errortag_clearall_umount(int64_t fsid, char *fsname, int loud) | |||
154 | if (loud || cleared) | 159 | if (loud || cleared) |
155 | cmn_err(CE_WARN, | 160 | cmn_err(CE_WARN, |
156 | "Cleared all XFS error tags for filesystem \"%s\"", | 161 | "Cleared all XFS error tags for filesystem \"%s\"", |
157 | fsname); | 162 | mp->m_fsname); |
158 | 163 | ||
159 | return 0; | 164 | return 0; |
160 | } | 165 | } |
161 | |||
162 | int | ||
163 | xfs_errortag_clearall(xfs_mount_t *mp) | ||
164 | { | ||
165 | int64_t fsid; | ||
166 | |||
167 | memcpy(&fsid, mp->m_fixedfsid, sizeof(xfs_fsid_t)); | ||
168 | |||
169 | return xfs_errortag_clearall_umount(fsid, mp->m_fsname, 1); | ||
170 | } | ||
171 | #endif /* DEBUG || INDUCE_IO_ERROR */ | 166 | #endif /* DEBUG || INDUCE_IO_ERROR */ |
172 | 167 | ||
173 | static void | 168 | static void |