Commit 7206852c authored by Christoph Hellwig's avatar Christoph Hellwig

XFS: Fix the mount-cleanup for single-subvolume filesystems.

Modid: 2.5.x-xfs:slinx:128192a
parent 1cb2d696
...@@ -221,33 +221,30 @@ xfs_start_flags( ...@@ -221,33 +221,30 @@ xfs_start_flags(
mp->m_swidth = ap->swidth; mp->m_swidth = ap->swidth;
} }
if ((mp->m_logdev_targp != NULL) && if (ap->logbufs != 0 && ap->logbufs != -1 &&
(mp->m_logdev_targp != mp->m_ddev_targp)) { (ap->logbufs < XLOG_NUM_ICLOGS ||
if (ap->logbufs != 0 && ap->logbufs != -1 && ap->logbufs > XLOG_MAX_ICLOGS)) {
(ap->logbufs < XLOG_NUM_ICLOGS || cmn_err(CE_WARN,
ap->logbufs > XLOG_MAX_ICLOGS)) { "XFS: invalid logbufs value: %d [not %d-%d]\n",
cmn_err(CE_WARN, ap->logbufs, XLOG_NUM_ICLOGS, XLOG_MAX_ICLOGS);
"XFS: invalid logbufs value: %d [not %d-%d]\n", return XFS_ERROR(EINVAL);
ap->logbufs, XLOG_NUM_ICLOGS, XLOG_MAX_ICLOGS); }
return XFS_ERROR(EINVAL); mp->m_logbufs = ap->logbufs;
} if (ap->logbufsize != -1 &&
mp->m_logbufs = ap->logbufs; ap->logbufsize != 16 * 1024 &&
if (ap->logbufsize != -1 && ap->logbufsize != 32 * 1024 &&
ap->logbufsize != 16 * 1024 && ap->logbufsize != 64 * 1024 &&
ap->logbufsize != 32 * 1024 && ap->logbufsize != 128 * 1024 &&
ap->logbufsize != 64 * 1024 && ap->logbufsize != 256 * 1024) {
ap->logbufsize != 128 * 1024 && cmn_err(CE_WARN,
ap->logbufsize != 256 * 1024) { "XFS: invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]\n",
cmn_err(CE_WARN, ap->logbufsize);
"XFS: invalid logbufsize: %d [not 16k,32k,64k,128k or 256k]\n", return XFS_ERROR(EINVAL);
ap->logbufsize);
return XFS_ERROR(EINVAL);
}
mp->m_logbsize = ap->logbufsize;
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);
} }
mp->m_logbsize = ap->logbufsize;
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);
/* /*
* Pull in the 'wsync' and 'ino64' mount options before we do the real * Pull in the 'wsync' and 'ino64' mount options before we do the real
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment