Commit Graph
100 Commits
Author SHA1 Message Date
Christoph Hellwig 9c674815d3 IB/iser: Fix max_sectors calculation
iSER currently has a couple places that set max_sectors in either the host
template or SCSI host, and all of them get it wrong.

This patch instead uses a single assignment that (hopefully) gets it right:
the max_sectors value must be derived from the number of segments in the
FR or FMR structure, but actually be one lower than the page size multiplied
by the number of sectors, as it has to handle the case of non-aligned I/O.

Without this I get trivial to reproduce hangs when running xfstests
(on XFS) over iSER to Linux targets.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Max Gurtovoy <[email protected]>
Acked-by: Sagi Grimberg <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2016-05-05 12:41:24 -04:00
Christoph Hellwig 839559e106 target: add a new add_wwn_groups fabrics method
We need to have the WWN fully initialized before addig default groups to it,
so add a new method to add these groups after the WWN has been initialized.
Also remove the default groups in the core while we're at it.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-30 20:06:44 -07:00
Christoph Hellwig e6e202edf0 target: initialize the nacl base CIT begfore init_nodeacl
The iSCSI targets wants to add a default group, for which we need to
have the list of default groups initialized previously.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-30 20:06:43 -07:00
Christoph Hellwig ce7043fd90 target: remove ->fabric_cleanup_nodeacl
Instead we can clean up the list of default ACLs in core code.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-30 20:06:43 -07:00
Christoph Hellwig 10c4de10b2 nfsd: block and scsi layout drivers need to depend on CONFIG_BLOCK
Signed-off-by: Christoph Hellwig <[email protected]>
Reported-by: Randy Dunlap <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
2016-03-18 11:42:54 -04:00
Christoph Hellwig f99d4fbdae nfsd: add SCSI layout support
This is a simple extension to the block layout driver to use SCSI
persistent reservations for access control and fencing, as well as
SCSI VPD pages for device identification.

For this we need to pass the nfs4_client to the proc_getdeviceinfo method
to generate the reservation key, and add a new fence_client method
to allow for fence actions in the layout driver.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
2016-03-18 11:42:53 -04:00
Christoph Hellwig 368248eeb1 nfsd: move some blocklayout code
Trivial reorganization, no change in behavior.  Move some code around,
pull some code out of block layoutcommit that will be useful for the
scsi layout.

[[email protected]: split off from "nfsd: add SCSI layout support"]
Signed-off-by: J. Bruce Fields <[email protected]>
2016-03-18 11:41:17 -04:00
Christoph Hellwig 81c3932901 nfsd: add a new config option for the block layout driver
Split the config symbols into a generic pNFS one, which is invisible
and gets selected by the layout drivers, and one for the block layout
driver.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
2016-03-18 11:40:57 -04:00
Christoph Hellwig d9186c0397 nfs/blocklayout: add SCSI layout support
This is a trivial extension to the block layout driver to support the
new SCSI layouts draft.  There are three changes:

 - device identifcation through the SCSI VPD page.  This allows us to
   directly use the udev generated persistent device names instead of
   requiring an expensive lookup by crawling every block device node
   in /dev and reading a signature for it.
 - use of SCSI persistent reservations to protect device access and
   allow for robust fencing.  On the client sides this just means
   registering and unregistering a server supplied key.
 - an optimized LAYOUTCOMMIT payload that doesn't send unessecary
   fields to the server.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Trond Myklebust <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
