]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virtio_blk: Add support for lifetime feature
authorEnrico Granata <egranata@google.com>
Tue, 30 Mar 2021 23:16:02 +0000 (23:16 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 9 Apr 2021 16:16:49 +0000 (12:16 -0400)
commit256672e2d09e665d3e985d2ddd1b7ca93de002c6
treed966978377aa1d8cd966bfe6fb419205b28b6b88
parent593df7c6ea9bdc4ab9486cd102189990597ac836
virtio_blk: Add support for lifetime feature

The VirtIO TC has adopted a new feature in virtio-blk enabling
discovery of lifetime information.

This commit adds support for the VIRTIO_BLK_T_LIFETIME command
to the virtio_blk driver, and adds two new attributes to the
sysfs entry for virtio_blk:
* pre_eol_info
* life_time

which are defined in the same manner as the files of the same name
for the eMMC driver, in line with the VirtIO specification.

Signed-off-by: Enrico Granata <egranata@google.com>
Link: https://lore.kernel.org/r/20210330231602.1223216-1-egranata@google.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/block/virtio_blk.c
include/uapi/linux/virtio_blk.h