search for: drv_index

Displaying 20 results from an estimated 40 matches for "drv_index".

2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
...eep track of the number of hvc consoles * spawned by this driver. This number is given as the first @@ -169,9 +166,6 @@ struct ports_device { /* Array of per-port IO virtqueues */ struct virtqueue **in_vqs, **out_vqs; - /* Used for numbering devices for sysfs and debugfs */ - unsigned int drv_index; - /* Major number for this device. Ports will be created as minors. */ int chr_major; }; @@ -1415,7 +1409,7 @@ static int add_port(struct ports_device *portdev, u32 id) } port->dev = device_create(pdrvdata.class, &port->portdev->vdev->dev, devt, port, "vport%u...
2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
...eep track of the number of hvc consoles * spawned by this driver. This number is given as the first @@ -169,9 +166,6 @@ struct ports_device { /* Array of per-port IO virtqueues */ struct virtqueue **in_vqs, **out_vqs; - /* Used for numbering devices for sysfs and debugfs */ - unsigned int drv_index; - /* Major number for this device. Ports will be created as minors. */ int chr_major; }; @@ -1415,7 +1409,7 @@ static int add_port(struct ports_device *portdev, u32 id) } port->dev = device_create(pdrvdata.class, &port->portdev->vdev->dev, devt, port, "vport%u...
2012 Oct 08
5
[PATCH v4 0/5] Finish hotplugging support.
This rounds off hotplugging support by allowing you to add and remove drives at any stage (before and after launch). Rich.
2012 Oct 08
1
[PATCH][RFC] launch: appliance is optional
...aunch-libvirt.c +++ b/src/launch-libvirt.c @@ -936,6 +936,10 @@ construct_libvirt_xml_appliance (guestfs_h *g, xmlTextWriterPtr xo, char drive_name[64] = "sd"; char scsi_target[64]; + /* appliance is optional */ + if (appliance == NULL) + return 0; + guestfs___drive_name (drv_index, &drive_name[2]); snprintf (scsi_target, sizeof scsi_target, "%zu", drv_index); -- 1.7.12.1
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...ot; label=" : "", + drv->disk_label ? : "", + drv->use_cache_none ? " cache=none" : ""); +} + /* Add struct drive to the g->drives vector at the given index. */ static void add_drive_to_handle_at (guestfs_h *g, struct drive *d, size_t drv_index) @@ -162,7 +246,7 @@ guestfs___add_dummy_appliance_drive (guestfs_h *g) { struct drive *drv; - drv = create_dummy_drive_struct (g); + drv = create_drive_dummy (g); add_drive_to_handle (g, drv); } @@ -183,6 +267,48 @@ guestfs___free_drives (guestfs_h *g) g->nr_drives = 0; } +/...
2012 Oct 08
3
[PATCH v3 0/3] Add support for disk labels and hotplugging.
This is, I guess, version 3 of this patch series which adds disk labels and hotplugging (only hot-add implemented so far). The good news is .. it works! Rich.
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again. These two patches stop using it entirely. Instead we run 'qemu-img create' to create overlay disks as required. Note that the libvirt and UML backends were already doing this: The libvirt backend because <transient/> has never worked, and the UML backend was running uml_mkcow because the UML-equivalent syntax of snapshot=on was
2015 Nov 09
6
[PATCH 0/5] build: Enable some more warnings.
Add some warnings. Well, the first patch is a miscellaneous change, but patches 2-5 add some warnings. Rich.
2012 Jul 21
8
[PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.
This preliminary patch series adds a libvirt backend to libguestfs. It's for review only because although it launches the guest OK, there are some missing features that need to be implemented. The meat of the patch is in part 4/4. To save you the trouble of interpreting libxml2 fragments, an example of the generated XML and the corresponding qemu command line are attached below. Note the
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...index f2cad9300..4ce2fa683 100644 > --- a/lib/launch-libvirt.c > +++ b/lib/launch-libvirt.c > @@ -1043,6 +1043,7 @@ static int construct_libvirt_xml_disk (guestfs_h *g, const struct backend_libvir > static int construct_libvirt_xml_disk_target (guestfs_h *g, xmlTextWriterPtr xo, size_t drv_index); > static int construct_libvirt_xml_disk_driver_qemu (guestfs_h *g, const struct backend_libvirt_data *data, struct drive *drv, xmlTextWriterPtr xo, const char *format, const char *cachemode, enum discard discard, bool copyonread); > static int construct_libvirt_xml_disk_address (guestfs_h...
2020 Feb 07
8
[RFC] lib: allow to specify physical/logical block size for disks
...ib/launch-libvirt.c index f2cad9300..4ce2fa683 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1043,6 +1043,7 @@ static int construct_libvirt_xml_disk (guestfs_h *g, const struct backend_libvir static int construct_libvirt_xml_disk_target (guestfs_h *g, xmlTextWriterPtr xo, size_t drv_index); static int construct_libvirt_xml_disk_driver_qemu (guestfs_h *g, const struct backend_libvirt_data *data, struct drive *drv, xmlTextWriterPtr xo, const char *format, const char *cachemode, enum discard discard, bool copyonread); static int construct_libvirt_xml_disk_address (guestfs_h *g, xmlTe...
2012 Jun 12
5
[PATCH 0/5] Assorted patches to add virtio-scsi support.
These assorted patches end up with adding virtio-scsi support to libguestfs. It passes libguestfs-test-tool, but I haven't yet tried to run the full set of tests. In theory > 26 devices can be added, but it's likely that certain parts of the daemon will break if you actually try this. This of course needs to be fixed. Thanks Paolo Bonzini for invaluable help. Rich.
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...k_label) { start_element ("serial") { - string (drv->disk_label); + string ("%s", drv->disk_label); } end_element (); } @@ -1597,7 +1534,7 @@ construct_libvirt_xml_disk_target (guestfs_h *g, xmlTextWriterPtr xo, guestfs_int_drive_name (drv_index, &drive_name[2]); start_element ("target") { - attribute ("dev", drive_name); + attribute ("dev", "%s", drive_name); attribute ("bus", "scsi"); } end_element (); @@ -1642,8 +1579,8 @@ construct_libvirt_xml_disk_dri...
2014 Mar 10
5
[PATCH 0/3] Add discard support.
These patches contain the beginnings of discard (a.k.a. trim or unmap) support. This will allow us to change virt-sparsify to work on disk images in-place (instead of using slow & inefficient copying). The approach used is to add an optional 'discard' parameter to add-drive. It has 3 possible settings: - 'disable' : the default, no discard is done - 'besteffort' :
2012 Jun 12
9
[PATCH v2 0/9]
More comprehensive support for virtio-scsi. Passes all the tests. Rich.
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...ib/launch-libvirt.c index f2cad9300..49786fdd9 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1043,6 +1043,7 @@ static int construct_libvirt_xml_disk (guestfs_h *g, const struct backend_libvir static int construct_libvirt_xml_disk_target (guestfs_h *g, xmlTextWriterPtr xo, size_t drv_index); static int construct_libvirt_xml_disk_driver_qemu (guestfs_h *g, const struct backend_libvirt_data *data, struct drive *drv, xmlTextWriterPtr xo, const char *format, const char *cachemode, enum discard discard, bool copyonread); static int construct_libvirt_xml_disk_address (guestfs_h *g, xmlTe...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...ib/launch-libvirt.c index f2cad9300..49786fdd9 100644 --- a/lib/launch-libvirt.c +++ b/lib/launch-libvirt.c @@ -1043,6 +1043,7 @@ static int construct_libvirt_xml_disk (guestfs_h *g, const struct backend_libvir static int construct_libvirt_xml_disk_target (guestfs_h *g, xmlTextWriterPtr xo, size_t drv_index); static int construct_libvirt_xml_disk_driver_qemu (guestfs_h *g, const struct backend_libvirt_data *data, struct drive *drv, xmlTextWriterPtr xo, const char *format, const char *cachemode, enum discard discard, bool copyonread); static int construct_libvirt_xml_disk_address (guestfs_h *g, xmlTe...
2018 Nov 02
0
[PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.
...} - if (drv->disk_label) { - start_element ("serial") { - string (drv->disk_label); - } end_element (); - } + if (drv->disk_label) + single_element ("serial", drv->disk_label); if (construct_libvirt_xml_disk_address (g, xo, drv_index) == -1) return -1; @@ -1786,10 +1751,9 @@ construct_libvirt_xml_secret (guestfs_h *g, start_element ("secret") { attribute ("ephemeral", "yes"); attribute ("private", "yes"); - start_element ("description") { -...
2016 Aug 02
0
[PATCH] launch: libvirt: Autodetect backing format for drive overlays (RHBZ#1354335).
...rmat = get_source_format_or_autodetect (g, drv); + if (!format) + return NULL; + + overlay = make_qcow2_overlay (g, backing_drive, format); if (!overlay) return NULL; @@ -1480,36 +1529,9 @@ construct_libvirt_xml_disk (guestfs_h *g, if (construct_libvirt_xml_disk_target (g, xo, drv_index) == -1) return -1; - if (drv->src.format) - format = safe_strdup (g, drv->src.format); - else if (drv->src.protocol == drive_protocol_file) { - /* libvirt has disabled the feature of detecting the disk format, - * unless the administrator sets all...
2012 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
...o *h); static void start_io(ctlr_info_t *h); static int sendcmd_withirq(ctlr_info_t *h, __u8 cmd, void *buff, size_t size, __u8 page_code, unsigned char scsi3addr[], @@ -199,13 +199,13 @@ static void cciss_device_release(struct device *dev); static void cciss_free_gendisk(ctlr_info_t *h, int drv_index); static void cciss_free_drive_info(ctlr_info_t *h, int drv_index); static inline u32 next_command(ctlr_info_t *h); -static int __devinit cciss_find_cfg_addrs(struct pci_dev *pdev, +static int cciss_find_cfg_addrs(struct pci_dev *pdev, void __iomem *vaddr, u32 *cfg_base_addr, u64 *cfg_base_addr...