diff options
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index c996f4ae4a5f..584cf2d573ba 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -1654,6 +1654,16 @@ xfs_fs_fill_super( | |||
1654 | "DAX and reflink have not been tested together!"); | 1654 | "DAX and reflink have not been tested together!"); |
1655 | } | 1655 | } |
1656 | 1656 | ||
1657 | if (mp->m_flags & XFS_MOUNT_DISCARD) { | ||
1658 | struct request_queue *q = bdev_get_queue(sb->s_bdev); | ||
1659 | |||
1660 | if (!blk_queue_discard(q)) { | ||
1661 | xfs_warn(mp, "mounting with \"discard\" option, but " | ||
1662 | "the device does not support discard"); | ||
1663 | mp->m_flags &= ~XFS_MOUNT_DISCARD; | ||
1664 | } | ||
1665 | } | ||
1666 | |||
1657 | if (xfs_sb_version_hasrmapbt(&mp->m_sb)) { | 1667 | if (xfs_sb_version_hasrmapbt(&mp->m_sb)) { |
1658 | if (mp->m_sb.sb_rblocks) { | 1668 | if (mp->m_sb.sb_rblocks) { |
1659 | xfs_alert(mp, | 1669 | xfs_alert(mp, |