lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1351924119-14284-1-git-send-email-linkinjeon@gmail.com>
Date:	Sat,  3 Nov 2012 15:28:39 +0900
From:	Namjae Jeon <linkinjeon@...il.com>
To:	hirofumi@...l.parknet.co.jp, akpm@...ux-foundation.org
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Namjae Jeon <linkinjeon@...il.com>,
	Amit Sahrawat <amit.sahrawat83@...il.com>
Subject: [PATCH v2 2/3] fat: notify when discard is not supported

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

Signed-off-by: Namjae Jeon <linkinjeon@...il.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@...il.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