* mdadm/Monitor.c - never removes MD devices from statelist @ 2011-09-11 18:32 Alexander Lyakas 2011-09-12 3:36 ` NeilBrown 0 siblings, 1 reply; 4+ messages in thread From: Alexander Lyakas @ 2011-09-11 18:32 UTC (permalink / raw) To: linux-raid 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. Thanks, Alex. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mdadm/Monitor.c - never removes MD devices from statelist 2011-09-11 18:32 mdadm/Monitor.c - never removes MD devices from statelist Alexander Lyakas @ 2011-09-12 3:36 ` NeilBrown 2011-09-12 8:32 ` Alexander Lyakas 0 siblings, 1 reply; 4+ messages in thread From: NeilBrown @ 2011-09-12 3:36 UTC (permalink / raw) To: Alexander Lyakas; +Cc: linux-raid On Sun, 11 Sep 2011 21:32:12 +0300 Alexander Lyakas <alex.bolshoy@gmail.com> 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mdadm/Monitor.c - never removes MD devices from statelist 2011-09-12 3:36 ` NeilBrown @ 2011-09-12 8:32 ` Alexander Lyakas 2011-09-21 5:06 ` NeilBrown 0 siblings, 1 reply; 4+ messages in thread From: Alexander Lyakas @ 2011-09-12 8:32 UTC (permalink / raw) To: NeilBrown; +Cc: linux-raid Hello Neil, yes, I will try to produce a patch (although I am using git, I have never done patches yet). 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). Alex. On Mon, Sep 12, 2011 at 6:36 AM, NeilBrown <neilb@suse.de> wrote: > On Sun, 11 Sep 2011 21:32:12 +0300 Alexander Lyakas <alex.bolshoy@gmail.com> > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mdadm/Monitor.c - never removes MD devices from statelist 2011-09-12 8:32 ` Alexander Lyakas @ 2011-09-21 5:06 ` NeilBrown 0 siblings, 0 replies; 4+ messages in thread From: NeilBrown @ 2011-09-21 5:06 UTC (permalink / raw) To: Alexander Lyakas; +Cc: linux-raid [-- Attachment #1: Type: text/plain, Size: 2071 bytes --] On Mon, 12 Sep 2011 11:32:23 +0300 Alexander Lyakas <alex.bolshoy@gmail.com> 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@suse.de> wrote: > > On Sun, 11 Sep 2011 21:32:12 +0300 Alexander Lyakas <alex.bolshoy@gmail.com> > > 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 #2: signature.asc --] [-- Type: application/pgp-signature, Size: 190 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-21 5:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-09-11 18:32 mdadm/Monitor.c - never removes MD devices from statelist Alexander Lyakas 2011-09-12 3:36 ` NeilBrown 2011-09-12 8:32 ` Alexander Lyakas 2011-09-21 5:06 ` NeilBrown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox