#
4cfc766e |
| 21-Oct-2015 |
Dan Williams <dan.j.williams@intel.com> |
nvme: suspend i/o during runtime blk_integrity_unregister
Synchronize pending i/o against a change in the integrity profile to avoid the possibility of spurious integrity errors.
Cc: Matthew Wilcox
nvme: suspend i/o during runtime blk_integrity_unregister
Synchronize pending i/o against a change in the integrity profile to avoid the possibility of spurious integrity errors.
Cc: Matthew Wilcox <willy@linux.intel.com> Acked-by: Keith Busch <keith.busch@intel.com> [keith: also protect dynamic integrity registration] Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
9609b994 |
| 21-Oct-2015 |
Dan Williams <dan.j.williams@intel.com> |
md, dm, scsi, nvme, libnvdimm: drop blk_integrity_unregister() at shutdown
Now that the integrity profile is statically allocated there is no work to do when shutting down an integrity enabled block
md, dm, scsi, nvme, libnvdimm: drop blk_integrity_unregister() at shutdown
Now that the integrity profile is statically allocated there is no work to do when shutting down an integrity enabled block device.
Cc: Matthew Wilcox <willy@linux.intel.com> Cc: Mike Snitzer <snitzer@redhat.com> Cc: James Bottomley <JBottomley@Odin.com> Acked-by: NeilBrown <neilb@suse.com> Acked-by: Keith Busch <keith.busch@intel.com> Acked-by: Vishal Verma <vishal.l.verma@intel.com> Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
25520d55 |
| 21-Oct-2015 |
Martin K. Petersen <martin.petersen@oracle.com> |
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 probl
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>
show more ...
|
#
0f8087ec |
| 21-Oct-2015 |
Martin K. Petersen <martin.petersen@oracle.com> |
block: Consolidate static integrity profile properties
We previously made a complete copy of a device's data integrity profile even though several of the fields inside the blk_integrity struct are p
block: Consolidate static integrity profile properties
We previously made a complete copy of a device's data integrity profile even though several of the fields inside the blk_integrity struct are pointers to fixed template entries in t10-pi.c.
Split the static and per-device portions so that we can reference the template directly.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reported-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagig@mellanox.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>
show more ...
|
#
ef658fc2 |
| 15-Oct-2015 |
Jens Axboe <axboe@fb.com> |
NVMe: initialize error to '0'
Reported-by: Keith Busch <keith.busch@intel.com> Fixes: 1951feae88c5 ("nvme: use an integer value to Linux errno values") Signed-off-by: Jens Axboe <axboe@fb.com>
|
#
1951feae |
| 12-Oct-2015 |
Christoph Hellwig <hch@lst.de> |
nvme: use an integer value to Linux errno values
Use a separate integer variable to hold the signed Linux errno values we pass back to the block layer. Note that for pass through commands those mig
nvme: use an integer value to Linux errno values
Use a separate integer variable to hold the signed Linux errno values we pass back to the block layer. Note that for pass through commands those might still be NVMe values, but those fit into the int as well.
Fixes: f4829a9b7a61: ("blk-mq: fix racy updates of rq->errors") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
3d42e67f |
| 06-Oct-2015 |
Arnd Bergmann <arnd@arndb.de> |
nvme: fix 32-bit build warning
Compiling the nvme driver on 32-bit warns about a cast from a __u64 variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io': drivers/block/nvme
nvme: fix 32-bit build warning
Compiling the nvme driver on 32-bit warns about a cast from a __u64 variable to a pointer:
drivers/block/nvme-core.c: In function 'nvme_submit_io': drivers/block/nvme-core.c:1847:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void __user *)io.addr, length, NULL, 0);
The cast here is intentional and safe, so we can shut up the gcc warning by adding an intermediate cast to 'uintptr_t'.
I had previously submitted a patch to fix this problem in the nvme driver, but it was accepted on the same day that two new warnings got added.
For clarification, I also change the third instance of this cast to use uintptr_t instead of unsigned long now.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: d29ec8241c10e ("nvme: submit internal commands through the block layer") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
57dacad5 |
| 09-Oct-2015 |
Jay Sternberg <jay.e.sternberg@intel.com> |
nvme: move to a new drivers/nvme/host directory
This patch moves the NVMe driver from drivers/block/ to its own new drivers/nvme/host/ directory. This is in preparation of splitting the current mon
nvme: move to a new drivers/nvme/host directory
This patch moves the NVMe driver from drivers/block/ to its own new drivers/nvme/host/ directory. This is in preparation of splitting the current monolithic driver up and add support for the upcoming NVMe over Fabrics standard. The drivers/nvme/host/ is chose to leave space for a NVMe target implementation in addition to this host side driver.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> [hch: rebased, renamed core.c to pci.c, slight tweaks] Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|