OSDN Git Service

nvmet: add metadata/T10-PI support
authorIsrael Rukshin <israelr@mellanox.com>
Tue, 19 May 2020 14:06:01 +0000 (17:06 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 27 May 2020 05:12:40 +0000 (07:12 +0200)
commitea52ac1c6605fbd25347fabf46233e260dd92eb2
tree0a8913baad0cbf3cc2a5c056cb437afe711961f4
parent39481fbd14ee272edd419d73a98bc637e2a3fd35
nvmet: add metadata/T10-PI support

Expose the namespace metadata format when PI is enabled. The user needs
to enable the capability per subsystem and per port. The other metadata
properties are taken from the namespace/bdev.

Usage example:
echo 1 > /config/nvmet/subsystems/${NAME}/attr_pi_enable
echo 1 > /config/nvmet/ports/${PORT_NUM}/param_pi_enable

Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/configfs.c
drivers/nvme/target/core.c
drivers/nvme/target/fabrics-cmd.c
drivers/nvme/target/nvmet.h