RE: [PATCH 26/33] added --path <path_id> to give the information on the 'path-id' of removed device

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

 



> -----Original Message-----
> From: linux-raid-owner@xxxxxxxxxxxxxxx [mailto:linux-raid-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Neil Brown
> Sent: Tuesday, July 06, 2010 9:15 AM
> To: Czarnowska, Anna
> Cc: linux-raid@xxxxxxxxxxxxxxx; Hawrylewicz Czarnowski, Przemyslaw;
> Labun, Marcin; Neubauer, Wojciech; Williams, Dan J; Ciechanowski, Ed;
> dledford@xxxxxxxxxx
> Subject: Re: [PATCH 26/33] added --path <path_id> to give the
> information on the 'path-id' of removed device
> 
> On Mon, 5 Jul 2010 10:40:13 +0100
> "Czarnowska, Anna" <anna.czarnowska@xxxxxxxxx> wrote:
> 
> > From: Przemyslaw Czarnowski
> <przemyslaw.hawrylewicz.czarnowski@xxxxxxxxx>
> >
> >
> >
> > <path-id> allows to identify the port to which given device is
> plugged in. In case of hot-removal, udev can pass this information for
> future use (eg. write this name as 'cookie' allowing to detect the fact
> of reinserting device to the same port).
> >
> > --path <path-id> parameter has been added to device removal handle
> (and char *path has been added to IncrementalRemove() to pass this
> value) in order to pass path-id to this handler.
> >
> >
> >
> > Signed-off-by: Przemyslaw Czarnowski
> <przemyslaw.hawrylewicz.czarnowski@xxxxxxxxx<mailto:przemyslaw.hawrylew
> icz.czarnowski@xxxxxxxxx>>
> >
> > ---
> >
> >  Incremental.c |    8 +++++++-
> >
> >  ReadMe.c      |    2 ++
> >
> >  mdadm.c       |   15 ++++++++++++---
> >
> >  mdadm.h       |    6 +++++-
> >
> >  4 files changed, 26 insertions(+), 5 deletions(-)
> >
> >
> >
> > diff --git a/Incremental.c b/Incremental.c index 4f52e3b..20e3445
> 100644
> >
> > --- a/Incremental.c
> >
> > +++ b/Incremental.c
> >
> > @@ -941,13 +941,19 @@ int Incremental_container(struct supertype *st,
> char *devname, int verbose,
> >
> >   * Note: the device name must be a kernel name like "sda", so
> >
> >   * that we can find it in /proc/mdstat
> >
> >   */
> >
> > -int IncrementalRemove(char *devname, int verbose)
> >
> > +int IncrementalRemove(char *devname, char *path, int verbose)
> >
> >  {
> >
> >       int mdfd;
> >
> >       int rv;
> >
> >       struct mdstat_ent *ent;
> >
> >       struct mddev_dev_s devlist;
> >
> >
> >
> > +     if (!path) {
> >
> > +           fprintf(stderr, Name ": incremental removal without --
> path <path_id> lacks "
> >
> > +                 "the possibility to re-add new device in this
> port\n");
> >
> > +           return 1;
> >
> > +     }
> >
> > +
> 
> 
> It may be appropriate to give a warning here (though I doubt it).  It
> is
> certainly no appropriate to fail IncrementalRemove just because no path
> was
> specified.
Ok, seems reasonable, thanks
> 
> 
> > +++ b/mdadm.h
> >
> > @@ -275,6 +275,9 @@ enum special_options {
> >
> >       AutoDetect,
> >
> >       Waitclean,
> >
> >       DetailPlatform,
> >
> > +     HotPlug,
> >
> > +     HotUnplug,
> >
> > +     IncrementalPath
> >
> >  };
> 
> Please only add options here as you actually use them.
> Hotplug and HotUnplug are not used, so should not be here.
Good catch. I'll remove it. It's a part of an old code...

> 
> NeilBrown
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid"
> in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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