Re: [PATCH] Reset bad flag on map update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Mar 2012 12:51:30 +0000 "Czarnowska, Anna"
<anna.czarnowska@xxxxxxxxx> 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@xxxxxxxxx>
> ---
>  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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux