aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/admin-cmd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-01 08:59:25 +0200
committerChristoph Hellwig <hch@lst.de>2018-07-27 19:13:06 +0200
commit62ac0d32f74ea511d5813be728dc589d03f866a3 (patch)
tree9e707f80d3c84f64117349e24bcd37dc6a4a91c6 /drivers/nvme/target/admin-cmd.c
parentnvmet: add minimal ANA support (diff)
downloadlinux-dev-62ac0d32f74ea511d5813be728dc589d03f866a3.tar.xz
linux-dev-62ac0d32f74ea511d5813be728dc589d03f866a3.zip
nvmet: support configuring ANA groups
Allow creating non-default ANA groups (group ID > 1). Groups are created either by assigning the group ID to a namespace, or by creating a configfs group object under a specific port. All namespaces assigned to a group that doesn't have a configfs object for a given port are marked as inaccessible. Allow changing the ANA state on a per-port basis by creating an ana_groups directory under each port, and another directory with an ana_state file in it. The default ANA group 1 directory is created automatically for each port. For all changes in ANA configuration the ANA change AEN is sent. We only keep a global changecount instead of additional per-group changecounts to keep the implementation as simple as possible. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Diffstat (limited to '')
-rw-r--r--drivers/nvme/target/admin-cmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index b98d38c4e579..d1de639786ee 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -235,6 +235,7 @@ static void nvmet_execute_get_log_page_ana(struct nvmet_req *req)
hdr.chgcnt = cpu_to_le64(nvmet_ana_chgcnt);
hdr.ngrps = cpu_to_le16(ngrps);
+ clear_bit(NVME_AEN_CFG_ANA_CHANGE, &req->sq->ctrl->aen_masked);
up_read(&nvmet_ana_sem);
kfree(desc);