aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c29
-rw-r--r--fs/xfs/xfs_mount.c26
-rw-r--r--fs/xfs/xfs_mount.h2
3 files changed, 0 insertions, 57 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 37f2d11be4ac..c4f788e11197 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -1388,35 +1388,6 @@ xfs_finish_flags(
1388 return XFS_ERROR(EROFS); 1388 return XFS_ERROR(EROFS);
1389 } 1389 }
1390 1390
1391#if 0 /* shared mounts were never supported on Linux */
1392 /*
1393 * check for shared mount.
1394 */
1395 if (ap->flags & XFSMNT_SHARED) {
1396 if (!xfs_sb_version_hasshared(&mp->m_sb))
1397 return XFS_ERROR(EINVAL);
1398
1399 /*
1400 * For IRIX 6.5, shared mounts must have the shared
1401 * version bit set, have the persistent readonly
1402 * field set, must be version 0 and can only be mounted
1403 * read-only.
1404 */
1405 if (!ronly || !(mp->m_sb.sb_flags & XFS_SBF_READONLY) ||
1406 (mp->m_sb.sb_shared_vn != 0))
1407 return XFS_ERROR(EINVAL);
1408
1409 mp->m_flags |= XFS_MOUNT_SHARED;
1410
1411 /*
1412 * Shared XFS V0 can't deal with DMI. Return EINVAL.
1413 */
1414 if (mp->m_sb.sb_shared_vn == 0 &&
1415 (mp->m_flags & XFS_MOUNT_DMAPI))
1416 return XFS_ERROR(EINVAL);
1417 }
1418#endif
1419
1420 return 0; 1391 return 0;
1421} 1392}
1422 1393
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 3f999b1c0385..1672ff56a009 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1352,24 +1352,6 @@ xfs_log_sbcount(
1352 return error; 1352 return error;
1353} 1353}
1354 1354
1355STATIC void
1356xfs_mark_shared_ro(
1357 xfs_mount_t *mp,
1358 xfs_buf_t *bp)
1359{
1360 xfs_dsb_t *sb = XFS_BUF_TO_SBP(bp);
1361 __uint16_t version;
1362
1363 if (!(sb->sb_flags & XFS_SBF_READONLY))
1364 sb->sb_flags |= XFS_SBF_READONLY;
1365
1366 version = be16_to_cpu(sb->sb_versionnum);
1367 if ((version & XFS_SB_VERSION_NUMBITS) != XFS_SB_VERSION_4 ||
1368 !(version & XFS_SB_VERSION_SHAREDBIT))
1369 version |= XFS_SB_VERSION_SHAREDBIT;
1370 sb->sb_versionnum = cpu_to_be16(version);
1371}
1372
1373int 1355int
1374xfs_unmountfs_writesb(xfs_mount_t *mp) 1356xfs_unmountfs_writesb(xfs_mount_t *mp)
1375{ 1357{
@@ -1385,12 +1367,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
1385 1367
1386 sbp = xfs_getsb(mp, 0); 1368 sbp = xfs_getsb(mp, 0);
1387 1369
1388 /*
1389 * mark shared-readonly if desired
1390 */
1391 if (mp->m_mk_sharedro)
1392 xfs_mark_shared_ro(mp, sbp);
1393
1394 XFS_BUF_UNDONE(sbp); 1370 XFS_BUF_UNDONE(sbp);
1395 XFS_BUF_UNREAD(sbp); 1371 XFS_BUF_UNREAD(sbp);
1396 XFS_BUF_UNDELAYWRITE(sbp); 1372 XFS_BUF_UNDELAYWRITE(sbp);
@@ -1402,8 +1378,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
1402 if (error) 1378 if (error)
1403 xfs_ioerror_alert("xfs_unmountfs_writesb", 1379 xfs_ioerror_alert("xfs_unmountfs_writesb",
1404 mp, sbp, XFS_BUF_ADDR(sbp)); 1380 mp, sbp, XFS_BUF_ADDR(sbp));
1405 if (error && mp->m_mk_sharedro)
1406 xfs_fs_cmn_err(CE_ALERT, mp, "Superblock write error detected while unmounting. Filesystem may not be marked shared readonly");
1407 xfs_buf_relse(sbp); 1381 xfs_buf_relse(sbp);
1408 } 1382 }
1409 return error; 1383 return error;
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index cfdac80f4fc6..2ab2df57b69a 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -301,7 +301,6 @@ typedef struct xfs_mount {
301 int m_sinoalign; /* stripe unit inode alignment */ 301 int m_sinoalign; /* stripe unit inode alignment */
302 int m_attr_magicpct;/* 37% of the blocksize */ 302 int m_attr_magicpct;/* 37% of the blocksize */
303 int m_dir_magicpct; /* 37% of the dir blocksize */ 303 int m_dir_magicpct; /* 37% of the dir blocksize */
304 __uint8_t m_mk_sharedro; /* mark shared ro on unmount */
305 __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ 304 __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
306 const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */ 305 const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */
307 int m_dirblksize; /* directory block sz--bytes */ 306 int m_dirblksize; /* directory block sz--bytes */
@@ -349,7 +348,6 @@ typedef struct xfs_mount {
349#define XFS_MOUNT_ATTR2 (1ULL << 8) /* allow use of attr2 format */ 348#define XFS_MOUNT_ATTR2 (1ULL << 8) /* allow use of attr2 format */
350#define XFS_MOUNT_GRPID (1ULL << 9) /* group-ID assigned from directory */ 349#define XFS_MOUNT_GRPID (1ULL << 9) /* group-ID assigned from directory */
351#define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */ 350#define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */
352#define XFS_MOUNT_SHARED (1ULL << 11) /* shared mount */
353#define XFS_MOUNT_DFLT_IOSIZE (1ULL << 12) /* set default i/o size */ 351#define XFS_MOUNT_DFLT_IOSIZE (1ULL << 12) /* set default i/o size */
354#define XFS_MOUNT_OSYNCISOSYNC (1ULL << 13) /* o_sync is REALLY o_sync */ 352#define XFS_MOUNT_OSYNCISOSYNC (1ULL << 13) /* o_sync is REALLY o_sync */
355 /* osyncisdsync is now default*/ 353 /* osyncisdsync is now default*/