]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: set gendisk read only based on nsattr
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Wed, 8 Aug 2018 06:01:06 +0000 (23:01 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 8 Aug 2018 09:55:49 +0000 (11:55 +0200)
commitfb754db1b2abdcda69d6dcd22c9c2331f8bd09bf
treee7e7558e7d9c9d4675893cd12e1fc52d9851e326
parent90ad5f3d8960e640d9deabc601a99ad70e5e0070
nvme: set gendisk read only based on nsattr

NVMe 1.3 TP 4005 introduces new filed (NSATTR). This field indicates
whether given namespace is write protected or not. This patch sets the
gendisk associated with the namespace to read only based on the identify
namespace nsattr field.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c