[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] libxl: problem with devices in PV
On Thu, 2011-07-21 at 10:39 +0100, Roger Pau Monnà wrote: > BTW, would it be ok to create a new disk backend, like LOOP or VND > (LIBXL_DISK_BACKEND_VND)? > > Now it's a bit hackish, since type is always set to phy, I have to > guess the real type by checking if 'params' starts with '/dev' on > xenbackend. I think it would be clearer to set the type to > LIBXL_DISK_BACKEND_VND if passed file is not a block device and OS is > NetBSD in disk_try_backend. The VND stuff is transparent to the toolstack though, it's internal to xenbackendd and the hotplug scripts, all the toolstack sees is a vbd directory in xenstore. So I think it would be better to stick with the phy/vbd types within the toolstack. Can the code in disk_try_backend become: [in some suitable central location:] #if __NetBSD__ #define HAVE_PHY_BACKNED_FILE_SUPPORT #endif [...] case LIBXL_DISK_BACKEND_PHY: if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW || a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) { goto bad_format; } if (a->disk->format == LIBXL_DISK_FORMAT_EMPTY) return backend; #ifdef HAVE_PHY_BACKEND_FILE_SUPPORT if (S_ISREG(a->stab.st_mode)) /* S_ISLNK? */ return backend; #endif if (S_ISBLK(a->stab.st_mode)) return backend; LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend phy" " unsuitable as phys path not a block device" #ifdef HAVE_PHY_... " nor a regular file" #endif , a->disk->vdev); return 0; ? (perhaps the log message construction could be done cleaner) Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |