diff options
author | jimharris <jimharris@FreeBSD.org> | 2015-11-23 17:27:29 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2015-11-23 17:27:29 +0000 |
commit | 2a5cbf223de62db87460aecbca30405dbee59ade (patch) | |
tree | e92e6de3e09efc9b1d02697950faaa6a629f8f93 | |
parent | e7b87655f99a1ecf09ab62b98b6c0fe5c00ada72 (diff) | |
download | FreeBSD-src-2a5cbf223de62db87460aecbca30405dbee59ade.zip FreeBSD-src-2a5cbf223de62db87460aecbca30405dbee59ade.tar.gz |
MFC r290199:
nvd, nvme: report stripesize through GEOM disk layer
Sponsored by: Intel
-rw-r--r-- | sys/dev/nvd/nvd.c | 1 | ||||
-rw-r--r-- | sys/dev/nvme/nvme.h | 1 | ||||
-rw-r--r-- | sys/dev/nvme/nvme_ns.c | 7 |
3 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c index 016d728..5d75876 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -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; diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 111a932..7e41e77 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -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); diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index c6a00df..754d074 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -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) { |