> +title: "Introduction to Zoned Storage Emulation"
> > +date: 2022-11-17
> > +author: Sam Li
> > +categories: [storage, gsoc, outreachy, internships]
> > +---
> > +
> > +## Zoned block devices
> > +
> > +Aimed for at-scale data infr
Sam Li 于2022年11月18日周五 08:33写道:
>
> Stefan Hajnoczi 于2022年11月18日周五 03:12写道:
> >
> > Hi Sam,
> > Please send a git repo URL so Thomas can fetch the commit without
> > email/file size limitations.
>
> I'll push it to the zbd branch after fixing the bellowin
Thomas Huth 于2022年11月23日周三 20:48写道:
>
> On 17/11/2022 20.12, Stefan Hajnoczi wrote:
> > Hi Sam,
> > Please send a git repo URL so Thomas can fetch the commit without
> > email/file size limitations.
>
> The size obviously comes from the PNG image ... since this seems to be a
> photo, I think JPG w
Signed-off-by: Sam Li
---
_posts/2022-11-17-zoned-emulation.md | 69
1 file changed, 69 insertions(+)
create mode 100644 _posts/2022-11-17-zoned-emulation.md
diff --git a/_posts/2022-11-17-zoned-emulation.md
b/_posts/2022-11-17-zoned-emulation.md
new file mode
Stefan Hajnoczi 于2022年11月30日周三 10:01写道:
>
> On Thu, 27 Oct 2022 at 11:46, Sam Li wrote:
> >
> > Add a new zoned_host_device BlockDriver. The zoned_host_device option
> > accepts only zoned host block devices. By adding zone management
> > operations in this new Bloc
Stefan Hajnoczi 于2022年11月30日周三 10:04写道:
>
> On Thu, 27 Oct 2022 at 11:46, Sam Li wrote:
> > v13:
> > - add some tracing points for new zone APIs [Dmitry]
> > - change error handling in zone_mgmt [Damien, Stefan]
>
> Hi Sam,
> This looks very close! I sent comme
Stefan Hajnoczi 于2022年12月5日周一 20:20写道:
>
> On Wed, Nov 30, 2022 at 10:24:10AM +0800, Sam Li wrote:
> > Stefan Hajnoczi 于2022年11月30日周三 10:01写道:
> > > On Thu, 27 Oct 2022 at 11:46, Sam Li wrote:
> > > > @@ -1374,9 +1428,11 @@ static int
> > > &g
Stefan Hajnoczi 于2022年7月27日周三 23:06写道:
>
> This patch series introduces the concept of zoned storage to the QEMU
> block layer. Documentation is needed so that users and developers know
> how to use and maintain this feature.
>
> As a minimum, let's document how to pass through zoned block devices
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 ZoneBlockDevice ioctls
Sam Li (11):
include: add zoned device st
Signed-off-by: Sam Li
---
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..c9d28b1c51 100644
--- a/include/block/block-common.h
+++ b/include/block
Add file from Dmitry's "virtio-blk:add support for zoned block devices"
linux patch using scripts/update-linux-headers.sh. There is a link for
more information: https://github.com/dmitry-fomichev/virtblk-zbd
Signed-off-by: Sam Li
---
include/standard-headers/linux/vir
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
---
block/file-posix.c | 86
include/block/block_int-common.h | 3 ++
2 files
-off-by: Sam Li
---
block/block-backend.c| 47 ++
block/coroutines.h | 6 +
block/file-posix.c | 272 ++-
block/io.c | 57 +++
include/block/block-common.h | 1 -
include/block/block-io.h
Use sysfs attribute files to get the long value of zoned device
information.
Signed-off-by: Sam Li
---
block/file-posix.c | 23 ---
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 48cd096624..bcf898f0cb 100644
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
---
block.c | 13 +
block/file-posix.c | 2 ++
block/raw-format.c | 1 +
include/block/block_int-common.h | 10 ++
4 files
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
---
tests/qemu-iotests/tests/zoned.out | 53 ++
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
---
block/raw-format.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/block/raw-format.c b/block/raw-format.c
index 69fd650eaf..6b20bd22ef
Signed-off-by: Sam Li
---
block/io.c | 24 ++---
qemu-io-cmds.c | 144 +
2 files changed, 148 insertions(+), 20 deletions(-)
diff --git a/block/io.c b/block/io.c
index a4625fb0e1..de9ec1d740 100644
--- a/block/io.c
+++ b/block/io.c
@
Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
---
docs/devel/zoned-storage.rst | 68 ++
docs/system/qemu-block-drivers.rst.inc | 6 +++
2 files changed, 74 insertions(+)
create mode 100644 docs/devel/zoned
currently in the reviewing process.
VIRTIO_BLK_F_ZONED will only be set if the host does support zoned block
devices. The regular block device will not be set. The guest os having
zoned device support can use blkzone(8) to test those commands.
Signed-off-by: Sam Li
---
block/block-backend.c
Use sysfs attribute files to get the long value of zoned device
information.
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
---
block/file-posix.c | 37 +++--
1 file changed, 23 insertions(+), 14 deletions(-)
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
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 | 70
include/block
tes
- 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 ZoneBlockDevice ioctls
Sam Li
), 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
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
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
---
block.c | 13 +
block/file-posix.c | 1 +
block/raw-format.c | 1 +
include/block/block_int
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
---
docs/devel/zoned-storage.rst | 41 ++
docs/system/qemu-block-drivers.rst.inc | 6
2 files changed, 47 insertions(+)
create mode 100644 docs/devel
Sam Li 于2022年8月5日周五 15:58写道:
>
> 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 commands of the d
Stefan Hajnoczi 于2022年8月8日周一 21:52写道:
>
> On Fri, Aug 05, 2022 at 03:57:45PM +0800, 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
Stefan Hajnoczi 于2022年8月8日周一 21:52写道:
>
> On Fri, Aug 05, 2022 at 03:57:46PM +0800, Sam Li wrote:
> > 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.
>
Matthew Rosato 于2023年7月27日周四 19:46写道:
>
> On 7/5/23 10:54 AM, Matthew Rosato wrote:
> > On 6/4/23 2:16 AM, Sam Li wrote:
> >> The g_file_get_contents() function returns a g_boolean. If it fails, the
> >> returned value will be 0 instead of -1. Solve the issue by ski
-by: Sam Li
Reviewed-by: Matthew Rosato
Reviewed-by: Stefan Hajnoczi
---
block/file-posix.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 9e8e3d8ca5..b16e9c21a1 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
Markus Armbruster 于2024年2月19日周一 13:05写道:
>
> One more thing...
>
> Markus Armbruster writes:
>
> > I apologize for the delayed review.
No problems. Thanks for reviewing!
> >
> > Sam Li writes:
> >
> >> To configure the zoned format feature o
Markus Armbruster 于2024年2月19日周一 15:40写道:
>
> Sam Li writes:
>
> > Markus Armbruster 于2024年2月19日周一 13:05写道:
> >>
> >> One more thing...
> >>
> >> Markus Armbruster writes:
> >>
> >> > I apologize for the delayed review.
>
Markus Armbruster 于2024年2月19日周一 16:56写道:
>
> Sam Li writes:
>
> > Markus Armbruster 于2024年2月19日周一 15:40写道:
> >>
> >> Sam Li writes:
> >>
> >> > Markus Armbruster 于2024年2月19日周一 13:05写道:
> >> >>
> >> >> One mo
Markus Armbruster 于2024年2月19日周一 21:42写道:
>
> Sam Li writes:
>
> > Markus Armbruster 于2024年2月19日周一 16:56写道:
> >>
> >> Sam Li writes:
> >>
> >> > Markus Armbruster 于2024年2月19日周一 15:40写道:
> >> >>
> >>
y cannot be represented.
>
> Reported-by: Peter Maydell
> Cc: Sam Li
> Signed-off-by: Stefan Hajnoczi
> ---
> qemu-io-cmds.c | 48 +++-
> 1 file changed, 47 insertions(+), 1 deletion(-)
Reviewed-by: Sam Li
Hi Stefan,
Thank you for fixi
Sam Li 于2022年10月27日周四 23:52写道:
>
> Since Linux doesn't have a user API to issue zone append operations to
> zoned devices from user space, the file-posix driver is modified to add
> zone append emulation using regular writes. To do this, the file-posix
> driver tracks the wp l
Matias Bjørling 于2023年3月23日周四 21:26写道:
>
> On 23/03/2023 06.28, 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 accepted by virtio-spec.
Matias Bjørling 于2023年3月23日周四 21:39写道:
>
> On 23/03/2023 06.28, 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. It supports Report Zo
Add the documentation about the example of using virtio-blk driver
to pass the zoned block devices through to the guest.
Signed-off-by: Sam Li
---
docs/devel/zoned-storage.rst | 17 +
1 file changed, 17 insertions(+)
diff --git a/docs/devel/zoned-storage.rst b/docs/devel/zoned
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
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
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
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
sfs 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 ZoneBlockDevice
Sam Li 于2023年3月24日周五 18:54写道:
>
> Add the documentation about the example of using virtio-blk driver
> to pass the zoned block devices through to the guest.
>
> Signed-off-by: Sam Li
> ---
> docs/devel/zoned-storage.rst | 17 +
> 1 file changed, 17 insert
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 (5):
include: update virtio_blk headers to v6.3-rc1
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
, 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
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
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
Stefan Hajnoczi 于2023年3月24日周五 03:31写道:
>
> On Thu, Mar 23, 2023 at 01:08:32PM +0800, Sam Li wrote:
> > 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 devic
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
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
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
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_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-blk.c
add zoned storage emulation
Sam Li (5):
include: update virtio_blk headers to v6.3-rc1
virtio-blk: add zoned storage emulation for zoned devices
block: add accounting for zone append operation
virtio-blk: add some trace events for zoned emulation
docs/zoned-storage:add zoned emulation use
Add the documentation about the example of using virtio-blk driver
to pass the zoned block devices through to the guest.
Signed-off-by: Sam Li
---
docs/devel/zoned-storage.rst | 17 +
1 file changed, 17 insertions(+)
diff --git a/docs/devel/zoned-storage.rst b/docs/devel/zoned
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
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-blk.c
Stefan Hajnoczi 于2023年4月4日周二 01:04写道:
>
> On Thu, Mar 23, 2023 at 01:19:04PM +0800, Sam Li wrote:
> > Since Linux doesn't have a user API to issue zone append operations to
> > zoned devices from user space, the file-posix driver is modified to add
> > zone append e
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
--
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| 56 +
block/io.c
ET_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 append write
Sam Li (4):
file-posix: add trackin
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, 184 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 a7130b1024..825301467e 100644
--- a/block/file-posix.c
+++ b
Stefan Hajnoczi 于2023年4月3日周一 20:18写道:
>
> On Wed, 29 Mar 2023 at 01:01, Michael S. Tsirkin wrote:
> >
> > On Mon, Mar 27, 2023 at 10:45:48PM +0800, Sam Li wrote:
> >
> > virtio bits look ok.
> >
> > Reviewed-by: Michael S. Tsirkin
> >
> > m
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 4e26641ce0..da986a33fd 100644
--- a/block/file-posix.c
+++ b
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
--
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 | 60 +++
block/file-posix.c| 58
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 | 173 ++-
include/block/block-common.h | 14 +++
include/block/block_int-common.h | 5 +
3 files changed, 189 insertions(+), 3 deletions(-)
diff --git a/block/file-posix.c b/block
zone APIs
v3:
- 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 stor
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-blk.c
Add the documentation about the example of using virtio-blk driver
to pass the zoned block devices through to the guest.
Signed-off-by: Sam Li
---
docs/devel/zoned-storage.rst | 17 +
1 file changed, 17 insertions(+)
diff --git a/docs/devel/zoned-storage.rst b/docs/devel/zoned
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
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
Stefan Hajnoczi 于2023年4月10日周一 21:04写道:
>
> On Fri, Apr 07, 2023 at 04:16:54PM +0800, Sam Li wrote:
> > Since Linux doesn't have a user API to issue zone append operations to
> > zoned devices from user space, the file-posix driver is modified to add
> > zone append e
unsigned comparisons.
>
> In practice I don't think zoned devices are likely to exceed MAX_INT
> zones any time soon, so this is mostly a code cleanup.
>
> Cc: Sam Li
> Cc: Dmitry Fomichev
> Cc: Damien Le Moal
> Signed-off-by: Stefan Hajnoczi
> ---
> bl
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
fs 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 ZoneBlockDevice ioct
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 | 13
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
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
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 f661f202a1..5cf92608db 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -3272,6
, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan Hajnoczi
---
block/block-backend.c | 147 ++
block/file-posix.c| 323 ++
block/io.c
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
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
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
Use scripts/update-linux-headers.sh to update virtio-blk headers
from Dmitry's "virtio-blk:add support for zoned block devices"
Linux patches.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
---
include/standard-headers/linux/vir
ly [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):
include: update virtio_blk headers
virtio-blk: add zoned storage emulation fo
1 - 100 of 505 matches
Mail list logo