diff options
author | NeilBrown <neilb@suse.de> | 2010-04-14 03:15:37 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-05-17 00:45:40 -0400 |
commit | a64c876fd357906a1f7193723866562ad290654c (patch) | |
tree | 077fcdab730d40227585025bf15bf8e027949a29 /drivers/md/md.h | |
parent | b6eb127d274385d81ce8dd45c98190f097bce1b4 (diff) |
md: manage redundancy group in sysfs when changing level.
Some levels expect the 'redundancy group' to be present,
others don't.
So when we change level of an array we might need to
add or remove this group.
This requires fixing up the current practice of overloading ->private
to indicate (when ->pers == NULL) that something needs to be removed.
So create a new ->to_remove to fill that role.
When changing levels, we may need to add or remove attributes. When
changing RAID5 -> RAID6, we both add and remove the same thing. It is
important to catch this and optimise it out as the removal is delayed
until a lock is released, so trying to add immediately would cause
problems.
Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 8e4c75c00d46..722f5dfe1953 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -305,6 +305,7 @@ struct mddev_s | |||
305 | atomic_t max_corr_read_errors; /* max read retries */ | 305 | atomic_t max_corr_read_errors; /* max read retries */ |
306 | struct list_head all_mddevs; | 306 | struct list_head all_mddevs; |
307 | 307 | ||
308 | struct attribute_group *to_remove; | ||
308 | /* Generic barrier handling. | 309 | /* Generic barrier handling. |
309 | * If there is a pending barrier request, all other | 310 | * If there is a pending barrier request, all other |
310 | * writes are blocked while the devices are flushed. | 311 | * writes are blocked while the devices are flushed. |