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.hawrylewicz.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. > +++ 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. 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