diff options
author | NeilBrown <neilb@suse.de> | 2010-06-01 05:37:23 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-07-20 23:27:53 -0400 |
commit | 00bcb4ac7ee7e557a491b614219142cea0ef16f4 (patch) | |
tree | 992cfa1d0e653aa3de8f0865c5e1a5a0fee4f935 /drivers/md/raid5.c | |
parent | d0c6f6258478e1dba532bf7c28e2cd6e1047d3a4 (diff) |
md: reduce dependence on sysfs.
We will want md devices to live as dm targets where sysfs is not
visible. So allow md to not connect to sysfs.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 96c690279fc6..6a7a30113161 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -5158,7 +5158,8 @@ static int run(mddev_t *mddev) | |||
5158 | /* Ok, everything is just fine now */ | 5158 | /* Ok, everything is just fine now */ |
5159 | if (mddev->to_remove == &raid5_attrs_group) | 5159 | if (mddev->to_remove == &raid5_attrs_group) |
5160 | mddev->to_remove = NULL; | 5160 | mddev->to_remove = NULL; |
5161 | else if (sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) | 5161 | else if (mddev->kobj.sd && |
5162 | sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) | ||
5162 | printk(KERN_WARNING | 5163 | printk(KERN_WARNING |
5163 | "md/raid:%s: failed to create sysfs attributes.\n", | 5164 | "md/raid:%s: failed to create sysfs attributes.\n", |
5164 | mdname(mddev)); | 5165 | mdname(mddev)); |
@@ -5545,10 +5546,7 @@ static int raid5_start_reshape(mddev_t *mddev) | |||
5545 | sprintf(nm, "rd%d", rdev->raid_disk); | 5546 | sprintf(nm, "rd%d", rdev->raid_disk); |
5546 | if (sysfs_create_link(&mddev->kobj, | 5547 | if (sysfs_create_link(&mddev->kobj, |
5547 | &rdev->kobj, nm)) | 5548 | &rdev->kobj, nm)) |
5548 | printk(KERN_WARNING | 5549 | /* Failure here is OK */; |
5549 | "md/raid:%s: failed to create " | ||
5550 | " link %s\n", | ||
5551 | mdname(mddev), nm); | ||
5552 | } else | 5550 | } else |
5553 | break; | 5551 | break; |
5554 | } | 5552 | } |