linux/drivers/nvdimm
Martin K. Petersen 25520d55cd block: Inline blk_integrity in struct gendisk
Up until now the_integrity profile has been dynamically allocated and
attached to struct gendisk after the disk has been made active.

This causes problems because NVMe devices need to register the profile
prior to the partition table being read due to a mandatory metadata
buffer requirement. In addition, DM goes through hoops to deal with
preallocating, but not initializing integrity profiles.

Since the integrity profile is small (4 bytes + a pointer), Christoph
suggested moving it to struct gendisk proper. This requires several
changes:

 - Moving the blk_integrity definition to genhd.h.

 - Inlining blk_integrity in struct gendisk.

 - Removing the dynamic allocation code.

 - Adding helper functions which allow gendisk to set up and tear down
   the integrity sysfs dir when a disk is added/deleted.

 - Adding a blk_integrity_revalidate() callback for updating the stable
   pages bdi setting.

 - The calls that depend on whether a device has an integrity profile or
   not now key off of the bi->profile pointer.

 - Simplifying the integrity support routines in DM (Mike Snitzer).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-10-21 14:42:42 -06:00
..
blk.c block: add a bi_error field to struct bio 2015-07-29 08:55:15 -06:00
btt.c libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
btt.h libnvdimm, btt: consolidate arena validation 2015-08-14 13:43:04 -04:00
btt_devs.c libnvdimm: btt_devs: Fix locking in namespace_store 2015-09-17 11:37:16 -04:00
bus.c nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails 2015-06-30 14:30:34 -04:00
claim.c libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
core.c block: Inline blk_integrity in struct gendisk 2015-10-21 14:42:42 -06:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
dimm_devs.c nvdimm: change to use generic kvfree() 2015-08-27 19:35:48 -04:00
e820.c libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00
Kconfig libnvdimm, pmem: 'struct page' for pmem 2015-08-28 23:40:04 -04:00
label.c libnvdimm: infrastructure for btt devices 2015-06-25 04:20:04 -04:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
Makefile libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
namespace_devs.c libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00
nd-core.h libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
nd.h libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00
pfn.h libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
pfn_devs.c libnvdimm: pfn_devs: Fix locking in namespace_store 2015-09-17 11:47:50 -04:00
pmem.c pmem: add proper fencing to pmem_rw_page() 2015-09-17 11:49:28 -04:00
region.c libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
region_devs.c libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00