Selaa lähdekoodia

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
Jens Axboe 6 vuotta sitten
vanhempi
commit
d611aaf336
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      drivers/nvme/target/admin-cmd.c

+ 4 - 0
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);