svn commit: r290199 - in head/sys/dev: nvd nvme

Jim Harris jimharris at FreeBSD.org
Fri Oct 30 16:35:20 UTC 2015


Author: jimharris
Date: Fri Oct 30 16:35:18 2015
New Revision: 290199
URL: https://svnweb.freebsd.org/changeset/base/290199

Log:
  nvd, nvme: report stripesize through GEOM disk layer
  
  MFC after:	3 days
  Sponsored by:	Intel

Modified:
  head/sys/dev/nvd/nvd.c
  head/sys/dev/nvme/nvme.h
  head/sys/dev/nvme/nvme_ns.c

Modified: head/sys/dev/nvd/nvd.c
==============================================================================
--- head/sys/dev/nvd/nvd.c	Fri Oct 30 16:06:34 2015	(r290198)
+++ head/sys/dev/nvd/nvd.c	Fri Oct 30 16:35:18 2015	(r290199)
@@ -279,6 +279,7 @@ nvd_new_disk(struct nvme_namespace *ns, 
 	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;

Modified: head/sys/dev/nvme/nvme.h
==============================================================================
--- head/sys/dev/nvme/nvme.h	Fri Oct 30 16:06:34 2015	(r290198)
+++ head/sys/dev/nvme/nvme.h	Fri Oct 30 16:35:18 2015	(r290199)
@@ -870,6 +870,7 @@ const char *	nvme_ns_get_serial_number(s
 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);

Modified: head/sys/dev/nvme/nvme_ns.c
==============================================================================
--- head/sys/dev/nvme/nvme_ns.c	Fri Oct 30 16:06:34 2015	(r290198)
+++ head/sys/dev/nvme/nvme_ns.c	Fri Oct 30 16:35:18 2015	(r290199)
@@ -210,6 +210,13 @@ nvme_ns_get_data(struct nvme_namespace *
 	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)
 {


More information about the svn-src-head mailing list