* [PATCH] Reset bad flag on map update
@ 2012-03-07 12:51 Czarnowska, Anna
2012-03-07 22:26 ` NeilBrown
0 siblings, 1 reply; 2+ messages in thread
From: Czarnowska, Anna @ 2012-03-07 12:51 UTC (permalink / raw)
To: NeilBrown
Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
Grabowski, Grzegorz
Map file may miss an entry if bad flag is not cleared on update.
This happens for example when an old entry exists in map that
has no mdstat counterpart and we create a new array with the same devnum.
Newly created array will not appear in map if update doesnt clear bad flag.
Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
---
mapfile.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mapfile.c b/mapfile.c
index 0bfecd0..9e2c893 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -246,6 +246,7 @@ int map_update(struct map_ent **mpp, int devnum, char *metadata,
memcpy(mp->uuid, uuid, 16);
free(mp->path);
mp->path = path ? strdup(path) : NULL;
+ mp->bad = 0;
break;
}
if (!mp)
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Reset bad flag on map update
2012-03-07 12:51 [PATCH] Reset bad flag on map update Czarnowska, Anna
@ 2012-03-07 22:26 ` NeilBrown
0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2012-03-07 22:26 UTC (permalink / raw)
To: Czarnowska, Anna
Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
Grabowski, Grzegorz
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
On Wed, 7 Mar 2012 12:51:30 +0000 "Czarnowska, Anna"
<anna.czarnowska@intel.com> wrote:
> Map file may miss an entry if bad flag is not cleared on update.
>
> This happens for example when an old entry exists in map that
> has no mdstat counterpart and we create a new array with the same devnum.
> Newly created array will not appear in map if update doesnt clear bad flag.
>
> Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
> ---
> mapfile.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/mapfile.c b/mapfile.c
> index 0bfecd0..9e2c893 100644
> --- a/mapfile.c
> +++ b/mapfile.c
> @@ -246,6 +246,7 @@ int map_update(struct map_ent **mpp, int devnum, char *metadata,
> memcpy(mp->uuid, uuid, 16);
> free(mp->path);
> mp->path = path ? strdup(path) : NULL;
> + mp->bad = 0;
> break;
> }
> if (!mp)
applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-07 22:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 12:51 [PATCH] Reset bad flag on map update Czarnowska, Anna
2012-03-07 22:26 ` 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).