NVMe: Add revalidate_disk callback
authorKeith Busch <keith.busch@intel.com>
Wed, 10 Sep 2014 23:21:14 +0000 (17:21 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 4 Nov 2014 20:17:09 +0000 (13:17 -0700)
commit1b9dbf7fe02d85f70e8efc1c12c070206c0d5c5f
treec1fc5b8c2d57092781eeee197cb6dc84c3e2f1b8
parent7be50e93fbc281967589a04be5b1125539b0d0e2
NVMe: Add revalidate_disk callback

This adds a callback to revalidate the disk and change its block size
and capacity if needed. Before, a user would have to remove + rescan
an entire device if they changed the logical block size using an NVMe
Format or other vendor specific command; now they can just run something
that issues the BLKRRPART IOCTL, like

 # hdparm -z /dev/nvmeXnY

This can also be used in response to the 1.2 Spec's Namespace Attribute
Change asynchronous event.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c