Re: mdadm/Monitor.c - never removes MD devices from statelist

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

 



On Mon, 12 Sep 2011 11:32:23 +0300 Alexander Lyakas <alex.bolshoy@xxxxxxxxx>
wrote:

> Hello Neil,
> yes, I will try to produce a patch (although I am using git, I have
> never done patches yet).

If you are using git, then patches are easy:

 git show --format=email


> 
> But I don't understand why do you require 'err' to be set. I would say
> that when there is a "DeviceDisappeared" event plus --scan is set,
> then you should remove. (And also perhaps if this array does not
> appear in the device list provided by the user).

A DeviceDisappeared event sets ->err to 1.  So testing ->err is an easy way
to test if the device disappeated.

It doesn't matter if the device was listed by the user: if --scan is set we
will find it again anyway.

NeilBrown


> 
> Alex.
> 
> 
> On Mon, Sep 12, 2011 at 6:36 AM, NeilBrown <neilb@xxxxxxx> wrote:
> > On Sun, 11 Sep 2011 21:32:12 +0300 Alexander Lyakas <alex.bolshoy@xxxxxxxxx>
> > wrote:
> >
> >> Hi everybody,
> >> looking at the code of Monitor.c and doing some tests with it, I see
> >> that it is capable of detecting new arrays, when they appear in
> >> /proc/mdstat (if --scan is given). However, once array is added to
> >> 'statelist', it is never removed from there. Is this intentional?
> >> Perhaps only if --scan is given, and device disappears from
> >> /proc/mdstat, then it should be removed from monitoring, otherwise it
> >> could stick there forever, even though the array has been gone long
> >> time ago. And if it appears again, it will be picked up anyways.
> >>
> >
> > You are right - arrays are never removed.
> >
> > Is that a problem?  Probably not, though I guess you could probably create
> > a scenario where there were lots of inactive devices cluttering memory.
> >
> > Is it worth fixing?  I don't know - it depends on how intrusive the patch is.
> > We would only want to remove arrays with ->err set if 'scan' was set, but
> > when it is, it possible makes sense.
> >
> > Want to try creating a patch?
> >
> > 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