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

Re: [Xen-devel] [RFC Patch v4 9/9] update libxl__device_disk_from_xs_be() to support blktap device



On Tue, 2014-09-23 at 11:07 +0800, Wen Congyang wrote:
> >> +        if (disk->format != LIBXL_DISK_FORMAT_VHD &&
> >> +            disk->format != LIBXL_DISK_FORMAT_RAW) {
> >> +            LOG(ERROR, "unsupported tapdisk format: %s\n", tmp);
> > 
> > Hrm, if we get here then is there any reason to reject this? obviously
> > something wrote it etc.
> 
> Hmm, we can get here only when the xenstore node is corrupted.
> 
> > 
> > This function is supposed to read the current state and return it, I'm
> > not sure it should be rejecting what it finds TBH, and it would simplify
> > things not to do so.
> 
> The xenstore node is corrupted, what should we do? Ignore this disk or return
> error?

I think if it contains a valid format string you should just continue
using that value, rather than trying to second guess what other code may
or may not have written.

If it contains some completely corrupt value then you should error out,
which IIRC you do already in the error handling of the from_string call)

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.