nvmet: enable Discovery Controller AENs
authorJay Sternberg <jay.e.sternberg@intel.com>
Mon, 12 Nov 2018 21:56:40 +0000 (13:56 -0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:57 +0000 (22:26 -0700)
commitb662a078576e7d6e235b4e1b94863f0474cd8555
treecaa02a640907f3cd851d628ec71679ab8fe9c082
parent253928eec61a52935584777f0dfba6cdb63967b6
nvmet: enable Discovery Controller AENs

Add functions to find connections requesting Discovery Change events
and send a notification to hosts that maintain an explicit persistent
connection and have and active Asynchronous Event Request pending.
Only Hosts that have access to the Subsystem effected by the change
will receive notifications of Discovery Change event.

Call these functions each time there is a configfs change that effects
the Discover Log Pages.

Set the OAES field in the Identify Controller response to advertise the
support for Asynchronous Event Notifications.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Reviewed-by: Phil Cayton <phil.cayton@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/configfs.c
drivers/nvme/target/core.c
drivers/nvme/target/discovery.c
drivers/nvme/target/nvmet.h