search for: virtio_blk

Displaying 20 results from an estimated 1352 matches for "virtio_blk".

2020 Apr 23
4
[PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug
A virtio_blk block device can still be referenced after hot unplug by userspace processes that hold the file descriptor. In this case virtblk_getgeo() can be invoked after virtblk_remove() was called. For example, a program that has /dev/vdb open can call ioctl(HDIO_GETGEO) after hot unplug. Fix this by clea...
2020 Apr 23
4
[PATCH] virtio-blk: handle block_device_operations callbacks after hot unplug
A virtio_blk block device can still be referenced after hot unplug by userspace processes that hold the file descriptor. In this case virtblk_getgeo() can be invoked after virtblk_remove() was called. For example, a program that has /dev/vdb open can call ioctl(HDIO_GETGEO) after hot unplug. Fix this by clea...
2017 Jun 09
3
[PATCH v1] virtio_blk: Use sysfs_match_string() helper
Use sysfs_match_string() helper instead of open coded variant. Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com> --- drivers/block/virtio_blk.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 553cc4c542b4..0e707b8cce9d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -541,12 +541,9 @@ virtblk_cache_type_store(struct device...
2017 Jun 09
3
[PATCH v1] virtio_blk: Use sysfs_match_string() helper
Use sysfs_match_string() helper instead of open coded variant. Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com> --- drivers/block/virtio_blk.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 553cc4c542b4..0e707b8cce9d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -541,12 +541,9 @@ virtblk_cache_type_store(struct device...
2016 Feb 24
1
[PATCH v2] virtio_blk: VIRTIO_BLK_F_WCE->VIRTIO_BLK_F_FLUSH
Latest virtio spec says the feature bit name is VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_WCE is the legacy name. virtio blk header says exactly the reverse - fix that and update driver code to match. Cc: Paolo Bonzini <pbonzini at redhat.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- Changs from v1: comments updated include/uapi/l...
2016 Feb 24
1
[PATCH v2] virtio_blk: VIRTIO_BLK_F_WCE->VIRTIO_BLK_F_FLUSH
Latest virtio spec says the feature bit name is VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_WCE is the legacy name. virtio blk header says exactly the reverse - fix that and update driver code to match. Cc: Paolo Bonzini <pbonzini at redhat.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- Changs from v1: comments updated include/uapi/l...
2023 Mar 10
1
[V2V PATCH v3 1/6] Revert "Remove guestcaps_block_type Virtio_SCSI"
...0aa0e5cd..084619c8 100644 --- a/convert/convert.ml +++ b/convert/convert.ml @@ -252,7 +252,7 @@ and do_convert g source inspect i_firmware keep_serial_console interfaces = (* Did we manage to install virtio drivers? *) if not (quiet ()) then ( match guestcaps.gcaps_block_bus with - | Virtio_blk -> + | Virtio_blk | Virtio_SCSI -> info (f_"This guest has virtio drivers installed.") | IDE -> info (f_"This guest does not have virtio drivers installed.") diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml index d5c0f24d..dab4f...
2023 Mar 07
1
[V2V PATCH v2 1/5] Revert "Remove guestcaps_block_type Virtio_SCSI"
...0aa0e5cd..084619c8 100644 --- a/convert/convert.ml +++ b/convert/convert.ml @@ -252,7 +252,7 @@ and do_convert g source inspect i_firmware keep_serial_console interfaces = (* Did we manage to install virtio drivers? *) if not (quiet ()) then ( match guestcaps.gcaps_block_bus with - | Virtio_blk -> + | Virtio_blk | Virtio_SCSI -> info (f_"This guest has virtio drivers installed.") | IDE -> info (f_"This guest does not have virtio drivers installed.") diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml index d5c0f24d..dab4f...
2012 Sep 05
4
[patch] virtio-blk: fix NULL checking in virtblk_alloc_req()
Smatch complains about the inconsistent NULL checking here. Fix it to return NULL on failure. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> --- This is only needed in linux-next. diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 2edfb5c..457db0c 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -90,10 +90,11 @@ static inline struct virtblk_req *virtblk_alloc_req(struct virtio_blk *vblk, struct virtblk_req *vbr; vbr = mempool_alloc(vblk->pool, gfp_mask)...
2012 Sep 05
4
[patch] virtio-blk: fix NULL checking in virtblk_alloc_req()
Smatch complains about the inconsistent NULL checking here. Fix it to return NULL on failure. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> --- This is only needed in linux-next. diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 2edfb5c..457db0c 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -90,10 +90,11 @@ static inline struct virtblk_req *virtblk_alloc_req(struct virtio_blk *vblk, struct virtblk_req *vbr; vbr = mempool_alloc(vblk->pool, gfp_mask)...
2023 Mar 13
1
[V2V PATCH v2 1/5] Revert "Remove guestcaps_block_type Virtio_SCSI"
...a/convert/convert.ml > +++ b/convert/convert.ml > @@ -252,7 +252,7 @@ and do_convert g source inspect i_firmware keep_serial_console interfaces = > (* Did we manage to install virtio drivers? *) > if not (quiet ()) then ( > match guestcaps.gcaps_block_bus with > - | Virtio_blk -> > + | Virtio_blk | Virtio_SCSI -> > info (f_"This guest has virtio drivers installed.") > | IDE -> > info (f_"This guest does not have virtio drivers installed.") > diff --git a/convert/convert_linux.ml b/convert/convert_linux...
2012 Apr 10
3
[PATCH] virtio_blk: Add help function to format mass of disks
...mass of virtio blocks, there will be disks with the same name. Based on commit 3e1a7ff8a0a7b948f2684930166954f9e8e776fe, I add function "virtblk_name_format()" for virtio block to support mass of disks naming. Signed-off-by: Ren Mingxin <renmx at cn.fujitsu.com> --- drivers/block/virtio_blk.c | 38 ++++++++++++++++++++++++++------------ 1 files changed, 26 insertions(+), 12 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index c4a60ba..86516c8 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -374,6 +374,31 @@ static int i...
2012 Apr 10
3
[PATCH] virtio_blk: Add help function to format mass of disks
...mass of virtio blocks, there will be disks with the same name. Based on commit 3e1a7ff8a0a7b948f2684930166954f9e8e776fe, I add function "virtblk_name_format()" for virtio block to support mass of disks naming. Signed-off-by: Ren Mingxin <renmx at cn.fujitsu.com> --- drivers/block/virtio_blk.c | 38 ++++++++++++++++++++++++++------------ 1 files changed, 26 insertions(+), 12 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index c4a60ba..86516c8 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -374,6 +374,31 @@ static int i...
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
The message printed on disk resize is incorrect. The following is printed when resizing to 2 GiB: $ truncate -s 1G test.img $ qemu -device virtio-blk-pci,logical_block_size=4096,... (qemu) block_resize drive1 2G virtio_blk virtio0: new size: 4194304 4096-byte logical blocks (17.2 GB/16.0 GiB) The virtio_blk capacity config field is in 512-byte sector units regardless of logical_block_size as per the VIRTIO specification. Therefore the message should read: virtio_blk virtio0: new size: 524288 4096-byte logical blo...
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
The message printed on disk resize is incorrect. The following is printed when resizing to 2 GiB: $ truncate -s 1G test.img $ qemu -device virtio-blk-pci,logical_block_size=4096,... (qemu) block_resize drive1 2G virtio_blk virtio0: new size: 4194304 4096-byte logical blocks (17.2 GB/16.0 GiB) The virtio_blk capacity config field is in 512-byte sector units regardless of logical_block_size as per the VIRTIO specification. Therefore the message should read: virtio_blk virtio0: new size: 524288 4096-byte logical blo...
2018 Jan 03
1
[PATCH] virtio_blk: print capacity at probe time
Print the capacity of the block device when the driver is probed. Many users expect this since SCSI disks (sd) do it. Moreover, kernel dmesg output is the primary source of troubleshooting information so it's helpful to include the disk size there. The capacity is already printed by virtio_blk when a resize event occurs. Extract the code and reuse it from virtblk_probe(). This patch also adds the block device name to the message so it can be correlated with a specific device: virtio_blk virtio0: [vda] 20971520 512-byte logical blocks (10.7 GB/10.0 GiB) Cc: Rodrigo A B Freire <rf...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
A userspace process holding a file descriptor to a virtio_blk device can still invoke block_device_operations after hot unplug. For example, a program that has /dev/vdb open can call ioctl(HDIO_GETGEO) after hot unplug to invoke virtblk_getgeo(). Introduce a reference count in struct virtio_blk so that its lifetime covers both virtio_driver probe/remove and...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
A userspace process holding a file descriptor to a virtio_blk device can still invoke block_device_operations after hot unplug. For example, a program that has /dev/vdb open can call ioctl(HDIO_GETGEO) after hot unplug to invoke virtblk_getgeo(). Introduce a reference count in struct virtio_blk so that its lifetime covers both virtio_driver probe/remove and...
2017 Jan 04
4
4.10 and -stable fix for virtio_blk and virtually mapped stacks
Without this fix attempts to do scsi passthrough on virtio_blk will crash the system on virtually mapped stacks, which is something happening during boot with many distros.
2017 Jan 04
4
4.10 and -stable fix for virtio_blk and virtually mapped stacks
Without this fix attempts to do scsi passthrough on virtio_blk will crash the system on virtually mapped stacks, which is something happening during boot with many distros.