aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-04-12block: refactor __bio_iov_bvec_add_pagesChristoph Hellwig1-10/+9
Return early on error, and add an unlikely annotation for that case. Reviewed-by: Ming Lei <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-12block: rewrite blk_bvec_map_sg to avoid a nth_page callChristoph Hellwig1-15/+6
The offset in scatterlists is allowed to be larger than the page size, so don't go to great length to avoid that case and simplify the arithmetics. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-10Merge branch 'md-next' of https://github.com/liu-song-6/linux into for-5.2/blockJens Axboe3-12/+19
Pull MD changes from Song. * 'md-next' of https://github.com/liu-song-6/linux: md: add __acquires/__releases annotations to handle_active_stripes md: add __acquires/__releases annotations to (un)lock_two_stripes md: mark md_cluster_mod static md: use correct type in super_1_sync md: use correct type in super_1_load md: use correct types in md_bitmap_print_sb md: add a missing endianness conversion in check_sb_changes md: add mddev->pers to avoid potential NULL pointer dereference
2019-04-10md: add __acquires/__releases annotations to handle_active_stripesChristoph Hellwig1-0/+2
This tells sparse that we release and reacquire the device_lock and avoids a warning. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-10md: add __acquires/__releases annotations to (un)lock_two_stripesChristoph Hellwig1-0/+4
This tells sparse that we acquire/release the two stripe locks and avoids a warning. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-10md: mark md_cluster_mod staticChristoph Hellwig1-2/+1
Sparse complains that it has no external declaration, and it turns out that it is never even used outside of md.c. So just mark it static and drop the export. Acked-by: Guoqing Jiang <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-10md: use correct type in super_1_syncChristoph Hellwig1-1/+1
If we want to convert from a little endian format we need to cast to a little endian type, otherwise sparse will be unhappy. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-10md: use correct type in super_1_loadChristoph Hellwig1-2/+2
If we want to convert from a little endian format we need to cast to a little endian type, otherwise sparse will be unhappy. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-10md: use correct types in md_bitmap_print_sbChristoph Hellwig1-4/+4
If we want to convert from a little endian format we need to cast to a little endian type, otherwise sparse will be unhappy. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-10md: add a missing endianness conversion in check_sb_changesChristoph Hellwig1-1/+1
The on-disk value is little endian and we need to convert it to native endian before storing the value in the in-core structure. Fixes: 7564beda19b36 ("md-cluster/raid10: support add disk under grow mode") Cc: <[email protected]> # 4.20+ Acked-by: Guoqing Jiang <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-10md: add mddev->pers to avoid potential NULL pointer dereferenceYufen Yu1-2/+4
When doing re-add, we need to ensure rdev->mddev->pers is not NULL, which can avoid potential NULL pointer derefence in fallowing add_bound_rdev(). Fixes: a6da4ef85cef ("md: re-add a failed disk") Cc: Xiao Ni <[email protected]> Cc: NeilBrown <[email protected]> Cc: <[email protected]> # 4.4+ Reviewed-by: NeilBrown <[email protected]> Signed-off-by: Yufen Yu <[email protected]> Signed-off-by: Song Liu <[email protected]>
2019-04-09block: null: Add documentation for "zone_nr_conv" paramMinwoo Im1-0/+4
zone_nr_conv module parameter was introduced by a commit ea2c18e1("null_blk: Add conventional zone configuration for zoned support"). This patch describes "zone_nr_conv" module parameter to the document. Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Minwoo Im <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-08block: fix build warning in merging bvecsMing Lei1-6/+10
Commit f6970f83ef79 ("block: don't check if adjacent bvecs in one bio can be mergeable") changes bvec merge by only considering two bvecs from different bios. However, if the former bio doesn't inlcude any io bvec, then the following warning may be triggered: warning: ‘bvec.bv_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized] In practice, it shouldn't be triggered. Fixes it by adding check on former bio, the check shouldn't add any cost given 'bio->bi_iter' can be hit in cache. Reported-by: Jens Axboe <[email protected]> Fixes: f6970f83ef79 ("block: don't check if adjacent bvecs in one bio can be mergeable") Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-08block, bfq: fix some typos in commentsAngelo Ruocco4-16/+16
Some of the comments in the bfq files had typos. This patch fixes them. Signed-off-by: Angelo Ruocco <[email protected]> Signed-off-by: Paolo Valente <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-08block: remove unused variable 'def'Hisao Tanabe1-4/+2
The 'def' local variable became unused after commit f382fb0bcef4 ("block: remove legacy IO schedulers"), let's remove it. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Hisao Tanabe <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-08virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->mapDongli Zhang1-1/+2
Use HCTX_TYPE_DEFAULT instead of 0 to avoid hardcoding. Signed-off-by: Dongli Zhang <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: rename next to execute_stepsDavid Kozub1-16/+17
As the function is responsible for executing the individual steps supplied in the steps argument, execute_steps is a more descriptive name than the rather generic next. Signed-off-by: David Kozub <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: don't repeat opal_discovery0 in each steps arrayDavid Kozub1-33/+42
Originally each of the opal functions that call next include opal_discovery0 in the array of steps. This is superfluous and can be done always inside next. Acked-by: Jon Derrick <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: pass steps via argument rather than via opal_devDavid Kozub1-89/+69
The steps argument is only read by the next function, so it can be passed directly as an argument rather than via opal_dev. Normally, the steps is an array on the stack, so the pointer stops being valid then the function that set opal_dev.steps returns. If opal_dev.steps was not set to NULL before return it would become a dangling pointer. When the steps are passed as argument this becomes easier to see and more difficult to misuse. Acked-by: Jon Derrick <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: use named Opal tokens instead of integer literalsDavid Kozub1-9/+9
Replace integer literals by Opal tokens defined in opal_proto.h where possible. Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Jon Derrick <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: unify retrieval of table columnsDavid Kozub1-83/+47
Instead of having multiple places defining the same argument list to get a specific column of a sed-opal table, provide a generic version and call it from those functions. Co-authored-by: David Kozub <[email protected]> Signed-off-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: add token for OPAL_LIFECYCLEDavid Kozub2-2/+4
Define OPAL_LIFECYCLE token and use it instead of literals in get_lsp_lifecycle. Acked-by: Jon Derrick <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: split generation of bytestring header and contentJonas Rabenstein1-8/+14
Split the header generation from the (normal) memcpy part if a bytestring is copied into the command buffer. This allows in-place generation of the bytestring content. For example, copy_from_user may be used without an intermediate buffer. Signed-off-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: print failed function addressJonas Rabenstein1-2/+2
Add function address (and if available its symbol) to the message if a step function fails. Signed-off-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jon Derrick <[email protected] Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: reuse response_get_token to decrease code duplicationDavid Kozub1-31/+15
response_get_token had already been in place, its functionality had been duplicated within response_get_{u64,bytestring} with the same error handling. Unify the handling by reusing response_get_token within the other functions. Co-authored-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jonas Rabenstein <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: unify error handling of responsesDavid Kozub1-0/+5
response_get_{string,u64} include error handling for argument resp being NULL but response_get_token does not handle this. Make all three of response_get_{string,u64,token} handle NULL resp in the same way. Co-authored-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jonas Rabenstein <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: unify cmd startDavid Kozub1-159/+69
Every step starts with resetting the cmd buffer as well as the comid and constructs the appropriate OPAL_CALL command. Consequently, those actions may be combined into one generic function. On should take care that the opening and closing tokens for the argument list are already emitted by cmd_start and cmd_finalize respectively and thus must not be additionally added. Co-authored-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jonas Rabenstein <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: close parameter list in cmd_finalizeDavid Kozub1-22/+3
Every step ends by calling cmd_finalize (via finalize_and_send) yet every step adds the token OPAL_ENDLIST on its own. Moving this into cmd_finalize decreases code duplication. Co-authored-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jonas Rabenstein <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: unify space check in add_token_*Jonas Rabenstein1-9/+16
All add_token_* functions have a common set of conditions that have to be checked. Use a common function for those checks in order to avoid different behaviour as well as code duplication. Acked-by: Jon Derrick <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Co-authored-by: David Kozub <[email protected]> Signed-off-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: use correct macro for method lengthJonas Rabenstein1-1/+1
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same, it is weird to use OPAL_UID_LENGTH for the definition of the methods. Signed-off-by: Jonas Rabenstein <[email protected]> Signed-off-by: David Kozub <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jon Derrick <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: fix typos and formattingDavid Kozub2-9/+11
This should make no change in functionality. The formatting changes were triggered by checkpatch.pl. Reviewed-by: Scott Bauer <[email protected]> Reviewed-by: Jon Derrick <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: sed-opal: fix IOC_OPAL_ENABLE_DISABLE_MBRDavid Kozub1-3/+6
The implementation of IOC_OPAL_ENABLE_DISABLE_MBR handled the value opal_mbr_data.enable_disable incorrectly: enable_disable is expected to be one of OPAL_MBR_ENABLE(0) or OPAL_MBR_DISABLE(1). enable_disable was passed directly to set_mbr_done and set_mbr_enable_disable where is was interpreted as either OPAL_TRUE(1) or OPAL_FALSE(0). The end result was that calling IOC_OPAL_ENABLE_DISABLE_MBR with OPAL_MBR_ENABLE actually disabled the shadow MBR and vice versa. This patch adds correct conversion from OPAL_MBR_DISABLE/ENABLE to OPAL_FALSE/TRUE. The change affects existing programs using IOC_OPAL_ENABLE_DISABLE_MBR but this is typically used only once when setting up an Opal drive. Acked-by: Jon Derrick <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-06block: remove CONFIG_LBDAFChristoph Hellwig61-250/+52
Currently support for 64-bit sector_t and blkcnt_t is optional on 32-bit architectures. These types are required to support block device and/or file sizes larger than 2 TiB, and have generally defaulted to on for a long time. Enabling the option only increases the i386 tinyconfig size by 145 bytes, and many data structures already always use 64-bit values for their in-core and on-disk data structures anyway, so there should not be a large change in dynamic memory usage either. Dropping this option removes a somewhat weird non-default config that has cause various bugs or compiler warnings when actually used. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-04-05Merge branch 'nvme-5.2' of git://git.infradead.org/nvme into for-5.2/blockJens Axboe7-152/+197
Pull NVMe changes from Christoph: "Below is the first batch of nvme updates for 5.2. This includes the performance improvements for single segment I/O on PCIe, which introduce new block helpers, so it might be a good idea to get them in early. - various performance optimizations in the PCIe code (Keith and me) - new block helpers to support the above (me) - nvmet error conversion cleanup (me) - nvmet-fc variable sized array cleanup (Gustavo) - passthrough ioctl error printk cleanup (Kenneth) - small nvmet fixes (Max) - endianess conversion cleanup (Max) - nvmet-tcp faspath completion optimization (Sagi)" * 'nvme-5.2' of git://git.infradead.org/nvme: (24 commits) nvme: log the error status on Identify Namespace failure nvmet: add safety check for subsystem lock during nvmet_ns_changed nvmet: never fail double namespace enablement nvme-pci: tidy up nvme_map_data nvme-pci: optimize mapping single segment requests using SGLs nvme-pci: optimize mapping of small single segment requests nvme-pci: remove the inline scatterlist optimization nvme-pci: split metadata handling from nvme_map_data / nvme_unmap_data nvme-pci: do not build a scatterlist to map metadata nvme-pci: only call nvme_unmap_data for requests transferring data nvme-pci: merge nvme_free_iod into nvme_unmap_data nvme-pci: move the call to nvme_cleanup_cmd out of nvme_unmap_data nvme-pci: remove nvme_init_iod block: add dma_map_bvec helper block: add a rq_dma_dir helper block: add a rq_integrity_vec helper block: add a req_bvec helper nvme-pci: remove unused nvme_iod member nvme-pci: remove q_dmadev from nvme_queue nvme-pci: use a flag for polled queues ...
2019-04-05nvme: log the error status on Identify Namespace failureKenneth Heitke1-1/+1
Identify Namespace failures are logged as a warning but there is not an indication of the cause for the failure. Update the log message to include the error status. Signed-off-by: Kenneth Heitke <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2019-04-05nvmet: add safety check for subsystem lock during nvmet_ns_changedMax Gurtovoy1-0/+2
we need to make sure that subsystem lock is taken during ctrl's list traversing. nvmet_ns_changed function is not static and can be used from various callers simultaneously. Signed-off-by: Max Gurtovoy <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2019-04-05nvmet: never fail double namespace enablementMax Gurtovoy1-3/+4
In case we create N namespaces while N < NVMET_MAX_NAMESPACES, we can perform "echo 1 > <nsid>/enable" as much as we want. In case N == NVMET_MAX_NAMESPACES we fail. Make sure we have the same flow for any N. Signed-off-by: Max Gurtovoy <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2019-04-05nvme-pci: tidy up nvme_map_dataChristoph Hellwig1-12/+5
Remove two pointless local variables, remove ret assignment that is never used, move the use_sgl initialization closer to where it is used. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: optimize mapping single segment requests using SGLsChristoph Hellwig1-0/+22
If the controller supports SGLs we can take another short cut for single segment request, given that we can always map those without another indirection structure, and thus don't need to create a scatterlist structure. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: optimize mapping of small single segment requestsChristoph Hellwig1-5/+40
If a request is single segment and fits into one or two PRP entries we do not have to create a scatterlist for it, but can just map the bio_vec directly. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: remove the inline scatterlist optimizationChristoph Hellwig1-32/+6
We'll have a better way to optimize for small I/O that doesn't require it soon, so remove the existing inline_sg case to make that optimization easier to implement. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: split metadata handling from nvme_map_data / nvme_unmap_dataChristoph Hellwig1-21/+27
This prepares for some bigger changes to the data mapping helpers. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: do not build a scatterlist to map metadataChristoph Hellwig1-13/+10
We always have exactly one segment, so we can simply call dma_map_bvec. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: only call nvme_unmap_data for requests transferring dataChristoph Hellwig1-1/+2
This mirrors how nvme_map_pci is called and will allow simplifying some checks in nvme_unmap_pci later on. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: merge nvme_free_iod into nvme_unmap_dataChristoph Hellwig1-27/+17
This means we now have a function that undoes everything nvme_map_data does and we can simplify the error handling a bit. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: move the call to nvme_cleanup_cmd out of nvme_unmap_dataChristoph Hellwig1-1/+1
Cleaning up the command setup isn't related to unmapping data, and disentangling them will simplify error handling a bit down the road. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05nvme-pci: remove nvme_init_iodChristoph Hellwig1-34/+22
nvme_init_iod should really be split into two parts: initialize a few general iod fields, which can easily be done at the beginning of nvme_queue_rq, and allocating the scatterlist if needed, which logically belongs into nvme_map_data with the code making use of it. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05block: add dma_map_bvec helperChristoph Hellwig1-0/+4
Provide a nice little shortcut for mapping a single bvec. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05block: add a rq_dma_dir helperChristoph Hellwig1-0/+3
In a lot of places we want to know the DMA direction for a given struct request. Add a little helper to make it a littler easier. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>
2019-04-05block: add a rq_integrity_vec helperChristoph Hellwig1-0/+16
This provides a nice little shortcut to get the integrity data for drivers like NVMe that only support a single integrity segment. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]>