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
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
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é
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
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
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):
block/block-common: add zoned device structs
block/file-posix: introduce helper functions for sysfs attributes
block/block-backen
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
Acked-by: Kevin Wolf
Message-id: 20230324090605.28361-6-faithilike...@gmail.com
[Adjust commit message prefix
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
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
Acked-by: Kevin Wolf
Message-id
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 aacb50d5aa..cd47167d04 100644
--- a/block/file-posix.c
+++ b
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
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
--
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 tracking of the zone write pointers
block: introduce zone append write for zoned devices
qemu
- modify error checking cases [Stefan, Damien]
v1:
- add zoned storage emulation
Sam Li (4):
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 emulati
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
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
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
Hi Stefan,
Stefan Hajnoczi 于2022年6月20日周一 15:55写道:
>
> On Mon, Jun 20, 2022 at 11:36:11AM +0800, Sam Li wrote:
>
> Hi Sam,
> Is this version 2 of "[RFC v1] Add support for zoned device"? Please
> keep the email subject line the same (except for "v2", "
Stefan Hajnoczi 于2022年6月24日周五 23:50写道:
>
> On Fri, Jun 24, 2022 at 11:14:32AM +0800, Sam Li wrote:
> > Hi Stefan,
> >
> > Stefan Hajnoczi 于2022年6月20日周一 15:55写道:
> > >
> > > On Mon, Jun 20, 2022 at 11:36:11AM +0800, Sam Li wrote:
> > >
>
(developing) ***
Sam Li (5):
block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.
qemu-io: add zoned block device operations.
file-posix: introduce get_sysfs_long_val for zoned device information.
file-posix: introduce get_sysfs_str_val for device zoned model.
qemu-iotests: add
---
block/file-posix.c | 60
include/block/block-common.h | 4 +--
2 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 73c2cdfbca..74c0245e0f 100644
--- a/block/file-posix.c
+++ b/block/file-p
---
block/io.c | 21 +++
include/block/block-io.h | 13 +
qemu-io-cmds.c | 121 +++
3 files changed, 155 insertions(+)
diff --git a/block/io.c b/block/io.c
index 789e6373d5..656a1b7271 100644
--- a/block/io.c
+++ b/block/io.c
@
By adding zone management operations in BlockDriver, storage
controller emulation can use the new block layer APIs including
zone_report and zone_mgmt(open, close, finish, reset).
---
block/block-backend.c| 56
block/coroutines.h | 5 +
block/file-posix.c
---
tests/qemu-iotests/tests/zoned.sh | 49 +++
1 file changed, 49 insertions(+)
create mode 100755 tests/qemu-iotests/tests/zoned.sh
diff --git a/tests/qemu-iotests/tests/zoned.sh
b/tests/qemu-iotests/tests/zoned.sh
new file mode 100755
index 00..262c0b5427
Use sysfs attribute files to get the zoned device information in case
that ioctl() commands of zone management interface won't work. It can
return long type of value like chunk_sectors, zoned_append_max_bytes,
max_open_zones, max_active_zones.
---
block/file-posix.c | 37 +-
Hi Hannes,
Hannes Reinecke 于2022年6月27日周一 15:21写道:
>
> On 6/27/22 02:19, Sam Li wrote:
> > By adding zone management operations in BlockDriver, storage
> > controller emulation can use the new block layer APIs including
> > zone_report and zone_mgmt(op
Hannes Reinecke 于2022年6月27日周一 15:31写道:
>
> On 6/27/22 02:19, Sam Li wrote:
> > Use sysfs attribute files to get the zoned device information in case
> > that ioctl() commands of zone management interface won't work. It can
> > return long type of value like chunk_se
Hannes Reinecke 于2022年6月27日周一 15:30写道:
>
> On 6/27/22 02:19, Sam Li wrote:
> > ---
>
> Good coding style would advise to add some text here what the patch does.
>
> > block/io.c | 21 +++
> > include/block/block-io.h | 13 +
>
Hannes Reinecke 于2022年6月27日周一 15:41写道:
>
> On 6/27/22 02:19, Sam Li wrote:
> > ---
> > block/file-posix.c | 60
> > include/block/block-common.h | 4 +--
> > 2 files changed, 62 insertions(+), 2 deletions(-)
&
Stefan Hajnoczi 于2022年6月28日周二 14:52写道:
>
> On Mon, Jun 27, 2022 at 08:19:13AM +0800, Sam Li wrote:
> > diff --git a/block/block-backend.c b/block/block-backend.c
> > index e0e1aff4b1..786f964d02 100644
> > --- a/block/block-backend.c
> > +++ b/block/block-backend.c
Stefan Hajnoczi 于2022年6月28日周二 16:20写道:
>
> On Mon, Jun 27, 2022 at 08:19:14AM +0800, Sam Li wrote:
> > diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
> > index 2f0d8ac25a..3f2592b9f5 100644
> > --- a/qemu-io-cmds.c
> > +++ b/qemu-io-cmds.c
> > @@ -1706,6
Stefan Hajnoczi 于2022年6月28日周二 16:20写道:
>
> On Mon, Jun 27, 2022 at 08:19:17AM +0800, Sam Li wrote:
> > diff --git a/tests/qemu-iotests/tests/zoned.sh
> > b/tests/qemu-iotests/tests/zoned.sh
> > new file mode 100755
> > index 00..262c0b5427
> > --- /d
Stefan Hajnoczi 于2022年6月28日周二 16:20写道:
>
> On Mon, Jun 27, 2022 at 08:19:15AM +0800, Sam Li wrote:
> > Use sysfs attribute files to get the zoned device information in case
> > that ioctl() commands of zone management interface won't work. It can
> > return long typ
Damien Le Moal 于2022年6月28日周二 17:05写道:
>
> On 6/28/22 17:05, Sam Li wrote:
> > Stefan Hajnoczi 于2022年6月28日周二 14:52写道:
> >>
> >> On Mon, Jun 27, 2022 at 08:19:13AM +0800, Sam Li wrote:
> >>> diff --git a/block/block-backend.c b/block/block-backend.c
Damien Le Moal 于2022年6月28日周二 17:11写道:
>
> On 6/28/22 16:56, Stefan Hajnoczi wrote:
> > On Mon, Jun 27, 2022 at 08:19:14AM +0800, Sam Li wrote:
> >> diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
> >> index 2f0d8ac25a..3f2592b9f5 100644
> >> --- a/q
Damien Le Moal 于2022年6月29日周三 09:43写道:
>
> On 6/28/22 19:23, Sam Li wrote:
> > Damien Le Moal 于2022年6月28日周二 17:05写道:
> >>
> >> On 6/28/22 17:05, Sam Li wrote:
> >>> Stefan Hajnoczi 于2022年6月28日周二 14:52写道:
> >>>>
> >>>> On M
Damien Le Moal 于2022年6月29日周三 10:32写道:
>
> On 6/29/22 10:50, Sam Li wrote:
> >>>>>>> +rep_size = sizeof(struct blk_zone_report) + nrz * sizeof(struct
> >>>>>>> blk_zone);
> >>>>>>> +g_autof
to 36e5e9b22abe56aa00ca067851555ad8127a7966:
> > >
> > >tracing: install trace events file only if necessary (2023-04-20
> > > 07:39:43 -0400)
> > >
> > >
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
Acked-by: Kevin Wolf
Message-id: 20230324090605.28361-6-faithilike...@gmail.com
[Adjust commit message prefix
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
Acked-by: Kevin Wolf
Message-id
201 - 300 of 900 matches
Mail list logo