nvmet: Move serial number from controller to subsystem
The NVMe specification defines the serial number as: "Serial Number (SN): Contains the serial number for the NVM subsystem that is assigned by the vendor as an ASCII string. Refer to section 7.10 for unique identifier requirements. Refer to section 1.5 for ASCII string requirements" So move it from the controller to the subsystem, where it belongs. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
41528f8036
commit
2e7f5d2af2
@@ -185,7 +185,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
|
||||
id->ssvid = 0;
|
||||
|
||||
memset(id->sn, ' ', sizeof(id->sn));
|
||||
snprintf(id->sn, sizeof(id->sn), "%llx", ctrl->serial);
|
||||
snprintf(id->sn, sizeof(id->sn), "%llx", ctrl->subsys->serial);
|
||||
|
||||
memset(id->mn, ' ', sizeof(id->mn));
|
||||
strncpy((char *)id->mn, "Linux", sizeof(id->mn));
|
||||
|
Reference in New Issue
Block a user