|
@@ -2833,6 +2833,12 @@ sync_max_store(mddev_t *mddev, const char *buf, size_t len)
|
|
static struct md_sysfs_entry md_sync_max =
|
|
static struct md_sysfs_entry md_sync_max =
|
|
__ATTR(sync_speed_max, S_IRUGO|S_IWUSR, sync_max_show, sync_max_store);
|
|
__ATTR(sync_speed_max, S_IRUGO|S_IWUSR, sync_max_show, sync_max_store);
|
|
|
|
|
|
|
|
+static ssize_t
|
|
|
|
+degraded_show(mddev_t *mddev, char *page)
|
|
|
|
+{
|
|
|
|
+ return sprintf(page, "%d\n", mddev->degraded);
|
|
|
|
+}
|
|
|
|
+static struct md_sysfs_entry md_degraded = __ATTR_RO(degraded);
|
|
|
|
|
|
static ssize_t
|
|
static ssize_t
|
|
sync_speed_show(mddev_t *mddev, char *page)
|
|
sync_speed_show(mddev_t *mddev, char *page)
|
|
@@ -2976,6 +2982,7 @@ static struct attribute *md_redundancy_attrs[] = {
|
|
&md_suspend_lo.attr,
|
|
&md_suspend_lo.attr,
|
|
&md_suspend_hi.attr,
|
|
&md_suspend_hi.attr,
|
|
&md_bitmap.attr,
|
|
&md_bitmap.attr,
|
|
|
|
+ &md_degraded.attr,
|
|
NULL,
|
|
NULL,
|
|
};
|
|
};
|
|
static struct attribute_group md_redundancy_group = {
|
|
static struct attribute_group md_redundancy_group = {
|