2016-03-18 11:38:17 -04:00
Christoph Hellwig 40cf446b94 nfs4.h: add SCSI layout definitions
Based on draft-ietf-nfsv4-scsi-layout-05 after the WG last call.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
2016-03-17 14:57:16 -04:00
Christoph Hellwig 95d9f6c3ed nfs: remove nfs_inode_dio_wait
Just call inode_dio_wait directly instead of through a pointless wrapper.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
2016-03-16 15:42:43 -04:00
Christoph Hellwig 4ff79bc709 nfs: remove nfs4_file_fsync
The only difference to nfs_file_fsync is the call to pnfs_sync_inode.  But
pnfs_sync_inode is just an inline that calls a pNFS layout driver method
if CONFIG_PNFS is designed, and thus can be called just fine from the core
NFS module.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
2016-03-16 15:42:43 -04:00
Christoph Hellwig 355cced452 xfs: always set rvalp in xfs_dir2_node_trim_free
xfs_dir2_node_trim_free can return with setting the rvalp argument
pointer.  Initialize it to 0 at the beginning of the function and
only update it to 1 if we succeeded trimming a freespace block.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
2016-03-15 11:44:18 +11:00
Christoph Hellwig 2b88551711 block: bio_remaining_done() isn't unlikely
We use bio chaining during most I/Os these days due to the delayed
bio splitting.  Additionally XFS will start using it, and there is
a pending direct I/O rewrite also making heavy use for it.  Don't
pretend it's always unlikely, and let the branch predictor do it's
job instead.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-03-14 08:55:25 -06:00
Christoph Hellwig ba8c6967b7 block: cleanup bio_endio
Replace the while loop that unecessarily checks for a NULL bio in the fast
path with a simple goto loop.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-03-14 08:55:24 -06:00
Christoph Hellwig 38f8baae89 block: factor out chained bio completion
Factor common code between bio_chain_endio and bio_endio into a common
helper.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-03-14 08:55:22 -06:00
Christoph Hellwig af3e3a5259 block: don't unecessarily clobber bi_error for chained bios
Only overwrite the parents bi_error if it was zero. That way a successful
bio completion doesn't reset the error pointer.

Reported-by: Brian Foster <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-03-14 08:55:21 -06:00
Christoph Hellwig e3416ab2d1 iser-target: Kill the ->isert_cmd back pointer in struct iser_tx_desc
We only use the pointer when processing regular iSER commands, and it then
always points to the struct iser_cmd that contains the TX descriptor.

Remove it and rely on container_of to save a little space and avoid a
pointer that is updated multiple times per processed command.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-10 21:48:51 -08:00
Christoph Hellwig d1ca2ed7dc iser-target: Kill struct isert_rdma_wr
There is exactly one instance per struct isert_cmd, so merge the two to
simplify everyones life.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-10 21:48:49 -08:00
Christoph Hellwig 9679cc51eb iser-target: Convert to new CQ API
Use the workqueue based CQ type similar to what isert was using previously,
and properly split up the completion handlers.

Note that this also takes special care to handle the magic login WRs
separately, and also renames the submission functions so that it's clear
that they are only to be used for the login buffers.

(Fix up isert_print_wc usage in isert_beacon_done - nab)

Signed-off-by: Christoph Hellwig <[email protected]>
[sagig: added iscsi conn reinstatement in non-flush
 error completions and added error completion type print]
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-10 21:48:47 -08:00
Christoph Hellwig 5adabdd122 iser-target: Split and properly type the login buffer
The login receive buffer is used as a iser_rx_desc, so type it as such
in struct isert_conn and allocate the exactly right space for it.  The
TX buffer is moved to a separate variable and properly sized as well.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-10 21:48:44 -08:00
Christoph Hellwig ed1083b251 iser-target: Remove ISER_RECV_DATA_SEG_LEN
This is the same as ISCSI_DEF_MAX_RECV_SEG_LEN (and must be the same given
the structure layouts), so just use that constant instead.  This also
allows removing ISER_RX_LOGIN_SIZE in favor of ISER_RX_PAYLOAD_SIZE.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-10 21:48:42 -08:00
Christoph Hellwig fb444abe61 target: Convert demo-mode only drivers to target_alloc_session
This patch converts existing loopback, usb-gadget, and
xen-scsiback demo-mode only fabric drivers to use the
new target_alloc_session API caller.

This includes adding a new alloc_session callback for
fabric driver internal nexus pointer assignments.

(Fixes for early for-next nexus breakage - Dan Carpenter)

Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Acked-by: Juergen Gross <[email protected]>
Tested-by: Andrzej Pietrasiewicz <[email protected]>
Tested-by: Chris Boot <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
2016-03-10 21:44:28 -08:00
Christoph Hellwig 7cf20fc624 net/9p: convert to new CQ API
Trivial conversion to the new RDMA CQ API.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Dominique Martinet <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2016-03-10 20:54:09 -05:00
Christoph Hellwig bc4b024a8b PCI: Move pci_dma_* helpers to common code
For a long time all architectures implement the pci_dma_* functions using
the generic DMA API, and they all use the same header to do so.

