diff options
author | NeilBrown <neilb@suse.de> | 2010-03-21 19:28:51 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-05-18 01:27:47 -0400 |
commit | c0cc75f84e0e413bce2dcabea74ef418da45c7c1 (patch) | |
tree | f5723fbd0f5828cadaeec650abb8066ad52fad71 | |
parent | 7b92813c3c0b6990f14838e3985fb385d2655d0c (diff) |
md: discard StateChanged device flag.
This was needed when sysfs files could only be 'notified'
from process context. Now that we have sys_notify_direct,
we can call it directly from an interrupt.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | drivers/md/md.c | 7 | ||||
-rw-r--r-- | drivers/md/md.h | 3 |
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index e8d238885cd2..2a64cba9ea72 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5970,7 +5970,7 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev) | |||
5970 | mddev->pers->error_handler(mddev,rdev); | 5970 | mddev->pers->error_handler(mddev,rdev); |
5971 | if (mddev->degraded) | 5971 | if (mddev->degraded) |
5972 | set_bit(MD_RECOVERY_RECOVER, &mddev->recovery); | 5972 | set_bit(MD_RECOVERY_RECOVER, &mddev->recovery); |
5973 | set_bit(StateChanged, &rdev->flags); | 5973 | sysfs_notify_dirent(rdev->sysfs_state); |
5974 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | 5974 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
5975 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 5975 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
5976 | md_wakeup_thread(mddev->thread); | 5976 | md_wakeup_thread(mddev->thread); |
@@ -6962,11 +6962,6 @@ void md_check_recovery(mddev_t *mddev) | |||
6962 | if (mddev->flags) | 6962 | if (mddev->flags) |
6963 | md_update_sb(mddev, 0); | 6963 | md_update_sb(mddev, 0); |
6964 | 6964 | ||
6965 | list_for_each_entry(rdev, &mddev->disks, same_set) | ||
6966 | if (test_and_clear_bit(StateChanged, &rdev->flags)) | ||
6967 | sysfs_notify_dirent(rdev->sysfs_state); | ||
6968 | |||
6969 | |||
6970 | if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) && | 6965 | if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) && |
6971 | !test_bit(MD_RECOVERY_DONE, &mddev->recovery)) { | 6966 | !test_bit(MD_RECOVERY_DONE, &mddev->recovery)) { |
6972 | /* resync/recovery still happening */ | 6967 | /* resync/recovery still happening */ |
diff --git a/drivers/md/md.h b/drivers/md/md.h index 05145786b50f..e4836c68b73e 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -74,9 +74,6 @@ struct mdk_rdev_s | |||
74 | #define Blocked 8 /* An error occured on an externally | 74 | #define Blocked 8 /* An error occured on an externally |
75 | * managed array, don't allow writes | 75 | * managed array, don't allow writes |
76 | * until it is cleared */ | 76 | * until it is cleared */ |
77 | #define StateChanged 9 /* Faulty or Blocked has changed during | ||
78 | * interrupt, so it needs to be | ||
79 | * notified by the thread */ | ||
80 | wait_queue_head_t blocked_wait; | 77 | wait_queue_head_t blocked_wait; |
81 | 78 | ||
82 | int desc_nr; /* descriptor index in the superblock */ | 79 | int desc_nr; /* descriptor index in the superblock */ |