File md-display-timeout-error.patch of Package linux-glibc-devel.29113
From: Hannes Reinecke <hare@suse.com>
Date: Thu, 12 Jul 2012 08:36:52 +0200
Subject: md: display timeout errors in /etc/mdstat etc
Patch-mainline: Not yet, failfast is poorly defined
References: bnc#763402
Track whether a device failed due to a timeout or some other reason.
If due to a timeout, set a flag so that it can be reported.
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Neil Brown <neilb@suse.de>
---
drivers/md/md.c | 44 +++++++++++++++++++++++++++++++-------
drivers/md/md.h | 3 ++
drivers/md/raid10.c | 47 +++++++++++++++++++++++++++++++++++------
drivers/md/raid10.h | 1
include/uapi/linux/raid/md_p.h | 2 +
5 files changed, 83 insertions(+), 14 deletions(-)
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -89,6 +89,7 @@
* devices available - and don't try to
* correct read errors.
*/
+#define MD_DISK_TIMEOUT 11 /* disk is faulty due to timeout */
#define MD_DISK_WRITEMOSTLY 9 /* disk is "write-mostly" is RAID1 config.
* read requests will only be sent here in
@@ -99,6 +100,7 @@
#define MD_DISK_ROLE_SPARE 0xffff
#define MD_DISK_ROLE_FAULTY 0xfffe
#define MD_DISK_ROLE_JOURNAL 0xfffd
+#define MD_DISK_ROLE_TIMEOUT 0xfff0 /* SUSE-only timed-out */
#define MD_DISK_ROLE_MAX 0xff00 /* max value of regular disk role */
typedef struct mdp_device_descriptor_s {