summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-02 11:44:33 +1100
committerNathan Scott <nathans@sgi.com>2005-11-02 11:44:33 +1100
commitfc1f8c1ca373dc88dd6e8c0e8b7de0e6ad95d441 (patch)
treee49b7a364bf6a6fc18e650b3a6e10b516c1ba547 /fs
parent4aeb664c2561c0bae18d7a3a141d7d2acf126da1 (diff)
downloadop-kernel-dev-fc1f8c1ca373dc88dd6e8c0e8b7de0e6ad95d441.zip
op-kernel-dev-fc1f8c1ca373dc88dd6e8c0e8b7de0e6ad95d441.tar.gz
[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.c3
-rw-r--r--fs/xfs/xfs_log_recover.c15
-rw-r--r--fs/xfs/xfs_mount.c4
-rw-r--r--fs/xfs/xfs_mount.h2
-rw-r--r--fs/xfs/xfs_vfsops.c18
5 files changed, 29 insertions, 13 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index b9d3ad3..fcde2a2 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -483,7 +483,8 @@ xfs_log_mount(xfs_mount_t *mp,
#if defined(DEBUG) || defined(XLOG_NOLOG)
if (!xlog_debug) {
- cmn_err(CE_NOTE, "log dev: %s", XFS_BUFTARG_NAME(log_target));
+ cmn_err(CE_NOTE, "logdev: %s", mp->m_logname ?
+ mp->m_logname : "internal");
return 0;
}
#endif
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 14faaba..212c5411 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2226,8 +2226,9 @@ xlog_recover_do_buffer_trans(
break;
default:
xfs_fs_cmn_err(CE_ALERT, log->l_mp,
- "xfs_log_recover: unknown buffer type 0x%x, dev %s",
- buf_f->blf_type, XFS_BUFTARG_NAME(log->l_targ));
+ "xfs_log_recover: unknown buffer type 0x%x, logdev %s",
+ buf_f->blf_type, log->l_mp->m_logname ?
+ log->l_mp->m_logname : "internal");
XFS_ERROR_REPORT("xlog_recover_do_buffer_trans",
XFS_ERRLEVEL_LOW, log->l_mp);
return XFS_ERROR(EFSCORRUPTED);
@@ -3938,8 +3939,9 @@ xlog_recover(
}
cmn_err(CE_NOTE,
- "Starting XFS recovery on filesystem: %s (dev: %s)",
- log->l_mp->m_fsname, XFS_BUFTARG_NAME(log->l_targ));
+ "Starting XFS recovery on filesystem: %s (logdev: %s)",
+ log->l_mp->m_fsname, log->l_mp->m_logname ?
+ log->l_mp->m_logname : "internal");
error = xlog_do_recover(log, head_blk, tail_blk);
log->l_flags |= XLOG_RECOVERY_NEEDED;
@@ -3987,8 +3989,9 @@ xlog_recover_finish(
xlog_recover_check_summary(log);
cmn_err(CE_NOTE,
- "Ending XFS recovery on filesystem: %s (dev: %s)",
- log->l_mp->m_fsname, XFS_BUFTARG_NAME(log->l_targ));
+ "Ending XFS recovery on filesystem: %s (logdev: %s)",
+ log->l_mp->m_fsname, log->l_mp->m_logname ?
+ log->l_mp->m_logname : "internal");
log->l_flags &= ~XLOG_RECOVERY_NEEDED;
} else {
cmn_err(CE_DEBUG,
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index a93ef80..4f26172 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -180,6 +180,10 @@ xfs_mount_free(
if (mp->m_fsname != NULL)
kmem_free(mp->m_fsname, mp->m_fsname_len);
+ if (mp->m_rtname != NULL)
+ kmem_free(mp->m_rtname, strlen(mp->m_rtname) + 1);
+ if (mp->m_logname != NULL)
+ kmem_free(mp->m_logname, strlen(mp->m_logname) + 1);
if (remove_bhv) {
struct vfs *vfsp = XFS_MTOVFS(mp);
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 5c5e7bf..7341f49 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -292,6 +292,8 @@ typedef struct xfs_mount {
struct xfs_buf *m_sb_bp; /* buffer for superblock */
char *m_fsname; /* filesystem name */
int m_fsname_len; /* strlen of fs name */
+ char *m_rtname; /* realtime device name */
+ char *m_logname; /* external log device name */
int m_bsize; /* fs logical block size */
xfs_agnumber_t m_agfrotor; /* last ag where space found */
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 07779c5..200e0c5 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -257,6 +257,14 @@ xfs_start_flags(
mp->m_fsname_len = strlen(ap->fsname) + 1;
mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP);
strcpy(mp->m_fsname, ap->fsname);
+ if (ap->rtname[0]) {
+ mp->m_rtname = kmem_alloc(strlen(ap->rtname) + 1, KM_SLEEP);
+ strcpy(mp->m_rtname, ap->rtname);
+ }
+ if (ap->logname[0]) {
+ mp->m_logname = kmem_alloc(strlen(ap->logname) + 1, KM_SLEEP);
+ strcpy(mp->m_logname, ap->logname);
+ }
if (ap->flags & XFSMNT_WSYNC)
mp->m_flags |= XFS_MOUNT_WSYNC;
@@ -1914,13 +1922,11 @@ xfs_showargs(
if (mp->m_logbsize > 0)
seq_printf(m, "," MNTOPT_LOGBSIZE "=%d", mp->m_logbsize);
- if (mp->m_ddev_targp != mp->m_logdev_targp)
- seq_printf(m, "," MNTOPT_LOGDEV "=%s",
- XFS_BUFTARG_NAME(mp->m_logdev_targp));
+ if (mp->m_logname)
+ seq_printf(m, "," MNTOPT_LOGDEV "=%s", mp->m_logname);
- if (mp->m_rtdev_targp && mp->m_ddev_targp != mp->m_rtdev_targp)
- seq_printf(m, "," MNTOPT_RTDEV "=%s",
- XFS_BUFTARG_NAME(mp->m_rtdev_targp));
+ if (mp->m_rtname)
+ seq_printf(m, "," MNTOPT_RTDEV "=%s", mp->m_rtname);
if (mp->m_dalign > 0)
seq_printf(m, "," MNTOPT_SUNIT "=%d",
OpenPOWER on IntegriCloud