* [PATCH] imsm: FIX: not all disks are released in free_imsm_disks()
@ 2011-01-28 13:37 Adam Kwolek
2011-01-31 0:07 ` NeilBrown
0 siblings, 1 reply; 2+ messages in thread
From: Adam Kwolek @ 2011-01-28 13:37 UTC (permalink / raw)
To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer
Adding spare disks to imsm container fails due to problem with writing
new_dev to sysfs. This problem was caused by not closed handle
(opened exclusively) in Manage.c:803.
Disk handle was not closed by free_imsm().
This is due to not released disk_mgmt_list in free_imsm_disks().
Proper release of imsm metadata allows for spare adding without problems.
Memory leak was fixed also.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---
super-intel.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 958a02b..8bb21dd 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2687,6 +2687,11 @@ static void free_imsm_disks(struct intel_super *super)
super->disks = d->next;
__free_imsm_disk(d);
}
+ while (super->disk_mgmt_list) {
+ d = super->disk_mgmt_list;
+ super->disk_mgmt_list = d->next;
+ __free_imsm_disk(d);
+ }
while (super->missing) {
d = super->missing;
super->missing = d->next;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] imsm: FIX: not all disks are released in free_imsm_disks()
2011-01-28 13:37 [PATCH] imsm: FIX: not all disks are released in free_imsm_disks() Adam Kwolek
@ 2011-01-31 0:07 ` NeilBrown
0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2011-01-31 0:07 UTC (permalink / raw)
To: Adam Kwolek
Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer
On Fri, 28 Jan 2011 14:37:51 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:
> Adding spare disks to imsm container fails due to problem with writing
> new_dev to sysfs. This problem was caused by not closed handle
> (opened exclusively) in Manage.c:803.
>
> Disk handle was not closed by free_imsm().
> This is due to not released disk_mgmt_list in free_imsm_disks().
>
> Proper release of imsm metadata allows for spare adding without problems.
> Memory leak was fixed also.
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
>
> super-intel.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 958a02b..8bb21dd 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -2687,6 +2687,11 @@ static void free_imsm_disks(struct intel_super *super)
> super->disks = d->next;
> __free_imsm_disk(d);
> }
> + while (super->disk_mgmt_list) {
> + d = super->disk_mgmt_list;
> + super->disk_mgmt_list = d->next;
> + __free_imsm_disk(d);
> + }
> while (super->missing) {
> d = super->missing;
> super->missing = d->next;
Applied, thanks.
NeilBrown
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-31 0:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 13:37 [PATCH] imsm: FIX: not all disks are released in free_imsm_disks() Adam Kwolek
2011-01-31 0:07 ` NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).