Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2015 17:27:30 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r291214 - in stable/10/sys/dev: nvd nvme
Message-ID:  <201511231727.tANHRU5k048899@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Mon Nov 23 17:27:29 2015
New Revision: 291214
URL: https://svnweb.freebsd.org/changeset/base/291214

Log:
  MFC r290199:
  
    nvd, nvme: report stripesize through GEOM disk layer
  
  Sponsored by:	Intel

Modified:
  stable/10/sys/dev/nvd/nvd.c
  stable/10/sys/dev/nvme/nvme.h
  stable/10/sys/dev/nvme/nvme_ns.c

Modified: stable/10/sys/dev/nvd/nvd.c
==============================================================================
--- stable/10/sys/dev/nvd/nvd.c	Mon Nov 23 17:26:20 2015	(r291213)
+++ stable/10/sys/dev/nvd/nvd.c	Mon Nov 23 17:27:29 2015	(r291214)
@@ -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: stable/10/sys/dev/nvme/nvme.h
==============================================================================
--- stable/10/sys/dev/nvme/nvme.h	Mon Nov 23 17:26:20 2015	(r291213)
+++ stable/10/sys/dev/nvme/nvme.h	Mon Nov 23 17:27:29 2015	(r291214)
@@ -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: stable/10/sys/dev/nvme/nvme_ns.c
==============================================================================
--- stable/10/sys/dev/nvme/nvme_ns.c	Mon Nov 23 17:26:20 2015	(r291213)
+++ stable/10/sys/dev/nvme/nvme_ns.c	Mon Nov 23 17:27:29 2015	(r291214)
@@ -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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511231727.tANHRU5k048899>