aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-06-20 20:54:46 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2017-06-27 21:23:19 -0400
commit31965ef34802f49903bba06dd7c3b96a2e2ed4e4 (patch)
treee0198268750bf8679fbeff8a5ebd6c9c2b4c66d6 /fs/xfs/xfs_mount.c
parent39775431f82f890f4aaa08860a30883d081bffc7 (diff)
xfs: make errortag a per-mountpoint structure
Remove the xfs_etest structure in favor of a per-mountpoint structure. This will give us the flexibility to set as many error injection points as we want, and later enable us to set up sysfs knobs to set the trigger frequency as we wish. This comes at a cost of higher memory use, but unti we hit 1024 injection points (we're at 29) or a lot of mounts this shouldn't be a huge issue. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index cc6789d35232..1a98c35e1ccf 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -720,10 +720,13 @@ xfs_mountfs(
720 if (error) 720 if (error)
721 goto out_del_stats; 721 goto out_del_stats;
722 722
723 error = xfs_errortag_init(mp);
724 if (error)
725 goto out_remove_error_sysfs;
723 726
724 error = xfs_uuid_mount(mp); 727 error = xfs_uuid_mount(mp);
725 if (error) 728 if (error)
726 goto out_remove_error_sysfs; 729 goto out_remove_errortag;
727 730
728 /* 731 /*
729 * Set the minimum read and write sizes 732 * Set the minimum read and write sizes
@@ -1042,6 +1045,8 @@ xfs_mountfs(
1042 xfs_da_unmount(mp); 1045 xfs_da_unmount(mp);
1043 out_remove_uuid: 1046 out_remove_uuid:
1044 xfs_uuid_unmount(mp); 1047 xfs_uuid_unmount(mp);
1048 out_remove_errortag:
1049 xfs_errortag_del(mp);
1045 out_remove_error_sysfs: 1050 out_remove_error_sysfs:
1046 xfs_error_sysfs_del(mp); 1051 xfs_error_sysfs_del(mp);
1047 out_del_stats: 1052 out_del_stats:
@@ -1145,10 +1150,11 @@ xfs_unmountfs(
1145 xfs_uuid_unmount(mp); 1150 xfs_uuid_unmount(mp);
1146 1151
1147#if defined(DEBUG) 1152#if defined(DEBUG)
1148 xfs_errortag_clearall(mp, 0); 1153 xfs_errortag_clearall(mp);
1149#endif 1154#endif
1150 xfs_free_perag(mp); 1155 xfs_free_perag(mp);
1151 1156
1157 xfs_errortag_del(mp);
1152 xfs_error_sysfs_del(mp); 1158 xfs_error_sysfs_del(mp);
1153 xfs_sysfs_del(&mp->m_stats.xs_kobj); 1159 xfs_sysfs_del(&mp->m_stats.xs_kobj);
1154 xfs_sysfs_del(&mp->m_kobj); 1160 xfs_sysfs_del(&mp->m_kobj);