Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13503
b: refs/heads/master
c: 411036f
h: refs/heads/master
i:
  13501: 5c53add
  13499: caec343
  13495: f39b90e
  13487: f92f315
  13471: 0b31cc2
  13439: 93e7cd1
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Nov 9, 2005
1 parent 8b07270 commit 3352403
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96de1e663cda65ba9275afb1bc007f34e5068ba1
refs/heads/master: 411036fa1924f5e5b0f7f9d04ae5d8cdc72fb839
14 changes: 14 additions & 0 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -1807,10 +1807,19 @@ md_mismatches = __ATTR_RO(mismatch_cnt);
static struct attribute *md_default_attrs[] = {
&md_level.attr,
&md_raid_disks.attr,
NULL,
};

static struct attribute *md_redundancy_attrs[] = {
&md_scan_mode.attr,
&md_mismatches.attr,
NULL,
};
static struct attribute_group md_redundancy_group = {
.name = NULL,
.attrs = md_redundancy_attrs,
};


static ssize_t
md_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
Expand Down Expand Up @@ -2047,6 +2056,8 @@ static int do_md_run(mddev_t * mddev)
bitmap_destroy(mddev);
return err;
}
if (mddev->pers->sync_request)
sysfs_create_group(&mddev->kobj, &md_redundancy_group);
atomic_set(&mddev->writes_pending,0);
mddev->safemode = 0;
mddev->safemode_timer.function = md_safemode_timeout;
Expand Down Expand Up @@ -2155,6 +2166,9 @@ static int do_md_stop(mddev_t * mddev, int ro)
set_disk_ro(disk, 0);
blk_queue_make_request(mddev->queue, md_fail_request);
mddev->pers->stop(mddev);
if (mddev->pers->sync_request)
sysfs_remove_group(&mddev->kobj, &md_redundancy_group);

module_put(mddev->pers->owner);
mddev->pers = NULL;
if (mddev->ro)
Expand Down

0 comments on commit 3352403

Please sign in to comment.