Move this header, pci-dma-compat.h, to include/linux and include it from
the generic pci.h instead of having each arch duplicate this include.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
2016-03-07 10:40:02 -06:00
Christoph Hellwig 611609bcf7 frv/PCI: Remove stray pci_{alloc,free}_consistent() declaration
FRV doesn't implement pci_{alloc,free}_consistent(), so remove the
declarations for them.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: David S. Miller <[email protected]>
Acked-by: David Howells <[email protected]>
2016-03-07 10:36:20 -06:00
Christoph Hellwig 1ae1602de0 configfs: switch ->default groups to a linked list
Replace the current NULL-terminated array of default groups with a linked
list.  This gets rid of lots of nasty code to size and/or dynamically
allocate the array.

While we're at it also provide a conveniant helper to remove the default
groups.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Felipe Balbi <[email protected]>		[drivers/usb/gadget]
Acked-by: Joel Becker <[email protected]>
Acked-by: Nicholas Bellinger <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
2016-03-06 16:11:24 +01:00
Christoph Hellwig 8e0b60b96b blk-mq: enable polling support by default
Now that applications need to explicitly ask for polling we can enable it
by default in blk-mq drivers.  Note that this will only have an affect
on driver that supply a poll function, which currently only includes nvme.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Stephen Bates <[email protected]>
Tested-by: Stephen Bates <[email protected]>
Reviewed-by: Jeff Moyer <[email protected]>
Signed-off-by: Al Viro <[email protected]>
2016-03-04 12:20:10 -05:00
Christoph Hellwig c43c83a294 direct-io: only use block polling if explicitly requested
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Stephen Bates <[email protected]>
Tested-by: Stephen Bates <[email protected]>
Acked-by: Jeff Moyer <[email protected]>
Signed-off-by: Al Viro <[email protected]>
2016-03-04 12:20:10 -05:00
Christoph Hellwig 97be7ebe53 vfs: add the RWF_HIPRI flag for preadv2/pwritev2
This adds a flag that tells the file system that this is a high priority
request for which it's worth to poll the hardware.  The flag is purely
advisory and can be ignored if not supported.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Stephen Bates <[email protected]>
Tested-by: Stephen Bates <[email protected]>
Acked-by: Jeff Moyer <[email protected]>
Signed-off-by: Al Viro <[email protected]>
2016-03-04 12:20:10 -05:00
Christoph Hellwig 4babf2c5ef x86: wire up preadv2 and pwritev2
Signed-off-by: Milosz Tanski <[email protected]>
[hch: rebased due to newly added syscalls]
Reviewed-by: Stephen Bates <[email protected]>
Tested-by: Stephen Bates <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Al Viro <[email protected]>
2016-03-04 12:20:10 -05:00
Christoph Hellwig 793b80ef14 vfs: pass a flags argument to vfs_readv/vfs_writev
This way we can set kiocb flags also from the sync read/write path for
the read_iter/write_iter operations.  For now there is no way to pass
flags to plain read/write operations as there is no real need for that,
and all flags passed are explicitly rejected for these files.

Signed-off-by: Milosz Tanski <[email protected]>
[hch: rebased on top of my kiocb changes]
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Stephen Bates <[email protected]>
Tested-by: Stephen Bates <[email protected]>
Acked-by: Jeff Moyer <[email protected]>
Signed-off-by: Al Viro <[email protected]>
2016-03-04 12:20:10 -05:00
Christoph Hellwig add08d765e IB/mlx5: Convert UMR CQ to new CQ API
Simplifies the code, and makes it more fair vs other users by using a
softirq for polling.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Haggai Eran <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2016-03-04 11:58:41 -05:00
Christoph Hellwig 4d6af73d9e block: support large requests in blk_rq_map_user_iov
This patch adds support for larger requests in blk_rq_map_user_iov by
allowing it to build multiple bios for a request.  This functionality
used to exist for the non-vectored blk_rq_map_user in the past, and
this patch reuses the existing functionality for it on the unmap side,
which stuck around.  Thanks to the iov_iter API supporting multiple
bios is fairly trivial, as we can just iterate the iov until we've
consumed the whole iov_iter.

