Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Message-id: 20230324090605.28361-9-faithilike...@gmail.com
[Add index-api.rst to fix
, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Message-id: 20230324090605.28361-4-faithilike...@gmail.com
[Adjust commit message prefix as suggested by Philip
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Message-id: 20230324090605.28361-2-faithilike...@gmail.com
[Adjust commit message prefix as suggested by Philippe Mathieu-Daudé
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Message-id: 20230324090605.28361-8-faithilike...@gmail.com
Signed-off-by: Stefan Hajnoczi
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff
resembling Linux ZoneBlockDevice ioctls
Sam Li (8):
block/block-common: add zoned device structs
block/file-posix: introduce helper functions for sysfs attributes
block/block-backend: add block layer APIs resembling Linux
ZonedBlockDevice ioctls
block/raw-format: add zone operations to
The new block layer APIs of zoned block devices can be tested by:
$ tests/qemu-iotests/check zoned
Run each zone operation on a newly created null_blk device
and see whether it outputs the same zone information.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Acked-by: Kevin Wolf
Message-id
y of integers
- use only mutex lock on locking conditions of zone wps
- coding styles and clean-ups
v1:
- introduce zone append write
Sam Li (4):
file-posix: add tracking of the zone write pointers
block: introduce zone append write for zoned devices
qemu-iotests: test zone append operatio
to a zone
- zone append
Signed-off-by: Sam Li
---
block/file-posix.c | 177 ++-
include/block/block-common.h | 14 +++
include/block/block_int-common.h | 5 +
3 files changed, 193 insertions(+), 3 deletions(-)
diff --git a/block/file-posix.c b/block
Signed-off-by: Sam Li
Reviewed-by: Dmitry Fomichev
Reviewed-by: Stefan Hajnoczi
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 8fc7f73d2c..5f1745ede8 100644
--- a/block/file-posix.c
+++ b
device will respond with the position where the data has
been written in the zone.
Signed-off-by: Sam Li
Reviewed-by: Dmitry Fomichev
Reviewed-by: Stefan Hajnoczi
---
block/block-backend.c | 61 +++
block/file-posix.c| 58
The patch tests zone append writes by reporting the zone wp after
the completion of the call. "zap -p" option can print the sector
offset value after completion, which should be the start sector
where the append write begins.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
--
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Hannes Reinecke
---
include/block/block-common.h | 43
1 file changed, 43 insertions(+)
diff --git a/include/block/block-common.h b/include/block/block-common.h
o avoid blocking ioctl() calls
v2:
- add qemu-io sub-commands
- address review comments
* modify interfaces of APIs
v1:
- add block layer APIs resembling Linux ZoneBlockDevice ioctls
Sam Li (8):
include: add zoned device structs
file-posix: introduce helper functions for sysfs attributes
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
---
block.c | 19 +++
block/file-posix.c | 12
Use get_sysfs_str_val() to get the string value of device
zoned model. Then get_sysfs_zoned_model() can convert it to
BlockZoneModel type of QEMU.
Use get_sysfs_long_val() to get the long value of zoned device
information.
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan
raw-format driver usually sits on top of file-posix driver. It needs to
pass through requests of zone commands.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
---
block/raw-format.c | 17
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 2eceb250f1..563acc76ae 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -3256,6
, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan Hajnoczi
Acked-by: Kevin Wolf
---
block/block-backend.c | 133 +
block/file-posix.c| 309 +-
Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Dmitry Fomichev
---
docs/devel/zoned-storage.rst | 43 ++
docs/system/qemu-block
We have added new block layer APIs of zoned block devices. Test it as
follows: Run each zone operation on a newly created null_blk device
and see whether the logs show the correct zone information. By:
$ ./tests/qemu-iotests/tests/zoned.sh
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
s
v1:
- introduce zone append write
Sam Li (4):
file-posix: add tracking of the zone write pointers
block: introduce zone append write for zoned devices
qemu-iotests: test zone append operation
block: add some trace events for zone append
block/block-backend.c | 60
This tests is mainly a helper to indicate append writes in block layer
behaves as expected.
Signed-off-by: Sam Li
---
qemu-io-cmds.c | 65 ++
tests/qemu-iotests/tests/zoned.out | 7
tests/qemu-iotests/tests/zoned.sh | 9 +
3 files
position the data has been written in the zone.
Signed-off-by: Sam Li
---
block/block-backend.c | 60 +++
block/file-posix.c| 54 +---
block/io.c| 21 +++
block/io_uring.c
to a zone
- zone append
Signed-off-by: Sam Li
---
block/file-posix.c | 159 ++-
include/block/block-common.h | 14 +++
include/block/block_int-common.h | 3 +
3 files changed, 172 insertions(+), 4 deletions(-)
diff --git a/block/file-posix.c b/block
Signed-off-by: Sam Li
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 2ba9174778..5187f810e5 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2489,6 +2489,8 @@ out:
if
- use qemuio_from_buffer to write status bit [Stefan]
- avoid using req->elem directly [Stefan]
- fix error checkings and memory leak [Stefan]
v2:
- change units of emulated zone op coresponding to block layer APIs
- modify error checking cases [Stefan, Damien]
v1:
- add zoned storage emulation
Sam Li (4):
Use scripts/update-linux-headers.sh to update headers to 6.3-rc1.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
---
include/standard-headers/drm/drm_fourcc.h| 12 +++
include/standard-headers/linux/ethtool.h | 48 -
include/standard-headers
be set if the host does
support zoned block devices. Regular block devices(conventional zones)
will not be set.
The guest os can use blktests, fio to test those commands on zoned devices.
Furthermore, using zonefs to test zone append write is also supported.
Signed-off-by: Sam Li
---
hw/block
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
hw/block/trace-events | 7 +++
hw/block/virtio-blk.c | 12
2 files changed, 19 insertions(+)
diff --git a/hw/block/trace-events b/hw/block/trace-events
index 2c45a62bd5..34be8b9135 100644
--- a/hw/block/trace-events
+++ b
Taking account of the new zone append write operation for zoned devices,
BLOCK_ACCT_APPEND enum is introduced as other I/O request type (read,
write, flush).
Signed-off-by: Sam Li
---
block/qapi-sysemu.c| 11
block/qapi.c | 15 ++
hw/block/virtio-blk.c
ng on QEMU... or, if you want tighter
integration, you can set an SDL log handler that feeds into the QEMU
tracing system.
On Thu, Mar 9, 2023 at 9:18 PM Marc-André Lureau <
marcandre.lur...@redhat.com> wrote:
> Hi
>
> (adding Sam Lantinga, SDL maintainer, in CC. I noticed he wor
+wps->wp[i] = i * bs->bl.zone_size;
> >
> > This will reset write pointers of all read-only zones that may exist on the
> > device and make the data stored in those zones unreadable. R/O zones need
> > to be
> > skipped in this loop.
>
> And offline zones need to be skipped as well.
I see. That can be done thanks to get_zones_wp() which can show the
state of the zone at specific position.
Sam
Stefan Hajnoczi 于2023年3月17日周五 03:46写道:
>
> On Fri, Mar 10, 2023 at 06:54:27PM +0800, Sam Li wrote:
> > This patch adds zoned storage emulation to the virtio-blk driver.
> >
> > The patch implements the virtio-blk ZBD support standardization that is
> > recently acc
bugs
* fix the qemu-io code path
* use thread pool to avoid blocking ioctl() calls
v2:
- add qemu-io sub-commands
- address review comments
* modify interfaces of APIs
v1:
- add block layer APIs resembling Linux ZoneBlockDevice ioctls
Sam Li (8):
include: add zoned device structs
Use get_sysfs_str_val() to get the string value of device
zoned model. Then get_sysfs_zoned_model() can convert it to
BlockZoneModel type of QEMU.
Use get_sysfs_long_val() to get the long value of zoned device
information.
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
---
include/block/block-common.h | 43
1 file changed, 43 insertions(+)
diff --git a/include/block/block-common.h b
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 5fa80933c9..65efe5147e 100644
--- a/block/file-posix.c
+++ b
The new block layer APIs of zoned block devices can be tested by:
$ tests/qemu-iotests/check zoned
Run each zone operation on a newly created null_blk device
and see whether it outputs the same zone information.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
tests/qemu-iotests/tests
raw-format driver usually sits on top of file-posix driver. It needs to
pass through requests of zone commands.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
---
block/raw-format.c | 17
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
---
block.c | 19 +++
block/file-posix.c | 12
Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Dmitry Fomichev
---
docs/devel/zoned-storage.rst | 43 ++
docs/system/qemu-block
, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
---
block/block-backend.c | 133 +
block/file-posix.c
tate checks in zone_mgmt command [Damien]
- fix RESET_ALL related problems
v2:
- split patch to two patches for better reviewing
- change BlockZoneWps's structure to an array of integers
- use only mutex lock on locking conditions of zone wps
- coding styles and clean-ups
v1:
- introduce zone appe
device will respond with the position where the data has
been written in the zone.
Signed-off-by: Sam Li
Reviewed-by: Dmitry Fomichev
---
block/block-backend.c | 60 +++
block/file-posix.c| 58 ++
block/io.c
Signed-off-by: Sam Li
Reviewed-by: Dmitry Fomichev
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a/block/file-posix.c b/block/file-posix.c
index 60ad3970f3..9866d073f5 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2497,6
to a zone
- zone append
Signed-off-by: Sam Li
---
block/file-posix.c | 168 ++-
include/block/block-common.h | 14 +++
include/block/block_int-common.h | 5 +
3 files changed, 183 insertions(+), 4 deletions(-)
diff --git a/block/file-posix.c b/block
The patch tests zone append writes by reporting the zone wp after
the completion of the call. "zap -p" option can print the sector
offset value after completion, which should be the start sector
where the append write begins.
Signed-off-by: Sam Li
---
qemu-io-cmds.c
d memory leak [Stefan]
v2:
- change units of emulated zone op coresponding to block layer APIs
- modify error checking cases [Stefan, Damien]
v1:
- add zoned storage emulation
Sam Li (4):
include: update virtio_blk headers to v6.3-rc1
virtio-blk: add zoned storage emulation for zoned devices
Use scripts/update-linux-headers.sh to update headers to 6.3-rc1.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
---
include/standard-headers/drm/drm_fourcc.h| 12 +++
include/standard-headers/linux/ethtool.h | 48 -
include/standard-headers
Taking account of the new zone append write operation for zoned devices,
BLOCK_ACCT_ZONE_APPEND enum is introduced as other I/O request type (read,
write, flush).
Signed-off-by: Sam Li
---
block/qapi-sysemu.c| 11 +++
block/qapi.c | 18 +++
hw/block/virtio
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
hw/block/trace-events | 7 +++
hw/block/virtio-blk.c | 12
2 files changed, 19 insertions(+)
diff --git a/hw/block/trace-events b/hw/block/trace-events
index 2c45a62bd5..34be8b9135 100644
--- a/hw/block/trace-events
+++ b
be set if the host does
support zoned block devices. Regular block devices(conventional zones)
will not be set.
The guest os can use blktests, fio to test those commands on zoned devices.
Furthermore, using zonefs to test zone append write is also supported.
Signed-off-by: Sam Li
---
hw/block
See reddit post:
https://www.reddit.com/r/VFIO/comments/l9bl8b/anyone_able_to_run_qemu_52_git_master_on_windows/
This is all the info I have on this, it's all in the reddit post.
l() calls
v2:
- add qemu-io sub-commands
- address review comments
* modify interfaces of APIs
v1:
- add block layer APIs resembling Linux ZoneBlockDevice ioctls
Sam Li (8):
include: add zoned device structs
file-posix: introduce get_sysfs_str_val for device zoned model
file-posix: introduc
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
block.c | 14 ++
block/raw-format.c | 1 +
include/block/block_int-common.h | 5 +
3 files changed, 20
Use sysfs attribute files to get the long value of zoned device
information.
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan Hajnoczi
---
block/file-posix.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/block/file-posix.c b/block/file
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
include/block/block-common.h | 43
1 file changed, 43 insertions(+)
diff --git a/include/block/block-common.h b/include/block/block-common.h
index fdb7306e78..36bd0e480e 100644
--- a/include/block/block
), zone_reset(zrs), zone_finish(zf).
For example, to test zone_report, use following command:
$ ./build/qemu-io --image-opts driver=zoned_host_device, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
---
block/block-backend.c
We have added new block layer APIs of zoned block devices. Test it with:
Create a null_blk device, run each zone operation on it and see
whether reporting right zone information.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
tests/qemu-iotests/tests/zoned.out | 53
raw-format driver usually sits on top of file-posix driver. It needs to
pass through requests of zone commands.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
block/raw-format.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
Use sysfs attribute files to get the string value of device
zoned model. Then get_sysfs_zoned_model can convert it to
BlockZoneModel type in QEMU.
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
---
block/file-posix.c | 93 ++--
include/block
Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
docs/devel/zoned-storage.rst | 41 ++
docs/system/qemu-block-drivers.rst.inc | 6
2 files changed, 47 insertions
Sam Li 于2022年8月16日周二 14:25写道:
>
> Use sysfs attribute files to get the string value of device
> zoned model. Then get_sysfs_zoned_model can convert it to
> BlockZoneModel type in QEMU.
>
> Signed-off-by: Sam Li
> Reviewed-by: Hannes Reinecke
> ---
> block/file
Sam Li 于2022年8月16日周二 14:25写道:
>
> Use sysfs attribute files to get the long value of zoned device
> information.
>
> Signed-off-by: Sam Li
> Reviewed-by: Hannes Reinecke
> Reviewed-by: Stefan Hajnoczi
> ---
> block/file-posix.c | 27 +++
>
Damien Le Moal 于2022年8月17日周三 01:35写道:
>
> On 2022/08/15 23:25, Sam Li wrote:
> > Use sysfs attribute files to get the long value of zoned device
> > information.
> >
> > Signed-off-by: Sam Li
> > Reviewed-by: Hannes Reinecke
> > Reviewed-by: Stefan Hajn
Stefan Hajnoczi 于2022年8月23日周二 08:49写道:
>
> On Tue, Aug 16, 2022 at 02:25:18PM +0800, Sam Li wrote:
> > By adding zone management operations in BlockDriver, storage controller
> > emulation can use the new block layer APIs including Report Zone and
> > four zone management
Stefan Hajnoczi 于2022年8月23日周二 08:54写道:
>
> On Tue, Aug 16, 2022 at 02:25:20PM +0800, Sam Li wrote:
> > Putting zoned/non-zoned BlockDrivers on top of each other is not
> > allowed.
> >
> > Signed-off-by: Sam Li
> > Reviewed-by: Stefan Hajnoczi
> > ---
Stefan Hajnoczi 于2022年8月23日周二 07:05写道:
>
> On Tue, Aug 16, 2022 at 02:25:16PM +0800, Sam Li wrote:
> > +static int hdev_get_max_segments(int fd, struct stat *st) {
> > +int ret;
> > +if (S_ISCHR(st->st_mode)) {
> > +if (ioctl(fd, SG_GET_SG_TABLE
Damien Le Moal 于2022年8月17日周三 01:50写道:
>
> On 2022/08/15 23:25, Sam Li wrote:
> > By adding zone management operations in BlockDriver, storage controller
> > emulation can use the new block layer APIs including Report Zone and
> > four zone management operations (op
nctions to get sysfs attributes
- address review comments
* fix zone report bugs
* fix the qemu-io code path
* use thread pool to avoid blocking ioctl() calls
v2:
- add qemu-io sub-commands
- address review comments
* modify interfaces of APIs
v1:
- add block layer APIs resembling Linux ZoneBlockD
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
---
include/block/block-common.h | 43
1 file changed, 43 insertions(+)
diff --git a/include/block/block-common.h b/include/block/block-common.h
index fdb7306e78..36bd0e480e
Use get_sysfs_str_val() to get the string value of device
zoned model. Then get_sysfs_zoned_model() can convert it to
BlockZoneModel type in QEMU.
Use get_sysfs_long_val() to get the long value of zoned device
information.
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan
), zone_reset(zrs), zone_finish(zf).
For example, to test zone_report, use following command:
$ ./build/qemu-io --image-opts driver=zoned_host_device, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
---
block/block-backend.c
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
block.c | 14 ++
block/file-posix.c | 13 +
block/raw-format.c | 1 +
include/block
raw-format driver usually sits on top of file-posix driver. It needs to
pass through requests of zone commands.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
block/raw-format.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
We have added new block layer APIs of zoned block devices. Test it with:
Create a null_blk device, run each zone operation on it and see
whether reporting right zone information.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
tests/qemu-iotests/tests/zoned.out | 53
Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
docs/devel/zoned-storage.rst | 41 ++
docs/system/qemu-block-drivers.rst.inc | 6
2 files changed, 47 insertions
Sam Li 于2022年8月27日周六 00:21写道:
>
> Putting zoned/non-zoned BlockDrivers on top of each other is not
> allowed.
>
> Signed-off-by: Sam Li
> Reviewed-by: Stefan Hajnoczi
> ---
> block.c | 14 ++
> block/file-posix.c
), zone_reset(zrs), zone_finish(zf).
For example, to test zone_report, use following command:
$ ./build/qemu-io --image-opts driver=zoned_host_device, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
---
block/block-backend.c
Sam Li 于2022年8月29日周一 20:53写道:
>
> By adding zone management operations in BlockDriver, storage controller
> emulation can use the new block layer APIs including Report Zone and
> four zone management operations (open, close, finish, reset).
>
> Add zoned storage comm
Stefan Hajnoczi 于2022年8月30日周二 03:44写道:
>
> On Fri, Aug 26, 2022 at 11:15:29PM +0800, Sam Li wrote:
> > Zoned Block Devices (ZBDs) devide the LBA space to block regions called
> > zones
> > that are larger than the LBA size. It can only allow sequential writes,
>
Markus Armbruster 于2022年8月30日周二 19:57写道:
>
> Sam Li writes:
>
> > By adding zone management operations in BlockDriver, storage controller
> > emulation can use the new block layer APIs including Report Zone and
> > four zone management operations (open, close, finish
Markus Armbruster 于2022年8月30日周二 23:09写道:
>
> Sam Li writes:
>
> > Markus Armbruster 于2022年8月30日周二 19:57写道:
> >>
> >> Sam Li writes:
> >>
> >> > By adding zone management operations in BlockDriver, storage controller
> >> > em
Markus Armbruster 于2022年8月31日周三 16:35写道:
>
> Sam Li writes:
>
> > Markus Armbruster 于2022年8月30日周二 19:57写道:
> >>
> >> Sam Li writes:
> >>
> >> > By adding zone management operations in BlockDriver, storage controller
> >> > em
Philippe Mathieu-Daudé 于2022年11月3日周四 05:21写道:
>
> Hi,
>
> On 30/10/22 10:32, Sam Li wrote:
> > Signed-off-by: Sam Li
> > ---
> > hw/block/trace-events | 7 +++
> > hw/block/virtio-blk.c | 12
> > 2 files changed, 19 insertions(+)
&g
Stefan Hajnoczi 于2022年11月3日周四 04:58写道:
>
> On Sun, Oct 30, 2022 at 05:32:41AM -0400, Sam Li wrote:
> > This patch extends virtio-blk emulation to handle zoned device commands
> > by calling the new block layer APIs to perform zoned device I/O on
> > behalf of the guest.
a1125a
and 77e3f038af1764983087e3551a0fde9951952c4d.
Signed-off-by: Sam Li
---
block/io_uring.c | 13 +
meson.build | 1 -
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/block/io_uring.c b/block/io_uring.c
index a1760152e0..973e15d876 100644
--- a/block/io_uring.c
+
Stefan Hajnoczi 于2022年9月20日周二 05:31写道:
>
> On Sat, Sep 10, 2022 at 02:50:57PM +0800, Sam Li wrote:
> > This patch extends virtio-blk emulation to handle zoned device commands
> > by calling the new block layer APIs to perform zoned device I/O on
> > behalf of the guest.
Use get_sysfs_str_val() to get the string value of device
zoned model. Then get_sysfs_zoned_model() can convert it to
BlockZoneModel type of QEMU.
Use get_sysfs_long_val() to get the long value of zoned device
information.
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
---
include/block/block-common.h | 43
1 file changed, 43 insertions(+)
diff --git a/include/block/block-common.h b/include/block/block-common.h
index fdb7306e78..36bd0e480e
Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
docs/devel/zoned-storage.rst | 40 ++
docs/system/qemu-block-drivers.rst.inc | 6
2 files changed, 46 insertions
"zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
---
block/block-backend.c | 146 +
block/file-posix.c| 340 +-
block/io.c| 41
include/block/block-common.h
We have added new block layer APIs of zoned block devices. Test it with:
Create a null_blk device, run each zone operation on it and see
whether reporting right zone information.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
tests/qemu-iotests/tests/zoned.out | 53
ol to avoid blocking ioctl() calls
v2:
- add qemu-io sub-commands
- address review comments
* modify interfaces of APIs
v1:
- add block layer APIs resembling Linux ZoneBlockDevice ioctls
Sam Li (7):
include: add zoned device structs
file-posix: introduce helper functions for sysfs attribute
raw-format driver usually sits on top of file-posix driver. It needs to
pass through requests of zone commands.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
---
block/raw-format.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/block/raw
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
block.c | 17 +
block/file-posix.c | 13 +
block/raw-format.c | 1 +
include/block
v2:
- split patch to two patches for better reviewing
- change BlockZoneWps's structure to an array of integers
- use only mutex lock on locking conditions of zone wps
- coding styles and clean-ups
v1:
- introduce zone append write
Sam Li (2):
file-posix: add the tracking of the zon
write to a zone
- zone append
Signed-off-by: Sam Li
---
block/file-posix.c | 138 ++-
include/block/block-common.h | 16
include/block/block_int-common.h | 5 ++
include/block/raw-aio.h | 4 +-
4 files changed, 159 insertions(
position the data has been written in the zone.
Signed-off-by: Sam Li
---
block/block-backend.c | 65 ++
block/file-posix.c | 51 +++
block/io.c | 21 ++
block/raw-format.c
be set if the host does
support zoned block devices. Regular block devices(conventional zones)
will not be set.
The guest os having zoned device support can use blkzone(8) to test those
commands. Furthermore, using zonefs to test zone append write is also
supported.
Signed-off-by: Sam Li
---
hw
301 - 400 of 900 matches
Mail list logo