OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] [RFC PATCH] virtio-blk: add zoned block device specification


On Fri, Jun 03, 2022 at 05:16:01PM +0900, Damien Le Moal wrote:
> On 6/3/22 16:33, Stefan Hajnoczi wrote:
> [...]
> >> If partial is 0, the nr_zones will contain the number of zones that potentially
> >> can be reported starting from the request "sector" position and until the end of
> >> sector range of the device. It does not necessarily equal the total number of
> >> zones on the drive.
> > 
> > The driver knows zone_sectors and nr_zones, so it can calculate
> > nr_zones - (sector / zone_sectors) itself. Why send a ZONE_REPORT
> > partial=0 request to the device to get this value?
> 
> Good point. Indeed, the partial bit is not useful when we have all zone
> with the same size. ZBC does not enforce that. So in general, it is not
> possible to calculate the number of zones starting from a particular LBA
> even if the total capacity is known. A report zones reply thus always
> indicate the *total* number of zones that could be reported from a given
> LBA, regardless of the report buffer size. This forces the drives to go
> through all zones even if the report zones buffer is already filled up. So
> longer command execution times.
> 
> The partial bit prevents that and is very useful to speedup a zone report
> for a single zone (e.g. to know that zone wp location).
> 
> For a Linux host, since the kernel enforces that all zones must have the
> same size, the partial bit is not useful. But other hosts may not enforce
> this, in which case the partial bit can be useful.
> 
> That said, I would not mind getting rid of it and assume a partial=1
> behavior, always. The kernel ioctl API does not have that parameter
> anyway, so it would have to be emulated by the driver. Not too hard to do,
> but still more code than strictly necessary.

Okay. We can start simple and introduce a feature bit later for devices
that have multiple zone sizes, if necessary.

Stefan

Attachment: signature.asc
Description: PGP signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]