nvd, nvme: report stripesize through GEOM disk layer

MFC after:	3 days
Sponsored by:	Intel
This commit is contained in:
Jim Harris 2015-10-30 16:35:18 +00:00
parent e7e7bad3d7
commit fdbd3d8068
3 changed files with 9 additions and 0 deletions

View File

@ -279,6 +279,7 @@ nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_arg)
disk->d_sectorsize = nvme_ns_get_sector_size(ns);
disk->d_mediasize = (off_t)nvme_ns_get_size(ns);
disk->d_delmaxsize = (off_t)nvme_ns_get_size(ns);
disk->d_stripesize = nvme_ns_get_stripesize(ns);
if (TAILQ_EMPTY(&disk_head))
disk->d_unit = 0;

View File

@ -870,6 +870,7 @@ const char * nvme_ns_get_serial_number(struct nvme_namespace *ns);
const char * nvme_ns_get_model_number(struct nvme_namespace *ns);
const struct nvme_namespace_data *
nvme_ns_get_data(struct nvme_namespace *ns);
uint32_t nvme_ns_get_stripesize(struct nvme_namespace *ns);
int nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp,
nvme_cb_fn_t cb_fn);

View File

@ -210,6 +210,13 @@ nvme_ns_get_data(struct nvme_namespace *ns)
return (&ns->data);
}
uint32_t
nvme_ns_get_stripesize(struct nvme_namespace *ns)
{
return (ns->stripesize);
}
static void
nvme_ns_bio_done(void *arg, const struct nvme_completion *status)
{