Report proper stripesize for nda(4).
Same as for nvd(4) report NPWG if present, otherise NOIOB. MFC after: 1 week
This commit is contained in:
parent
e8cc9e1d84
commit
1c7decd4de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364178
@ -943,7 +943,11 @@ ndaregister(struct cam_periph *periph, void *arg)
|
||||
disk->d_hba_subdevice = cpi.hba_subdevice;
|
||||
snprintf(disk->d_attachment, sizeof(disk->d_attachment),
|
||||
"%s%d", cpi.dev_name, cpi.unit_number);
|
||||
disk->d_stripesize = disk->d_sectorsize;
|
||||
if (((nsd->nsfeat >> NVME_NS_DATA_NSFEAT_NPVALID_SHIFT) &
|
||||
NVME_NS_DATA_NSFEAT_NPVALID_MASK) != 0 && nsd->npwg != 0)
|
||||
disk->d_stripesize = ((nsd->npwg + 1) * disk->d_sectorsize);
|
||||
else
|
||||
disk->d_stripesize = nsd->noiob * disk->d_sectorsize;
|
||||
disk->d_stripeoffset = 0;
|
||||
disk->d_devstat = devstat_new_entry(periph->periph_name,
|
||||
periph->unit_number, disk->d_sectorsize,
|
||||
|
Loading…
Reference in New Issue
Block a user