[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6] libxl: add option for discard support to xl disk configuration
On Mon, 2014-05-19 at 12:51 +0100, Ian Jackson wrote: > Olaf Hering writes ("[PATCH v6] libxl: add option for discard support to xl > disk configuration"): > > Handle new boolean option discard/no-discard for disk configuration. It > > is supposed to disable discard support if file based backing storage was > > intentionally created non-sparse to avoid fragmentation of the file. > > > > The option intended for the backend driver. A new boolean property > > "discard-enable" is written to the backend node. An upcoming patch for > > qemu will make use of this property. The kernel blkback driver may be > > updated as well to disable discard for phy based backing storage. > > Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > > (I made a tiny edit to the doc file as I committed, removing a > spurious comma.) I'm seeing an abort with this change while running under libvirt, although I think it is independent of the toolstack. It corresponds to flexarray_append_pair(back, "discard-enable", libxl_defbool_val(disk->discard_enable) ? "1" : "0"); in device_disk_add(). There is a missing libxl_defbool_setdefault in libxl somewhere and disk->discard_enable is therefore not set to a concrete value. The one added by this patch in xlu_disk_parse is not sufficient because one is not obliged to use that function to parse disks. Although I also think it is wrong for it to be done there -- it should be done in the core libxl library somewhere, libxl__device_disk_setdefault most likely. The other alternative is that the xs key should simply be omitted unless the defbool is set to a specific value. I don't know what the intended semantics are to say which is the correct option. Ian. (gdb) bt #0 0x00007ffff5a9f475 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ffff5aa26f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007ffff5a98621 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #3 0x00007fffeeb2820e in libxl_defbool_val (db=...) at libxl.c:271 #4 0x00007fffeeb2c54c in device_disk_add (egc=egc@entry=0x7ffff4080400, domid=domid@entry=6, disk=0x555555844700, aodev=0x55555583ccb0, get_vdev=get_vdev@entry=0, get_vdev_user=get_vdev_user@entry=0x0) at libxl.c:2222 #5 0x00007fffeeb2c760 in libxl__device_disk_add (egc=egc@entry=0x7ffff4080400, domid=domid@entry=6, disk=<optimized out>, aodev=<optimized out>) at libxl.c:2277 #6 0x00007fffeeb46721 in libxl__add_disks (egc=egc@entry=0x7ffff4080400, ao=ao@entry=0x5555558312e0, domid=domid@entry=6, d_config=d_config@entry=0x7ffff4080580, multidev=multidev@entry=0x55555583e8c0) at libxl_device.c:543 #7 0x00007fffeeb353d2 in domcreate_rebuild_done (egc=egc@entry=0x7ffff4080400, dcs=dcs@entry=0x55555583db90, ret=<optimized out>) at libxl_create.c:1039 #8 0x00007fffeeb37a82 in domcreate_bootloader_done (egc=0x7ffff4080400, bl=0x55555583dc50, rc=<optimized out>) at libxl_create.c:877 #9 0x00007fffeeb566a8 in bootloader_local_detached_cb (egc=0x7ffff4080400, dls=0x55555583dc78, rc=0) at libxl_bootloader.c:281 #10 0x00007fffeeb26a7e in local_device_detach_cb (egc=egc@entry=0x7ffff4080400, aodev=aodev@entry=0x55555583dce8) at libxl.c:2832 #11 0x00007fffeeb2d303 in libxl__device_disk_local_initiate_detach (egc=egc@entry=0x7ffff4080400, dls=dls@entry=0x55555583dc78) at libxl.c:2807 #12 0x00007fffeeb567e5 in bootloader_callback (egc=egc@entry=0x7ffff4080400, bl=bl@entry=0x55555583dc50, rc=rc@entry=0) at libxl_bootloader.c:265 #13 0x00007fffeeb57ce0 in libxl__bootloader_run (egc=egc@entry=0x7ffff4080400, bl=bl@entry=0x55555583dc50) at libxl_bootloader.c:392 #14 0x00007fffeeb38133 in initiate_domain_create (dcs=0x55555583db90, egc=0x7ffff4080400) at libxl_create.c:815 #15 do_domain_create (ctx=0x5555558446c0, d_config=<optimized out>, domid=0x7fffffffffff, restore_fd=restore_fd@entry=-1, checkpointed_stream=checkpointed_stream@entry=0, ao_how=<optimized out>, aop_console_how=0x0) at libxl_create.c:1368 #16 0x00007fffeeb3828b in libxl_domain_create_new (ctx=<optimized out>, d_config=<optimized out>, domid=<optimized out>, ao_how=<optimized out>, aop_console_how=<optimized out>) at libxl_create.c:1391 #17 0x00007fffeed90af1 in libxlDomainStart () from /usr/local/lib/libvirt/connection-driver/libvirt_driver_libxl.so #18 0x00007fffeed92be6 in libxlDomainCreateXML () from /usr/local/lib/libvirt/connection-driver/libvirt_driver_libxl.so #19 0x00007ffff69c2bb0 in virDomainCreateXML () from /usr/local/lib/libvirt.so.0 #20 0x00005555555774b8 in remoteDispatchDomainCreateXML () #21 0x00005555555773de in remoteDispatchDomainCreateXMLHelper () #22 0x00005555555c193f in virNetServerProgramDispatchCall () #23 0x00005555555c14a1 in virNetServerProgramDispatch () #24 0x00005555555b9270 in virNetServerProcessMsg () #25 0x00005555555b9355 in virNetServerHandleJob () #26 0x00007ffff690866f in virThreadPoolWorker () from /usr/local/lib/libvirt.so.0 #27 0x00007ffff6908006 in virThreadHelper () from /usr/local/lib/libvirt.so.0 #28 0x00007ffff641bb50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #29 0x00007ffff5b490ed in clone () from /lib/x86_64-linux-gnu/libc.so.6 #30 0x0000000000000000 in ?? () _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |