Re: [PATCH v2 2/3] fat: notify when discard is not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Namjae Jeon <linkinjeon@xxxxxxxxx> writes:

> FAT also notify warning message about discard support
> as ext4(http://patchwork.ozlabs.org/patch/192668/)

Acked-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>

> Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxx>
> Signed-off-by: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>
> ---
>  fs/fat/inode.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 8d79657..3b48bab 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -26,6 +26,7 @@
>  #include <linux/writeback.h>
>  #include <linux/log2.h>
>  #include <linux/hash.h>
> +#include <linux/blkdev.h>
>  #include <asm/unaligned.h>
>  #include "fat.h"
>  
> @@ -1446,6 +1447,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:

-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux