diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-09-20 09:10:38 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-09-20 09:10:38 -0600 |
commit | d611aaf336b2e8e81f98490eabf7b92889b15319 (patch) | |
tree | 085d54f2975c17627363af0d34c3b213fdd173ac | |
parent | 65eea8edc315589d6c993cf12dbb5d0e9ef1fe4e (diff) | |
parent | be1277f5eb17a2e5788139eabb0b53dd04c695f3 (diff) |
Merge branch 'nvme-4.19' of git://git.infradead.org/nvme into for-linus
Pull NVMe fix from Christoph.
* 'nvme-4.19' of git://git.infradead.org/nvme:
nvme: count all ANA groups for ANA Log page
-rw-r--r-- | drivers/nvme/target/admin-cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index a21caea1e080..2008fa62a373 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c @@ -245,6 +245,10 @@ static void nvmet_execute_get_log_page_ana(struct nvmet_req *req) offset += len; ngrps++; } + for ( ; grpid <= NVMET_MAX_ANAGRPS; grpid++) { + if (nvmet_ana_group_enabled[grpid]) + ngrps++; + } hdr.chgcnt = cpu_to_le64(nvmet_ana_chgcnt); hdr.ngrps = cpu_to_le16(ngrps); |