diff options
-rw-r--r-- | drivers/md/md.c | 22 | ||||
-rw-r--r-- | drivers/md/md.h | 1 | ||||
-rw-r--r-- | drivers/md/raid1.c | 1 | ||||
-rw-r--r-- | drivers/md/raid5.c | 2 |
4 files changed, 1 insertions, 25 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 69f2a8e6ccdf..f2b30019b1cb 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -4501,7 +4501,6 @@ static int do_md_run(mddev_t * mddev) | |||
4501 | md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ | 4501 | md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ |
4502 | 4502 | ||
4503 | revalidate_disk(mddev->gendisk); | 4503 | revalidate_disk(mddev->gendisk); |
4504 | mddev->changed = 1; | ||
4505 | md_new_event(mddev); | 4504 | md_new_event(mddev); |
4506 | sysfs_notify_dirent(mddev->sysfs_state); | 4505 | sysfs_notify_dirent(mddev->sysfs_state); |
4507 | if (mddev->sysfs_action) | 4506 | if (mddev->sysfs_action) |
@@ -4620,7 +4619,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open) | |||
4620 | } | 4619 | } |
4621 | 4620 | ||
4622 | set_capacity(disk, 0); | 4621 | set_capacity(disk, 0); |
4623 | mddev->changed = 1; | 4622 | revalidate_disk(disk); |
4624 | 4623 | ||
4625 | if (mddev->ro) | 4624 | if (mddev->ro) |
4626 | mddev->ro = 0; | 4625 | mddev->ro = 0; |
@@ -4686,7 +4685,6 @@ out: | |||
4686 | mddev->sync_speed_min = mddev->sync_speed_max = 0; | 4685 | mddev->sync_speed_min = mddev->sync_speed_max = 0; |
4687 | mddev->recovery = 0; | 4686 | mddev->recovery = 0; |
4688 | mddev->in_sync = 0; | 4687 | mddev->in_sync = 0; |
4689 | mddev->changed = 0; | ||
4690 | mddev->degraded = 0; | 4688 | mddev->degraded = 0; |
4691 | mddev->barriers_work = 0; | 4689 | mddev->barriers_work = 0; |
4692 | mddev->safemode = 0; | 4690 | mddev->safemode = 0; |
@@ -5850,7 +5848,6 @@ static int md_open(struct block_device *bdev, fmode_t mode) | |||
5850 | atomic_inc(&mddev->openers); | 5848 | atomic_inc(&mddev->openers); |
5851 | mutex_unlock(&mddev->open_mutex); | 5849 | mutex_unlock(&mddev->open_mutex); |
5852 | 5850 | ||
5853 | check_disk_change(bdev); | ||
5854 | out: | 5851 | out: |
5855 | return err; | 5852 | return err; |
5856 | } | 5853 | } |
@@ -5865,21 +5862,6 @@ static int md_release(struct gendisk *disk, fmode_t mode) | |||
5865 | 5862 | ||
5866 | return 0; | 5863 | return 0; |
5867 | } | 5864 | } |
5868 | |||
5869 | static int md_media_changed(struct gendisk *disk) | ||
5870 | { | ||
5871 | mddev_t *mddev = disk->private_data; | ||
5872 | |||
5873 | return mddev->changed; | ||
5874 | } | ||
5875 | |||
5876 | static int md_revalidate(struct gendisk *disk) | ||
5877 | { | ||
5878 | mddev_t *mddev = disk->private_data; | ||
5879 | |||
5880 | mddev->changed = 0; | ||
5881 | return 0; | ||
5882 | } | ||
5883 | static const struct block_device_operations md_fops = | 5865 | static const struct block_device_operations md_fops = |
5884 | { | 5866 | { |
5885 | .owner = THIS_MODULE, | 5867 | .owner = THIS_MODULE, |
@@ -5890,8 +5872,6 @@ static const struct block_device_operations md_fops = | |||
5890 | .compat_ioctl = md_compat_ioctl, | 5872 | .compat_ioctl = md_compat_ioctl, |
5891 | #endif | 5873 | #endif |
5892 | .getgeo = md_getgeo, | 5874 | .getgeo = md_getgeo, |
5893 | .media_changed = md_media_changed, | ||
5894 | .revalidate_disk= md_revalidate, | ||
5895 | }; | 5875 | }; |
5896 | 5876 | ||
5897 | static int md_thread(void * arg) | 5877 | static int md_thread(void * arg) |
diff --git a/drivers/md/md.h b/drivers/md/md.h index e4836c68b73e..3225e25f3c2a 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -237,7 +237,6 @@ struct mddev_s | |||
237 | atomic_t active; /* general refcount */ | 237 | atomic_t active; /* general refcount */ |
238 | atomic_t openers; /* number of active opens */ | 238 | atomic_t openers; /* number of active opens */ |
239 | 239 | ||
240 | int changed; /* true if we might need to reread partition info */ | ||
241 | int degraded; /* whether md should consider | 240 | int degraded; /* whether md should consider |
242 | * adding a spare | 241 | * adding a spare |
243 | */ | 242 | */ |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index e277013ac808..eebce166dafe 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -2184,7 +2184,6 @@ static int raid1_resize(mddev_t *mddev, sector_t sectors) | |||
2184 | if (mddev->array_sectors > raid1_size(mddev, sectors, 0)) | 2184 | if (mddev->array_sectors > raid1_size(mddev, sectors, 0)) |
2185 | return -EINVAL; | 2185 | return -EINVAL; |
2186 | set_capacity(mddev->gendisk, mddev->array_sectors); | 2186 | set_capacity(mddev->gendisk, mddev->array_sectors); |
2187 | mddev->changed = 1; | ||
2188 | revalidate_disk(mddev->gendisk); | 2187 | revalidate_disk(mddev->gendisk); |
2189 | if (sectors > mddev->dev_sectors && | 2188 | if (sectors > mddev->dev_sectors && |
2190 | mddev->recovery_cp == MaxSector) { | 2189 | mddev->recovery_cp == MaxSector) { |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index c6ae7c194915..231afda1697f 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -5335,7 +5335,6 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors) | |||
5335 | raid5_size(mddev, sectors, mddev->raid_disks)) | 5335 | raid5_size(mddev, sectors, mddev->raid_disks)) |
5336 | return -EINVAL; | 5336 | return -EINVAL; |
5337 | set_capacity(mddev->gendisk, mddev->array_sectors); | 5337 | set_capacity(mddev->gendisk, mddev->array_sectors); |
5338 | mddev->changed = 1; | ||
5339 | revalidate_disk(mddev->gendisk); | 5338 | revalidate_disk(mddev->gendisk); |
5340 | if (sectors > mddev->dev_sectors && mddev->recovery_cp == MaxSector) { | 5339 | if (sectors > mddev->dev_sectors && mddev->recovery_cp == MaxSector) { |
5341 | mddev->recovery_cp = mddev->dev_sectors; | 5340 | mddev->recovery_cp = mddev->dev_sectors; |
@@ -5549,7 +5548,6 @@ static void raid5_finish_reshape(mddev_t *mddev) | |||
5549 | if (mddev->delta_disks > 0) { | 5548 | if (mddev->delta_disks > 0) { |
5550 | md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); | 5549 | md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); |
5551 | set_capacity(mddev->gendisk, mddev->array_sectors); | 5550 | set_capacity(mddev->gendisk, mddev->array_sectors); |
5552 | mddev->changed = 1; | ||
5553 | revalidate_disk(mddev->gendisk); | 5551 | revalidate_disk(mddev->gendisk); |
5554 | } else { | 5552 | } else { |
5555 | int d; | 5553 | int d; |