]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "block: Copy a user iovec if it includes gaps"
authorAshok Vairavan <ashok.vairavan@oracle.com>
Sun, 4 Feb 2018 02:18:36 +0000 (18:18 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Wed, 7 Feb 2018 18:06:33 +0000 (10:06 -0800)
This reverts commit cc500383c29a734102683003e2485dac6c6a0f05.

In UEK4, the decision is made to do complete switch to
queue_virt_boundary discarding the use of SG_GAPS flags. Hence,
this partial porting of new queue limit mask is reverted. Also,
this partial patch is broken for stacked devices.

Orabug: 27484719

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
block/blk-map.c

index 55979c98b18aefd06dc7d89efde0b069ceccdec9..fd36d3742b94de4e8ec55e2df35f3d826d262330 100644 (file)
@@ -9,24 +9,6 @@
 
 #include "blk.h"
 
-static bool iovec_gap_to_prv(struct request_queue *q,
-                            struct iovec *prv, struct iovec *cur)
-{
-       unsigned long prev_end;
-
-       if (!queue_virt_boundary(q))
-               return false;
-
-       if (prv->iov_base == NULL && prv->iov_len == 0)
-               /* prv is not set - don't check */
-               return false;
-
-       prev_end = (unsigned long)(prv->iov_base + prv->iov_len);
-
-       return (((unsigned long)cur->iov_base & queue_virt_boundary(q)) ||
-               prev_end & queue_virt_boundary(q));
-}
-
 int blk_rq_append_bio(struct request_queue *q, struct request *rq,
                      struct bio *bio)
 {
@@ -85,7 +67,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
        struct bio *bio;
        int unaligned = 0;
        struct iov_iter i;
-       struct iovec iov, prv = {.iov_base = NULL, .iov_len = 0};
+       struct iovec iov;
 
        if (!iter || !iter->count)
                return -EINVAL;
@@ -104,12 +86,8 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
                /*
                 * Keep going so we check length of all segments
                 */
-               if ((uaddr & queue_dma_alignment(q)) ||
-                   iovec_gap_to_prv(q, &prv, &iov))
+               if (uaddr & queue_dma_alignment(q))
                        unaligned = 1;
-
-               prv.iov_base = iov.iov_base;
-               prv.iov_len = iov.iov_len;
        }
 
        if (unaligned || (q->dma_pad_mask & iter->count) || map_data)