From: Namjae Jeon <linkinjeon@gmail.com>
To: hirofumi@mail.parknet.co.jp, akpm@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Namjae Jeon <linkinjeon@gmail.com>,
Amit Sahrawat <amit.sahrawat83@gmail.com>
Subject: [PATCH 2/3] fat: notify when discard is not supported
Date: Sat, 3 Nov 2012 14:27:43 +0900 [thread overview]
Message-ID: <1351920463-3289-1-git-send-email-linkinjeon@gmail.com> (raw)
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 | 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
reply other threads:[~2012-11-03 5:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351920463-3289-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=amit.sahrawat83@gmail.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).