diff options
-rw-r--r-- | Documentation/filesystems/xfs.txt | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_super.c | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index 3e4b3dd1e046..83577f0232a0 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt | |||
@@ -33,6 +33,9 @@ When mounting an XFS filesystem, the following options are accepted. | |||
33 | removing extended attributes) the on-disk superblock feature | 33 | removing extended attributes) the on-disk superblock feature |
34 | bit field will be updated to reflect this format being in use. | 34 | bit field will be updated to reflect this format being in use. |
35 | 35 | ||
36 | CRC enabled filesystems always use the attr2 format, and so | ||
37 | will reject the noattr2 mount option if it is set. | ||
38 | |||
36 | barrier | 39 | barrier |
37 | Enables the use of block layer write barriers for writes into | 40 | Enables the use of block layer write barriers for writes into |
38 | the journal and unwritten extent conversion. This allows for | 41 | the journal and unwritten extent conversion. This allows for |
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index ea341cea68cb..3033ba5e9762 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -1373,6 +1373,17 @@ xfs_finish_flags( | |||
1373 | } | 1373 | } |
1374 | 1374 | ||
1375 | /* | 1375 | /* |
1376 | * V5 filesystems always use attr2 format for attributes. | ||
1377 | */ | ||
1378 | if (xfs_sb_version_hascrc(&mp->m_sb) && | ||
1379 | (mp->m_flags & XFS_MOUNT_NOATTR2)) { | ||
1380 | xfs_warn(mp, | ||
1381 | "Cannot mount a V5 filesystem as %s. %s is always enabled for V5 filesystems.", | ||
1382 | MNTOPT_NOATTR2, MNTOPT_ATTR2); | ||
1383 | return XFS_ERROR(EINVAL); | ||
1384 | } | ||
1385 | |||
1386 | /* | ||
1376 | * mkfs'ed attr2 will turn on attr2 mount unless explicitly | 1387 | * mkfs'ed attr2 will turn on attr2 mount unless explicitly |
1377 | * told by noattr2 to turn it off | 1388 | * told by noattr2 to turn it off |
1378 | */ | 1389 | */ |