freebsd-dev/sys/dev/nvme
Kenneth D. Merry ce625ec719 Change the way that unmapped I/O capability is advertised.
The previous method was to set the D_UNMAPPED_IO flag in the cdevsw
for the driver.  The problem with this is that in many cases (e.g.
sa(4)) there may be some instances of the driver that can handle
unmapped I/O and some that can't.  The isp(4) driver can handle
unmapped I/O, but the esp(4) driver currently cannot.  The cdevsw
is shared among all driver instances.

So instead of setting a flag on the cdevsw, set a flag on the cdev.
This allows drivers to indicate support for unmapped I/O on a
per-instance basis.

sys/conf.h:	Remove the D_UNMAPPED_IO cdevsw flag and replace it
		with an SI_UNMAPPED cdev flag.

kern_physio.c:	Look at the cdev SI_UNMAPPED flag to determine
		whether or not a particular driver can handle
		unmapped I/O.

geom_dev.c:	Set the SI_UNMAPPED flag for all GEOM cdevs.
		Since GEOM will create a temporary mapping when
		needed, setting SI_UNMAPPED unconditionally will
		work.

		Remove the D_UNMAPPED_IO flag.

nvme_ns.c:	Set the SI_UNMAPPED flag on cdevs created here
		if NVME_UNMAPPED_BIO_SUPPORT is enabled.

vfs_aio.c:	In aio_qphysio(), check the SI_UNMAPPED flag on a
		cdev instead of the D_UNMAPPED_IO flag on the cdevsw.

sys/param.h:	Bump __FreeBSD_version to 1000045 for the switch from
		setting the D_UNMAPPED_IO flag in the cdevsw to setting
		SI_UNMAPPED in the cdev.

Reviewed by:	kib, jimharris
MFC after:	1 week
Sponsored by:	Spectra Logic
2013-08-15 22:52:39 +00:00
..
nvme_ctrlr_cmd.c Update copyright dates. 2013-07-09 21:22:17 +00:00
nvme_ctrlr.c Send a shutdown notification in the driver unload path, to ensure 2013-08-13 21:47:08 +00:00
nvme_ns_cmd.c Fix nvme(4) and nvd(4) to support non 512-byte sector sizes. 2013-07-19 21:33:24 +00:00
nvme_ns.c Change the way that unmapped I/O capability is advertised. 2013-08-15 22:52:39 +00:00
nvme_private.h Send a shutdown notification in the driver unload path, to ensure 2013-08-13 21:47:08 +00:00
nvme_qpair.c Update copyright dates. 2013-07-09 21:22:17 +00:00
nvme_sysctl.c Update copyright dates. 2013-07-09 21:22:17 +00:00
nvme_test.c Update copyright dates. 2013-07-09 21:22:17 +00:00
nvme_util.c Add message when nvd disks are attached and detached. 2013-07-19 21:40:57 +00:00
nvme.c If a controller fails to initialize, do not notify consumers (nvd) of its 2013-08-13 21:49:32 +00:00
nvme.h Send a shutdown notification in the driver unload path, to ensure 2013-08-13 21:47:08 +00:00