Signed-off-by: Christoph Hellwig <[email protected]>
Reported-by: Jeff Lien <[email protected]>
Tested-by: Jeff Lien <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-03-03 14:45:02 -07:00
Christoph Hellwig f21018427c block: fix blk_rq_get_max_sectors for driver private requests
Driver private request types should not get the artifical cap for the
FS requests.  This is important to use the full device capabilities
for internal command or NVMe pass through commands.

Signed-off-by: Christoph Hellwig <[email protected]>
Reported-by: Jeff Lien <[email protected]>
Tested-by: Jeff Lien <[email protected]>
Reviewed-by: Keith Busch <[email protected]>

Updated by me to use an explicit check for the one command type that
does support extended checking, instead of relying on the ordering
of the enum command values - as suggested by Keith.

Signed-off-by: Jens Axboe <[email protected]>
2016-03-03 14:43:45 -07:00
Christoph Hellwig 45686b6198 nvme: fix max_segments integer truncation
The block layer uses an unsigned short for max_segments.  The way we
calculate the value for NVMe tends to generate very large 32-bit values,
which after integer truncation may lead to a zero value instead of
the desired outcome.

Signed-off-by: Christoph Hellwig <[email protected]>
Reported-by: Jeff Lien <[email protected]>
Tested-by: Jeff Lien <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-03-03 14:43:10 -07:00
Christoph Hellwig da35825d9a nvme: set queue limits for the admin queue
Factor out a helper to set all the device specific queue limits and apply
them to the admin queue in addition to the I/O queues.  Without this the
command size on the admin queue is arbitrarily low, and the missing
other limitations are just minefields waiting for victims.

Signed-off-by: Christoph Hellwig <[email protected]>
Reported-by: Jeff Lien <[email protected]>
Tested-by: Jeff Lien <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-03-03 14:42:50 -07:00
Christoph Hellwig a7e5d03ba8 xfs: remove xfs_trans_get_block_res
Just use the t_blk_res field directly instead of obsfucating the reference
by a macro.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
2016-03-02 09:58:21 +11:00
Christoph Hellwig 1cb3cce5eb nvme: return the whole CQE through the request passthrough interface
Both LighNVM and NVMe over Fabrics need to look at more than just the
status and result field.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Matias Bj?rling <[email protected]>
Reviewed-by: Jay Freyensee <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-02-29 08:47:17 -07:00
Christoph Hellwig 2d55cd5f51 nvme: replace the kthread with a per-device watchdog timer
The only work left in the kthread is the periodic health check for each
controller.  There is no need to run this from process context or keep
a thread context around for it, so replace it with a simpler timer.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-02-29 08:47:16 -07:00
Christoph Hellwig 79f2b358c9 nvme: don't poll the CQ from the kthread
There is no reason to do unconditional polling of CQs per the NVMe
spec.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-02-29 08:47:14 -07:00
Christoph Hellwig 9396dec916 nvme: use a work item to submit async event requests
Use a dedicated work item to submit async event requests instead of the
global kthread.  This simplifies the code and reduces the latencies to
resubmit a request once an even notification happened.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-02-29 08:47:13 -07:00
Christoph Hellwig 0fcbf996d8 fs: return -EOPNOTSUPP if clone is not supported
-EBADF is a rather confusing error if an operations is not supported,
and nfsd gets rather upset about it.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Al Viro <[email protected]>
2016-02-27 19:15:51 -05:00
Christoph Hellwig 4bdf87ebda nfs4: fix stateid handling for the NFS v4.2 operations
The newly added NFS v4.2 operations (ALLOCATE, DEALLOCATE, SEEK and CLONE)
use a helper called nfs42_set_rw_stateid to select a stateid that is sent
to the server.  But they don't set the inode and state fields in the
nfs4_exception structure, and this don't partake in the stateid recovery
protocol.  Because of this they will simply return errors insted of trying
to recover a stateid when the server return a BAD_STATEID error.

Additionally CLONE has the problem that it operates on two files and thus
two stateids, and thus needs to call the exception handler twice to
recover stateids.

While we're at it stop grabbing an addititional reference to the open
context in all these operations - having the file open guarantees that
the open context won't go away.

