- 24 Jun, 2015 1 commit
-
-
Selvan Mani authored
In mtip_pci_remove(), driver data 'dd' is accessed after freeing it. This is a residue of SRSI code cleanup in the patch 016a41c38821 "mtip32xx: fix crash on surprise removal of the drive". Removed the bit flags MTIP_DDF_REMOVE_DONE_BIT and MTIP_PF_SR_CLEANUP_BIT. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Vignesh Gunasekaran <vgunasekaran@micron.com> Signed-off-by: Selvan Mani <smani@micron.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 20 Jun, 2015 1 commit
-
-
Axel Lin authored
res variable was initialized to -ENOMEM, but it's override by nvme_trans_copy_from_user(). So current code returns 0 if kcalloc fails. Fix it to return proper error code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 19 Jun, 2015 1 commit
-
-
Keith Busch authored
This fixes io submit ioctl handling when using extended metadata formats. When these formats are used, the user provides a single virtually contiguous buffer containing both the block and metadata interleaved, so the metadata size needs to be added to the total length and not mapped as a separate transfer. The command is also driver generated, so this patch does not enforce blk-integrity extensions provide the metadata buffer. Reported-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 17 Jun, 2015 1 commit
-
-
Matias Bjørling authored
In __nvme_submit_sync_cmd, the request direction is overwritten when the REQ_FAILFAST_DRIVER flag is set. Signed-off-by: Matias Bjørling <m@bjorling.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Fixes: 75619bfa ("NVMe: End sync requests immediately on failure") Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 16 Jun, 2015 8 commits
-
-
Asai Thambi SP authored
In LUN failure conditions, device takes longer time to complete the hba reset. Increased wait time from 1 second to 10 seconds. Signed-off-by: Sam Bradshaw <sbradshaw@micron.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Asai Thambi SP authored
When a device is surprise removed and inserted, it is assigned a new minor number because driver use multiples of 'instance' number. Modified to use the multiples of 'index' for minor number. Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Asai Thambi SP authored
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Asai Thambi SP authored
pci and block layers have changed a lot compared to when SRSI support was added. Given the current state of pci and block layers, this driver do not have to do any specific handling. Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Selvan Mani <smani@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Asai Thambi SP authored
Currently I/Os are being queued when secure erase operation starts, and issue them after the operation completes. As all data will be gone when the operation completes, any queued I/O doesn't make sense. Hence, abort I/O (return -ENODATA) as soon as the driver receives. Signed-off-by: Selvan Mani <smani@micron.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Asai Thambi SP authored
Fix incorrectly setting MTIP_DDF_SEC_LOCK_BIT Signed-off-by: Selvan Mani <smani@micron.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Asai Thambi SP authored
Remove unused variable 'port->allocated' Signed-off-by: Selvan Mani <smani@micron.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Asai Thambi SP authored
put_disk() need to be called after del_gendisk() to free the disk object structure. Signed-off-by: Selvan Mani <smani@micron.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 10 Jun, 2015 3 commits
-
-
Geoff Levand authored
Add myself as co-maintainer of the ps3vram block driver, and add linuxppc-dev as a relevant mailing list. I have been acting as maintainer of this driver for the last several years, and if there is some inquiry regarding it I would like to be notified. Signed-off-by: Geoff Levand <geoff@infradead.org> Acked-by: Jim Paris <jim@jtan.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Geert Uytterhoeven authored
The ps3vram driver is a plain block device driver since commit f507cd22 ("ps3/block: Replace mtd/ps3vram by block/ps3vram"). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Geoff Levand <geoff@infradead.org> Acked-by: Jim Paris <jim@jtan.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Geoff Levand authored
Fix sparse warnings like these: drivers/block/ps3vram.c: warning: incorrect type in assignment (different address spaces) drivers/block/ps3vram.c: expected unsigned int [usertype] *ctrl drivers/block/ps3vram.c: got void [noderef] <asn:2>* Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Geoff Levand <geoff@infradead.org> Acked-by: Jim Paris <jim@jtan.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 05 Jun, 2015 5 commits
-
-
Keith Busch authored
Namespaces may be dynamically allocated and deleted or attached and detached. This has the driver rescan the device for namespace changes after each device reset or namespace change asynchronous event. There could potentially be many detached namespaces that we don't want polluting /dev/ with unusable block handles, so this will delete disks if the namespace is not active as indicated by the response from identify namespace. This also skips adding the disk if no capacity is provisioned to the namespace in the first place. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Jens Axboe authored
-
Jens Axboe authored
We export this function and NVMe wants to use it, but for some reason it was never added to the block header. Do that. Signed-off-by: Jens Axboe <axboe@fb.com>
-
Jon Derrick authored
Protects against reordering and/or preempting which would allow the kthread to access the queue descriptor before it is set up Signed-off-by: Jon Derrick <jonathan.derrick@intel.com> Acked-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Keith Busch authored
We need the ability to perform an nvme controller reset as discussed on the mailing list thread: http://lists.infradead.org/pipermail/linux-nvme/2015-March/001585.html This adds a sysfs entry that when written to will reset perform an NVMe controller reset if the controller was successfully initialized in the first place. This also adds locking around resetting the device in the async probe method so the driver can't schedule two resets. Signed-off-by: Keith Busch <keith.busch@intel.com> Cc: Brandon Schultz <brandon.schulz@hgst.com> Cc: David Sariel <david.sariel@pmcs.com> Updated by Jens to: 1) Merge this with the ioctl reset patch from David Sariel. The ioctl path now shares the reset code from the sysfs path. 2) Don't flush work if we fail issuing the reset. Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 02 Jun, 2015 2 commits
-
-
Akinobu Mita authored
When irqmode=2 (IRQ completion handler is timer) and queue_mode=1 (Block interface to use is rq), the completion handler should restart request handling for any pending requests on a queue because request processing stops when the number of commands are queued more than hw_queue_depth (null_rq_prep_fn returns BLKPREP_DEFER). Without this change, the following command cannot finish. # modprobe null_blk irqmode=2 queue_mode=1 hw_queue_depth=1 # fio --name=t --rw=read --size=1g --direct=1 \ --ioengine=libaio --iodepth=64 --filename=/dev/nullb0 Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Jens Axboe <axboe@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Akinobu Mita authored
When irqmode=2 (IRQ completion handler is timer), timer handler should be called on the same CPU where the timer has been started. Since completion_queues are per-cpu and the completion handler only touches completion_queue for local CPU, we need to prevent the handler from running on a different CPU where the timer has been started. Otherwise, the IO cannot be completed until another completion handler is executed on that CPU. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Jens Axboe <axboe@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 01 Jun, 2015 3 commits
-
-
Keith Busch authored
The driver needs to track shared tags to support multiple namespaces that may be dynamically allocated or deleted. Relying on the first request_queue's hctx's is not appropriate as we cannot clear outstanding tags for all namespaces using this handle, nor can the driver easily track all request_queue's hctx as namespaces are attached/detached. Instead, this patch uses the nvme_dev's tagset to get the shared tag resources instead of through a request_queue hctx. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Jens Axboe authored
-
Keith Busch authored
Storage controllers may expose multiple block devices that share hardware resources managed by blk-mq. This patch enhances the shared tags so a low-level driver can access the shared resources not tied to the unshared h/w contexts. This way the LLD can dynamically add and delete disks and request queues without having to track all the request_queue hctx's to iterate outstanding tags. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 29 May, 2015 4 commits
-
-
Jens Axboe authored
We don't need to honor chunk sizes for IO that doesn't carry any data. Signed-off-by: Jens Axboe <axboe@fb.com>
-
Jens Axboe authored
We can safely merge anything that wont generate an SG list entry, so if the bio is data-less (discard), don't look at potential SG gaps. Signed-off-by: Jens Axboe <axboe@fb.com>
-
Keith Busch authored
Do not retry failed sync commands so the original status may be seen without issuing unnecessary retries. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Keith Busch authored
Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 26 May, 2015 1 commit
-
-
Julia Lawall authored
Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Jens Axboe <axboe@fb.com>
-
- 22 May, 2015 10 commits
-
-
Keith Busch authored
Replaces req->sense_len usage, which is not owned by the LLD, to req->special to contain the command result for driver created commands, and sets the result unconditionally on completion. Signed-off-by: Keith Busch <keith.busch@intel.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@fb.com> Fixes: d29ec824 ("nvme: submit internal commands through the block layer") Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
Currently dm-multipath has to clone the bios for every request sent to the lower devices, which wastes cpu cycles and ties down memory. This patch instead adds a new REQ_CLONE flag that instructs req_bio_endio to not complete bios attached to a request, which we set on clone requests similar to bios in a flush sequence. With this change I/O errors on a path failure only get propagated to dm-multipath, which can then either resubmit the I/O or complete the bios on the original request. I've done some basic testing of this on a Linux target with ALUA support, and it survives path failures during I/O nicely. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Mike Snitzer authored
Commit c4cf5261 ("bio: skip atomic inc/dec of ->bi_remaining for non-chains") regressed all existing callers that followed this pattern: 1) saving a bio's original bi_end_io 2) wiring up an intermediate bi_end_io 3) restoring the original bi_end_io from intermediate bi_end_io 4) calling bio_endio() to execute the restored original bi_end_io The regression was due to BIO_CHAIN only ever getting set if bio_inc_remaining() is called. For the above pattern it isn't set until step 3 above (step 2 would've needed to establish BIO_CHAIN). As such the first bio_endio(), in step 2 above, never decremented __bi_remaining before calling the intermediate bi_end_io -- leaving __bi_remaining with the value 1 instead of 0. When bio_inc_remaining() occurred during step 3 it brought it to a value of 2. When the second bio_endio() was called, in step 4 above, it should've called the original bi_end_io but it didn't because there was an extra reference that wasn't dropped (due to atomic operations being optimized away since BIO_CHAIN wasn't set upfront). Fix this issue by removing the __bi_remaining management complexity for all callers that use the above pattern -- bio_chain() is the only interface that _needs_ to be concerned with __bi_remaining. For the above pattern callers just expect the bi_end_io they set to get called! Remove bio_endio_nodec() and also remove all bio_inc_remaining() calls that aren't associated with the bio_chain() interface. Also, the bio_inc_remaining() interface has been moved local to bio.c. Fixes: c4cf5261 ("bio: skip atomic inc/dec of ->bi_remaining for non-chains") Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
Use block layer queues with an internal cmd_type to submit internally generated NVMe commands. This both simplifies the code a lot and allow for a better structure. For example now the LighNVM code can construct commands without knowing the details of the underlying I/O descriptors. Or a future NVMe over network target could inject commands, as well as could the SCSI translation and ioctl code be reused for such a beast. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
NVMe device always support the FUA bit, and the SCSI translations accepts the DPO bit, which doesn't have much of a meaning for us. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
Erorr handling for the scsi translation was completely broken, as there were two different positive error number spaces overlapping. Fix this up by removing one of them, and centralizing the generation of the other positive values in a single place. Also fix up a few places that didn't handle the NVMe error codes properly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-
Christoph Hellwig authored
This function handles two totally different opcodes, so split it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-