Commit b56757be authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Niv Sardi

remove leftovers of shared read-only support

We never supported shared read-only filesystems, so remove the dead
code left over from IRIX for it.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <david@fromorbit.com>
Signed-off-by: default avatarNiv Sardi <xaiki@sgi.com>
parent e88f11ab
...@@ -1388,35 +1388,6 @@ xfs_finish_flags( ...@@ -1388,35 +1388,6 @@ xfs_finish_flags(
return XFS_ERROR(EROFS); return XFS_ERROR(EROFS);
} }
#if 0 /* shared mounts were never supported on Linux */
/*
* check for shared mount.
*/
if (ap->flags & XFSMNT_SHARED) {
if (!xfs_sb_version_hasshared(&mp->m_sb))
return XFS_ERROR(EINVAL);
/*
* For IRIX 6.5, shared mounts must have the shared
* version bit set, have the persistent readonly
* field set, must be version 0 and can only be mounted
* read-only.
*/
if (!ronly || !(mp->m_sb.sb_flags & XFS_SBF_READONLY) ||
(mp->m_sb.sb_shared_vn != 0))
return XFS_ERROR(EINVAL);
mp->m_flags |= XFS_MOUNT_SHARED;
/*
* Shared XFS V0 can't deal with DMI. Return EINVAL.
*/
if (mp->m_sb.sb_shared_vn == 0 &&
(mp->m_flags & XFS_MOUNT_DMAPI))
return XFS_ERROR(EINVAL);
}
#endif
return 0; return 0;
} }
......
...@@ -1352,24 +1352,6 @@ xfs_log_sbcount( ...@@ -1352,24 +1352,6 @@ xfs_log_sbcount(
return error; return error;
} }
STATIC void
xfs_mark_shared_ro(
xfs_mount_t *mp,
xfs_buf_t *bp)
{
xfs_dsb_t *sb = XFS_BUF_TO_SBP(bp);
__uint16_t version;
if (!(sb->sb_flags & XFS_SBF_READONLY))
sb->sb_flags |= XFS_SBF_READONLY;
version = be16_to_cpu(sb->sb_versionnum);
if ((version & XFS_SB_VERSION_NUMBITS) != XFS_SB_VERSION_4 ||
!(version & XFS_SB_VERSION_SHAREDBIT))
version |= XFS_SB_VERSION_SHAREDBIT;
sb->sb_versionnum = cpu_to_be16(version);
}
int int
xfs_unmountfs_writesb(xfs_mount_t *mp) xfs_unmountfs_writesb(xfs_mount_t *mp)
{ {
...@@ -1385,12 +1367,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp) ...@@ -1385,12 +1367,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
sbp = xfs_getsb(mp, 0); sbp = xfs_getsb(mp, 0);
/*
* mark shared-readonly if desired
*/
if (mp->m_mk_sharedro)
xfs_mark_shared_ro(mp, sbp);
XFS_BUF_UNDONE(sbp); XFS_BUF_UNDONE(sbp);
XFS_BUF_UNREAD(sbp); XFS_BUF_UNREAD(sbp);
XFS_BUF_UNDELAYWRITE(sbp); XFS_BUF_UNDELAYWRITE(sbp);
...@@ -1402,8 +1378,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp) ...@@ -1402,8 +1378,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
if (error) if (error)
xfs_ioerror_alert("xfs_unmountfs_writesb", xfs_ioerror_alert("xfs_unmountfs_writesb",
mp, sbp, XFS_BUF_ADDR(sbp)); mp, sbp, XFS_BUF_ADDR(sbp));
if (error && mp->m_mk_sharedro)
xfs_fs_cmn_err(CE_ALERT, mp, "Superblock write error detected while unmounting. Filesystem may not be marked shared readonly");
xfs_buf_relse(sbp); xfs_buf_relse(sbp);
} }
return error; return error;
......
...@@ -301,7 +301,6 @@ typedef struct xfs_mount { ...@@ -301,7 +301,6 @@ typedef struct xfs_mount {
int m_sinoalign; /* stripe unit inode alignment */ int m_sinoalign; /* stripe unit inode alignment */
int m_attr_magicpct;/* 37% of the blocksize */ int m_attr_magicpct;/* 37% of the blocksize */
int m_dir_magicpct; /* 37% of the dir blocksize */ int m_dir_magicpct; /* 37% of the dir blocksize */
__uint8_t m_mk_sharedro; /* mark shared ro on unmount */
__uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */ const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */
int m_dirblksize; /* directory block sz--bytes */ int m_dirblksize; /* directory block sz--bytes */
...@@ -349,7 +348,6 @@ typedef struct xfs_mount { ...@@ -349,7 +348,6 @@ typedef struct xfs_mount {
#define XFS_MOUNT_ATTR2 (1ULL << 8) /* allow use of attr2 format */ #define XFS_MOUNT_ATTR2 (1ULL << 8) /* allow use of attr2 format */
#define XFS_MOUNT_GRPID (1ULL << 9) /* group-ID assigned from directory */ #define XFS_MOUNT_GRPID (1ULL << 9) /* group-ID assigned from directory */
#define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */ #define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */
#define XFS_MOUNT_SHARED (1ULL << 11) /* shared mount */
#define XFS_MOUNT_DFLT_IOSIZE (1ULL << 12) /* set default i/o size */ #define XFS_MOUNT_DFLT_IOSIZE (1ULL << 12) /* set default i/o size */
#define XFS_MOUNT_OSYNCISOSYNC (1ULL << 13) /* o_sync is REALLY o_sync */ #define XFS_MOUNT_OSYNCISOSYNC (1ULL << 13) /* o_sync is REALLY o_sync */
/* osyncisdsync is now default*/ /* osyncisdsync is now default*/
......
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