All this can be produces with the generic/168 and generic/170 tests in
xfstests which stress the CLONE stateid handling.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
2016-02-17 11:38:07 -05:00
Christoph Hellwig f4f0f63e6f nvme: fix drvdata setup for the nvme device
Pass the right private data to device_create_with_groups from the
beginning, and remove the superflous call to dev_set_drvdata.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jon Derrick <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-02-09 12:44:03 -07:00
Christoph Hellwig 21d147880e nvme: fix Kconfig description for BLK_DEV_NVME_SCSI
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-02-09 10:21:22 -07:00
Christoph Hellwig 50ab8ec74a nfs: fix nfs_size_to_loff_t
See http: //www.infradead.org/rpr.html
X-Evolution-Source: [email protected]
Content-Transfer-Encoding: 8bit
Mime-Version: 1.0

We support OFFSET_MAX just fine, so don't round down below it.  Also
switch to using min_t to make the helper more readable.

Signed-off-by: Christoph Hellwig <[email protected]>
Fixes: 433c92379d ("NFS: Clean up nfs_size_to_loff_t()")
Cc: [email protected] # 2.6.23+
Signed-off-by: Trond Myklebust <[email protected]>
2016-02-08 15:20:01 -05:00
Christoph Hellwig edfd9dd549 xfs: move buffer invalidation to xfs_btree_free_block
... instead of leaving it in the methods.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
2016-02-08 14:58:07 +11:00
Christoph Hellwig c46ee8ad78 xfs: factor btree block freeing into a helper
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
2016-02-08 14:58:07 +11:00
Christoph Hellwig 196328ec97 xfs: handle errors from ->free_blocks in xfs_btree_kill_iroot
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
2016-02-08 14:58:07 +11:00
Christoph Hellwig c19b104a67 xfs: fold xfs_vm_do_dio into xfs_vm_direct_IO
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
2016-02-08 14:40:51 +11:00
Christoph Hellwig 273dda76f7 xfs: don't use ioends for direct write completions
We only need to communicate two bits of information to the direct I/O
completion handler:

 (1) do we need to convert any unwritten extents in the range
 (2) do we need to check if we need to update the inode size based
     on the range passed to the completion handler

We can use the private data passed to the get_block handler and the
completion handler as a simple bitmask to communicate this information
instead of the current complicated infrastructure reusing the ioends
from the buffer I/O path, and thus avoiding a memory allocation and
a context switch for any non-trivial direct write.  As a nice side
effect we also decouple the direct I/O path implementation from that
of the buffered I/O path.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
2016-02-08 14:40:51 +11:00
Christoph Hellwig 187372a3b9 direct-io: always call ->end_io if non-NULL
This way we can pass back errors to the file system, and allow for
cleanup required for all direct I/O invocations.

Also allow the ->end_io handlers to return errors on their own, so that
I/O completion errors can be passed on to the callers.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
2016-02-08 14:40:51 +11:00
Christoph Hellwig 20d666e411 dma-mapping: remove <asm-generic/dma-coherent.h>
This wasn't an asm-generic header to start with, and can be merged into
dma-mapping.h trivially.

Signed-off-by: Christoph Hellwig <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Aurelien Jacquiot <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: David Howells <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: Koichi Yasutake <[email protected]>
Cc: Ley Foon Tan <[email protected]>
Cc: Mark Salter <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: Vineet Gupta <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig e1c7e32453 dma-mapping: always provide the dma_map_ops based implementation
Move the generic implementation to <linux/dma-mapping.h> now that all
architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now
that everyone supports them.

[[email protected]: remove leftovers in Kconfig]
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Aurelien Jacquiot <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: David Howells <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: Koichi Yasutake <[email protected]>
Cc: Ley Foon Tan <[email protected]>
Cc: Mark Salter <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: Vineet Gupta <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Valentin Rothberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig bd38118f9c tile: uninline dma_set_mask
We'll soon merge <asm-generic/dma-mapping-common.h> into
<linux/dma-mapping.h> and the reference to dma_capable in the tile
dma_set_mask would create a circular dependency.

