diff options
author | Nathan Scott <nathans@sgi.com> | 2005-11-01 19:44:33 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-11-01 19:44:33 -0500 |
commit | fc1f8c1ca373dc88dd6e8c0e8b7de0e6ad95d441 (patch) | |
tree | e49b7a364bf6a6fc18e650b3a6e10b516c1ba547 /fs | |
parent | 4aeb664c2561c0bae18d7a3a141d7d2acf126da1 (diff) |
[XFS] Track external log/realtime device names for correct reporting in
/proc/mounts.
SGI-PV: 942984
SGI-Modid: xfs-linux:xfs-kern:23862a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_log.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 15 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 18 |
5 files changed, 29 insertions, 13 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index b9d3ad35240e..fcde2a2fc457 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -483,7 +483,8 @@ xfs_log_mount(xfs_mount_t *mp, | |||
483 | 483 | ||
484 | #if defined(DEBUG) || defined(XLOG_NOLOG) | 484 | #if defined(DEBUG) || defined(XLOG_NOLOG) |
485 | if (!xlog_debug) { | 485 | if (!xlog_debug) { |
486 | cmn_err(CE_NOTE, "log dev: %s", XFS_BUFTARG_NAME(log_target)); | 486 | cmn_err(CE_NOTE, "logdev: %s", mp->m_logname ? |
487 | mp->m_logname : "internal"); | ||
487 | return 0; | 488 | return 0; |
488 | } | 489 | } |
489 | #endif | 490 | #endif |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 14faabaabf29..212c5411595e 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -2226,8 +2226,9 @@ xlog_recover_do_buffer_trans( | |||
2226 | break; | 2226 | break; |
2227 | default: | 2227 | default: |
2228 | xfs_fs_cmn_err(CE_ALERT, log->l_mp, | 2228 | xfs_fs_cmn_err(CE_ALERT, log->l_mp, |
2229 | "xfs_log_recover: unknown buffer type 0x%x, dev %s", | 2229 | "xfs_log_recover: unknown buffer type 0x%x, logdev %s", |
2230 | buf_f->blf_type, XFS_BUFTARG_NAME(log->l_targ)); | 2230 | buf_f->blf_type, log->l_mp->m_logname ? |
2231 | log->l_mp->m_logname : "internal"); | ||
2231 | XFS_ERROR_REPORT("xlog_recover_do_buffer_trans", | 2232 | XFS_ERROR_REPORT("xlog_recover_do_buffer_trans", |
2232 | XFS_ERRLEVEL_LOW, log->l_mp); | 2233 | XFS_ERRLEVEL_LOW, log->l_mp); |
2233 | return XFS_ERROR(EFSCORRUPTED); | 2234 | return XFS_ERROR(EFSCORRUPTED); |
@@ -3938,8 +3939,9 @@ xlog_recover( | |||
3938 | } | 3939 | } |
3939 | 3940 | ||
3940 | cmn_err(CE_NOTE, | 3941 | cmn_err(CE_NOTE, |
3941 | "Starting XFS recovery on filesystem: %s (dev: %s)", | 3942 | "Starting XFS recovery on filesystem: %s (logdev: %s)", |
3942 | log->l_mp->m_fsname, XFS_BUFTARG_NAME(log->l_targ)); | 3943 | log->l_mp->m_fsname, log->l_mp->m_logname ? |
3944 | log->l_mp->m_logname : "internal"); | ||
3943 | 3945 | ||
3944 | error = xlog_do_recover(log, head_blk, tail_blk); | 3946 | error = xlog_do_recover(log, head_blk, tail_blk); |
3945 | log->l_flags |= XLOG_RECOVERY_NEEDED; | 3947 | log->l_flags |= XLOG_RECOVERY_NEEDED; |
@@ -3987,8 +3989,9 @@ xlog_recover_finish( | |||
3987 | xlog_recover_check_summary(log); | 3989 | xlog_recover_check_summary(log); |
3988 | 3990 | ||
3989 | cmn_err(CE_NOTE, | 3991 | cmn_err(CE_NOTE, |
3990 | "Ending XFS recovery on filesystem: %s (dev: %s)", | 3992 | "Ending XFS recovery on filesystem: %s (logdev: %s)", |
3991 | log->l_mp->m_fsname, XFS_BUFTARG_NAME(log->l_targ)); | 3993 | log->l_mp->m_fsname, log->l_mp->m_logname ? |
3994 | log->l_mp->m_logname : "internal"); | ||
3992 | log->l_flags &= ~XLOG_RECOVERY_NEEDED; | 3995 | log->l_flags &= ~XLOG_RECOVERY_NEEDED; |
3993 | } else { | 3996 | } else { |
3994 | cmn_err(CE_DEBUG, | 3997 | cmn_err(CE_DEBUG, |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index a93ef802db6b..4f26172a163e 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -180,6 +180,10 @@ xfs_mount_free( | |||
180 | 180 | ||
181 | if (mp->m_fsname != NULL) | 181 | if (mp->m_fsname != NULL) |
182 | kmem_free(mp->m_fsname, mp->m_fsname_len); | 182 | kmem_free(mp->m_fsname, mp->m_fsname_len); |
183 | if (mp->m_rtname != NULL) | ||
184 | kmem_free(mp->m_rtname, strlen(mp->m_rtname) + 1); | ||
185 | if (mp->m_logname != NULL) | ||
186 | kmem_free(mp->m_logname, strlen(mp->m_logname) + 1); | ||
183 | 187 | ||
184 | if (remove_bhv) { | 188 | if (remove_bhv) { |
185 | struct vfs *vfsp = XFS_MTOVFS(mp); | 189 | struct vfs *vfsp = XFS_MTOVFS(mp); |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 5c5e7bf4a8a9..7341f4984c08 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -292,6 +292,8 @@ typedef struct xfs_mount { | |||
292 | struct xfs_buf *m_sb_bp; /* buffer for superblock */ | 292 | struct xfs_buf *m_sb_bp; /* buffer for superblock */ |
293 | char *m_fsname; /* filesystem name */ | 293 | char *m_fsname; /* filesystem name */ |
294 | int m_fsname_len; /* strlen of fs name */ | 294 | int m_fsname_len; /* strlen of fs name */ |
295 | char *m_rtname; /* realtime device name */ | ||
296 | char *m_logname; /* external log device name */ | ||
295 | int m_bsize; /* fs logical block size */ | 297 | int m_bsize; /* fs logical block size */ |
296 | xfs_agnumber_t m_agfrotor; /* last ag where space found */ | 298 | xfs_agnumber_t m_agfrotor; /* last ag where space found */ |
297 | xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ | 299 | xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ |
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 07779c5ab42f..200e0c50acf2 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -257,6 +257,14 @@ xfs_start_flags( | |||
257 | mp->m_fsname_len = strlen(ap->fsname) + 1; | 257 | mp->m_fsname_len = strlen(ap->fsname) + 1; |
258 | mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP); | 258 | mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP); |
259 | strcpy(mp->m_fsname, ap->fsname); | 259 | strcpy(mp->m_fsname, ap->fsname); |
260 | if (ap->rtname[0]) { | ||
261 | mp->m_rtname = kmem_alloc(strlen(ap->rtname) + 1, KM_SLEEP); | ||
262 | strcpy(mp->m_rtname, ap->rtname); | ||
263 | } | ||
264 | if (ap->logname[0]) { | ||
265 | mp->m_logname = kmem_alloc(strlen(ap->logname) + 1, KM_SLEEP); | ||
266 | strcpy(mp->m_logname, ap->logname); | ||
267 | } | ||
260 | 268 | ||
261 | if (ap->flags & XFSMNT_WSYNC) | 269 | if (ap->flags & XFSMNT_WSYNC) |
262 | mp->m_flags |= XFS_MOUNT_WSYNC; | 270 | mp->m_flags |= XFS_MOUNT_WSYNC; |
@@ -1914,13 +1922,11 @@ xfs_showargs( | |||
1914 | if (mp->m_logbsize > 0) | 1922 | if (mp->m_logbsize > 0) |
1915 | seq_printf(m, "," MNTOPT_LOGBSIZE "=%d", mp->m_logbsize); | 1923 | seq_printf(m, "," MNTOPT_LOGBSIZE "=%d", mp->m_logbsize); |
1916 | 1924 | ||
1917 | if (mp->m_ddev_targp != mp->m_logdev_targp) | 1925 | if (mp->m_logname) |
1918 | seq_printf(m, "," MNTOPT_LOGDEV "=%s", | 1926 | seq_printf(m, "," MNTOPT_LOGDEV "=%s", mp->m_logname); |
1919 | XFS_BUFTARG_NAME(mp->m_logdev_targp)); | ||
1920 | 1927 | ||
1921 | if (mp->m_rtdev_targp && mp->m_ddev_targp != mp->m_rtdev_targp) | 1928 | if (mp->m_rtname) |
1922 | seq_printf(m, "," MNTOPT_RTDEV "=%s", | 1929 | seq_printf(m, "," MNTOPT_RTDEV "=%s", mp->m_rtname); |
1923 | XFS_BUFTARG_NAME(mp->m_rtdev_targp)); | ||
1924 | 1930 | ||
1925 | if (mp->m_dalign > 0) | 1931 | if (mp->m_dalign > 0) |
1926 | seq_printf(m, "," MNTOPT_SUNIT "=%d", | 1932 | seq_printf(m, "," MNTOPT_SUNIT "=%d", |