RE: [PATCH 1/7] FIX: Verify Backup file name before reshape

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

 




> -----Original Message-----
> From: NeilBrown [mailto:neilb@xxxxxxx]
> Sent: Wednesday, March 02, 2011 2:02 AM
> To: Kwolek, Adam
> Cc: linux-raid@xxxxxxxxxxxxxxx; Williams, Dan J; Ciechanowski, Ed;
> Neubauer, Wojciech
> Subject: Re: [PATCH 1/7] FIX: Verify Backup file name before reshape
> 
> On Tue, 01 Mar 2011 15:56:50 +0100 Adam Kwolek <adam.kwolek@xxxxxxxxx>
> wrote:
> 
> > When reshape is continued backup_file is required for user data
> safety.
> > Grow_continue() has to verify if any file name is passed in.
> >
> > Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
> > ---
> >
> >  Grow.c |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/Grow.c b/Grow.c
> > index 47b8809..1470a91 100644
> > --- a/Grow.c
> > +++ b/Grow.c
> > @@ -3332,6 +3332,11 @@ int Grow_continue(int mdfd, struct supertype
> *st, struct mdinfo *info,
> >  	char *container = NULL;
> >  	int err;
> >
> > +	if (backup_file == NULL) {
> > +		fprintf(stderr, Name ": Backup file name has to be specified
> "
> > +			"for reshape continuation.\n");
> > +		return 1;
> > +	}
> >  	if (!st->ss->external) {
> >  		err = sysfs_set_str(info, NULL, "array_state", "readonly");
> >  		if (err)
> 
> 
> reshape_array already performs checks to ensure that backup_file is set
> when
> needed - it isn't always needed.
> 
> Is there some reason those checks are not enough?

If container operation will be introduced,
check in reshape_array() will be in forked part of code and Assembly will not know results.

BR
Adam

> 
> 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


[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