summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2017-11-03 22:10:18 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-03 22:10:18 +0800
commitab387f0af24e661fc1c2f609664ec9ae6618e3f0 (patch)
tree6254d174314b1bcce11ce28f1aadf0df93e25d8e /fs/xfs/xfs_super.c
parente666d4e9ceec94c0a88c94b7db31d56474da43b3 (diff)
parent9e66317d3c92ddaab330c125dfe9d06eee268aff (diff)
downloadlinux-ab387f0af24e661fc1c2f609664ec9ae6618e3f0.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merge 4.14-rc3 in order to pick up the new timer_setup function.
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c10
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(
"DAX and reflink have not been tested together!");
}
+ if (mp->m_flags & XFS_MOUNT_DISCARD) {
+ struct request_queue *q = bdev_get_queue(sb->s_bdev);
+
+ if (!blk_queue_discard(q)) {
+ xfs_warn(mp, "mounting with \"discard\" option, but "
+ "the device does not support discard");
+ mp->m_flags &= ~XFS_MOUNT_DISCARD;
+ }
+ }
+
if (xfs_sb_version_hasrmapbt(&mp->m_sb)) {
if (mp->m_sb.sb_rblocks) {
xfs_alert(mp,