* [PATCH v2 2/3] fat: notify when discard is not supported
@ 2012-11-03 6:28 Namjae Jeon
2012-11-05 10:53 ` OGAWA Hirofumi
0 siblings, 1 reply; 2+ messages in thread
From: Namjae Jeon @ 2012-11-03 6:28 UTC (permalink / raw)
To: hirofumi, akpm; +Cc: linux-fsdevel, linux-kernel, Namjae Jeon, Amit Sahrawat
FAT also notify warning message about discard support
as ext4(http://patchwork.ozlabs.org/patch/192668/)
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
---
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:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/3] fat: notify when discard is not supported
2012-11-03 6:28 [PATCH v2 2/3] fat: notify when discard is not supported Namjae Jeon
@ 2012-11-05 10:53 ` OGAWA Hirofumi
0 siblings, 0 replies; 2+ messages in thread
From: OGAWA Hirofumi @ 2012-11-05 10:53 UTC (permalink / raw)
To: Namjae Jeon; +Cc: akpm, linux-fsdevel, linux-kernel, Amit Sahrawat
Namjae Jeon <linkinjeon@gmail.com> writes:
> FAT also notify warning message about discard support
> as ext4(http://patchwork.ozlabs.org/patch/192668/)
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
> Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
> ---
> 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@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-05 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-03 6:28 [PATCH v2 2/3] fat: notify when discard is not supported Namjae Jeon
2012-11-05 10:53 ` OGAWA Hirofumi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).