Re: [PATCH v3] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

Chaitanya Kulkarni
2022-12-07T03:32:48Z

Bart,

On 12/6/22 10:43, Bart Van Assche wrote:
> On 12/5/22 08:20, Alvaro Karsz wrote:
>> +/* Get lifetime information struct for each request */
>> +struct virtio_blk_lifetime {
>> +    /*
>> +     * specifies the percentage of reserved blocks that are consumed.
>> +     * optional values following virtio spec:
>> +     * 0 - undefined
>> +     * 1 - normal, < 80% of reserved blocks are consumed
>> +     * 2 - warning, 80% of reserved blocks are consumed
>> +     * 3 - urgent, 90% of reserved blocks are consumed
>> +     */
>> +    __le16 pre_eol_info;
>> +    /*
>> +     * this field refers to wear of SLC cells and is provided in
>> increments of 10used,
>> +     * and so on, thru to 11 meaning estimated lifetime exceeded. All
>> values above 11
>> +     * are reserved
>> +     */
>> +    __le16 device_lifetime_est_typ_a;
>> +    /*
>> +     * this field refers to wear of MLC cells and is provided with
>> the same semantics as
>> +     * device_lifetime_est_typ_a
>> +     */
>> +    __le16 device_lifetime_est_typ_b;
>> +};
>
> Why does the above data structure only refer to SLC and MLC but not to
> TLC or QLC?
>
> How will this data structure be extended without having to introduce a
> new ioctl?
>
> Thanks,
>
> Bart.
>

We already discussed that see :-

https://lists.linuxfoundation.org/pipermail/virtualization/2022-November/063742.html

-ck