Fix this by moving the implementation out of line.

Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 30081d8ea4 sparc: use generic dma_set_mask
Sparc already uses the same code as the generic code for the PCI
implementation but just fails the call sbus.  This moves to the generic
implemenation which eventually return -EIO due to the NULL dma_mask
pointer in the device.

Signed-off-by: Christoph Hellwig <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 5348c1e9e0 metag: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 340f3039ac m68k: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig f151341ca0 mn10300: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: David Howells <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 79387179e2 parisc: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Tested-by: Helge Deller <[email protected]>
Acked-by: Helge Deller <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig eae0751963 frv: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: David Howells <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 5a1a67f1d7 nios2: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Ley Foon Tan <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig e20dd88995 cris: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 4605f04b28 c6x: convert to dma_map_ops
[[email protected]: C6X: fix build breakage]
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Mark Salter <[email protected]>
Cc: Aurelien Jacquiot <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 6f62097583 blackfin: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig a34a517ac9 avr32: convert to dma_map_ops
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 052c96dbe3 arc: convert to dma_map_ops
[[email protected]: ARC: dma mapping fixes #2]
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Vineet Gupta <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
Cc: Carlos Palminha <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig 0d4a619b64 dma-mapping: make the generic coherent dma mmap implementation optional
This series converts all remaining architectures to use dma_map_ops and
the generic implementation of the DMA API.  This not only simplifies the
code a lot, but also prepares for possible future changes like more
generic non-iommu dma_ops implementations or generic per-device
dma_map_ops.

This patch (of 16):

We have a couple architectures that do not want to support this code, so
add another Kconfig symbol that disables the code similar to what we do
for the nommu case.

Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: Ley Foon Tan <[email protected]>
Cc: David Howells <[email protected]>
Cc: Koichi Yasutake <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Aurelien Jacquiot <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: Mark Salter <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Vineet Gupta <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Sebastian Ott <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-01-20 17:09:18 -08:00
Christoph Hellwig ca281265c0 IB/mad: pass ib_mad_send_buf explicitly to the recv_handler
Stop abusing wr_id and just pass the parameter explicitly.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hal Rosenstock <[email protected]>
Reviewed-by: Ira Weiny <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2016-01-19 15:25:36 -05:00
Christoph Hellwig 4490733250 nvme: make SG_IO support optional
Translation SCSI commands to NVMe commands is rather pointless in general
as applications must not expext to be able to use SCSI commands on a
generic block device.

Make the huge translation layer optional and hope no one will ever enable
it in the future.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-01-12 13:30:16 -07:00
Christoph Hellwig bfd8947194 nvme: fixes for NVME_IOCTL_IO_CMD on the char device
Make sure we synchronize access to the namespaces list and grab a reference
to the namespace before doing I/O.  Make sure to reject the ioctl if multiple
namespaces are present as it's entirely unsafe, and warn when using it even
with a single namespace.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-01-12 13:30:15 -07:00
Christoph Hellwig 69d3b8ac15 nvme: synchronize access to ctrl->namespaces
Currently traversal and modification of ctrl->namespaces happens completely
unsynchronized, which can be fixed by the addition of a simple mutex.

Note: nvme_dev_ioctl will be handled in the next patch.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2016-01-12 13:30:13 -07:00
Christoph Hellwig 5036c39020 raid5: allow r5l_io_unit allocations to fail
And propagate the error up the stack so we can add the stripe
to no_stripes_list and retry our log operation later.  This avoids
blocking raid5d due to reclaim, an it allows to get rid of the
deadlock-prone GFP_NOFAIL allocation.

shli: add missing mempool_destroy()

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
2016-01-06 11:40:12 +11:00
Christoph Hellwig e8deb63810 raid5-cache: use a mempool for the metadata block
We only have a limited number in flight, so use a page based mempool.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
2016-01-06 11:40:08 +11:00
Christoph Hellwig c38d29b33b raid5-cache: use a bio_set
This allows us to make guaranteed forward progress.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
2016-01-06 11:40:04 +11:00
Christoph Hellwig ad66d445ee raid5-cache: free meta_page earlier
Once the I/O completed we don't need the meta page anymore.  As the iounits
can live on for a long time this reduces memory pressure a bit.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Shaohua Li <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
2016-01-06 11:39:43 +11:00
Christoph Hellwig 3848c0bcb0 raid5-cache: simplify r5l_move_io_unit_list
It's only used for one kind of move, so make that explicit.  Also clean
up the code a bit by using list_for_each_safe.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Shaohua Li <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
2016-01-06 11:39:34 +11:00
Christoph Hellwig 1609bac8af configfs: add myself as co-maintainer, updated git tree
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Joel Becker <[email protected]>
2016-01-05 14:45:46 +04:00
Christoph Hellwig ab67ed8de0 IB: remove the write-only usecnt field from struct ib_mr
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:06 -05:00
Christoph Hellwig 7cf9ff643b IB: remove the struct ib_phys_buf definition
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:06 -05:00
Christoph Hellwig 52f00dd392 ehca: stop using struct ib_phys_buf
And simplify the calling convention for full-memory registrations.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:05 -05:00
Christoph Hellwig 33f0921934 amso1100: fold c2_reg_phys_mr into c2_get_dma_mr
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:05 -05:00
Christoph Hellwig f64054d850 nes: simplify nes_reg_phys_mr calling conventions
Just pass and address/size pair instead of an ib_phys_buf array.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:05 -05:00
Christoph Hellwig 35cb3fc026 cxgb3: simplify iwch_get_dma_wr
Fold simplified versions of build_phys_page_list and
iwch_register_phys_mem into iwch_get_dma_wr now that no other callers
are left.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:04 -05:00
Christoph Hellwig feb7c1e38b IB: remove in-kernel support for memory windows
Remove the unused ib_allow_mw and ib_bind_mw functions, remove the
unused IB_WR_BIND_MW and IB_WC_BIND_MW opcodes and move ib_dealloc_mw
into the uverbs module.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:04 -05:00
Christoph Hellwig b7d3e0a94f IB: remove support for phys MRs
We have stopped using phys MRs in the kernel a while ago, so let's
remove all the cruft used to implement them.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-By: Devesh Sharma<[email protected]> [ocrdma]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:04 -05:00
Christoph Hellwig a4d825a01e IB: remove ib_query_mr
This functionality has no users and was only supported by the staged out
EHCA driver.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]> [core]
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:03 -05:00
Christoph Hellwig b1adc7146a IB: start documenting device capabilities
Just IB_DEVICE_LOCAL_DMA_LKEY and IB_DEVICE_MEM_MGT_EXTENSIONS for now
as I'm most familar with those.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-By: Jason Gunthorpe <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
2015-12-23 14:29:03 -05:00
Christoph Hellwig bbc758ec04 block: remove REQ_NO_TIMEOUT flag
This was added for the 'magic' AEN requests in the NVMe driver that never
return.  We now handle them purely inside the driver and don't need this
core hack any more.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig f4800d6d15 nvme: merge iod and cmd_info
Merge the two per-request structures in the nvme driver into a single
one.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig bf68405705 nvme: meta_sg doesn't have to be an array
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig eee417b069 nvme: properly free resources for cancelled command
We need to move freeing of resources to the ->complete handler to ensure
they are also freed when we cancel the command.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig aae239e191 nvme: simplify completion handling
Now that all commands are executed as block layer requests we can remove the
internal completion in the NVMe driver.  Note that we can simply call
blk_mq_complete_request to abort commands as the block layer will protect
against double copletions internally.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig adf68f21c1 nvme: special case AEN requests
AEN requests are different from other requests in that they don't time out
or can easily be cancelled.  Because of that we should not use the blk-mq
infrastructure but just special case them in the completion path.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig e7a2a87d59 nvme: switch abort to blk_execute_rq_nowait
And remove the now unused nvme_submit_cmd helper.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig d8f32166a9 nvme: switch delete SQ/CQ to blk_execute_rq_nowait
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig 7688faa6dd nvme: factor out a few helpers from req_completion
We'll need them in other places later.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig 4680072003 nvme: fix admin queue depth
The number in tag_set->queue depth includes the reserved tags.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:34 -07:00
Christoph Hellwig 6bf25d1641 nvme: switch abort_limit to an atomic_t
There is no lock to sychronize access to the abort_limit field of
struct nvme_ctrl, so switch it to an atomic_t.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2015-12-22 09:38:33 -07:00