Roger Pau Monne writes ("[PATCH v4 4/4] libxl: fix cd-eject"): > Current libxl__device_disk_set_backend implementation tried to guess the > backend of devices with format LIBXL_DISK_FORMAT_EMPTY, which is of course > doomed to fail since the disk is empty. Instead just return early from the > function if an empty disk is detected. > > This fixes cd ejection.
DYK when this was broken ? Or, to put it another way, how did this ever work ? ...looking at the code... AFAICT disk_try_backend should succeed for both LIBXL_DISK_BACKEND_PHY and LIBXL_DISK_BACKEND_QDISK. So even before your patch: > } > - memset(&a.stab, 0, sizeof(a.stab)); > + /* Disk is empty, so it's useless to try to guess the backend type. > */ > + return 0; > } else if ((disk->backend == LIBXL_DISK_BACKEND_UNKNOWN || libxl__device_disk_set_backend should work. Worse, this change seems to leave disk->backend unset on return from libxl__device_disk_set_backend, which seems quite wrong to me. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel