FAT also notify warning message about discard support as ext4(http://patchwork.ozlabs.org/patch/192668/) Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxx> Signed-off-by: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx> --- fs/fat/inode.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index d077f57..672dc71 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1446,6 +1446,14 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, goto out_fail; } + if (sbi->options.discard) { + struct request_queue *q = bdev_get_queue(sb->s_bdev); + if (!blk_queue_discard(q)) + fat_msg(sb, KERN_WARNING, + "mounting with \"discard\" option, but " + "the device does not support discard"); + } + return 0; out_invalid: -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html