Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-16 Thread Stefan Hajnoczi
On Fri, Mar 10, 2023 at 06:31:03PM +0800, Sam Li wrote: > @@ -2338,9 +2424,15 @@ static int coroutine_fn raw_co_prw(BlockDriverState > *bs, uint64_t offset, > { > BDRVRawState *s = bs->opaque; > RawPosixAIOData acb; > +int ret; > > if (fd_open(bs) < 0) > return

Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-15 Thread Damien Le Moal
On 3/15/23 21:59, Sam Li wrote: > Damien Le Moal 于2023年3月14日周二 11:49写道: >> >> On 3/14/23 11:23, Dmitry Fomichev wrote: @@ -3339,10 +3473,27 @@ static int coroutine_fn raw_co_zone_mgmt(BlockDriverState *bs, BlockZoneOp op, len >> BDRV_SECTOR_BITS);

Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-15 Thread Sam Li
Damien Le Moal 于2023年3月14日周二 11:49写道: > > On 3/14/23 11:23, Dmitry Fomichev wrote: > >> @@ -3339,10 +3473,27 @@ static int coroutine_fn > >> raw_co_zone_mgmt(BlockDriverState *bs, BlockZoneOp op, > >> len >> BDRV_SECTOR_BITS); > >> ret = raw_thread_pool_submit(bs,

Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-13 Thread Damien Le Moal
On 3/14/23 11:23, Dmitry Fomichev wrote: >> @@ -3339,10 +3473,27 @@ static int coroutine_fn >> raw_co_zone_mgmt(BlockDriverState *bs, BlockZoneOp op, >> len >> BDRV_SECTOR_BITS); >> ret = raw_thread_pool_submit(bs, handle_aiocb_zone_mgmt, ); >> if (ret != 0) { >>

Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-13 Thread Dmitry Fomichev
On Fri, 2023-03-10 at 18:31 +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 emulation using regular writes. To do this, the file-posix > driver tracks the wp

[PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-10 Thread Sam Li
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 location of all zones of the device. It uses an array of