]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop 2 block patches from 4.4
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2019 15:45:20 +0000 (16:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2019 15:45:20 +0000 (16:45 +0100)
queue-4.4/block-break-discard-submissions-into-the-user-defined-size.patch [deleted file]
queue-4.4/block-don-t-deal-with-discard-limit-in-blkdev_issue_discard.patch [deleted file]
queue-4.4/series

diff --git a/queue-4.4/block-break-discard-submissions-into-the-user-defined-size.patch b/queue-4.4/block-break-discard-submissions-into-the-user-defined-size.patch
deleted file mode 100644 (file)
index 71df55b..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-From af097f5d199e2aa3ab3ef777f0716e487b8f7b08 Mon Sep 17 00:00:00 2001
-From: Jens Axboe <axboe@kernel.dk>
-Date: Tue, 8 May 2018 15:09:41 -0600
-Subject: block: break discard submissions into the user defined size
-
-From: Jens Axboe <axboe@kernel.dk>
-
-commit af097f5d199e2aa3ab3ef777f0716e487b8f7b08 upstream.
-
-Don't build discards bigger than what the user asked for, if the
-user decided to limit the size by writing to 'discard_max_bytes'.
-
-Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
-Reviewed-by: Omar Sandoval <osandov@fb.com>
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/blk-lib.c |   10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/block/blk-lib.c
-+++ b/block/blk-lib.c
-@@ -81,8 +81,14 @@ int blkdev_issue_discard(struct block_de
-                       break;
-               }
--              /* Make sure bi_size doesn't overflow */
--              req_sects = min_t(sector_t, nr_sects, UINT_MAX >> 9);
-+              /*
-+               * Issue in chunks of the user defined max discard setting,
-+               * ensuring that bi_size doesn't overflow
-+               */
-+              req_sects = min_t(sector_t, nr_sects,
-+                                      q->limits.max_discard_sectors);
-+              if (req_sects > UINT_MAX >> 9)
-+                      req_sects = UINT_MAX >> 9;
-               /*
-                * If splitting a request, and the next starting sector would be
diff --git a/queue-4.4/block-don-t-deal-with-discard-limit-in-blkdev_issue_discard.patch b/queue-4.4/block-don-t-deal-with-discard-limit-in-blkdev_issue_discard.patch
deleted file mode 100644 (file)
index d6c9010..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-From 744889b7cbb56a64f957e65ade7cb65fe3f35714 Mon Sep 17 00:00:00 2001
-From: Ming Lei <ming.lei@redhat.com>
-Date: Fri, 12 Oct 2018 15:53:10 +0800
-Subject: block: don't deal with discard limit in blkdev_issue_discard()
-
-From: Ming Lei <ming.lei@redhat.com>
-
-commit 744889b7cbb56a64f957e65ade7cb65fe3f35714 upstream.
-
-blk_queue_split() does respect this limit via bio splitting, so no
-need to do that in blkdev_issue_discard(), then we can align to
-normal bio submit(bio_add_page() & submit_bio()).
-
-More importantly, this patch fixes one issue introduced in a22c4d7e34402cc
-("block: re-add discard_granularity and alignment checks"), in which
-zero discard bio may be generated in case of zero alignment.
-
-Fixes: a22c4d7e34402ccdf3 ("block: re-add discard_granularity and alignment checks")
-Cc: stable@vger.kernel.org
-Cc: Ming Lin <ming.l@ssi.samsung.com>
-Cc: Mike Snitzer <snitzer@redhat.com>
-Cc: Christoph Hellwig <hch@lst.de>
-Cc: Xiao Ni <xni@redhat.com>
-Tested-by: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
-Signed-off-by: Ming Lei <ming.lei@redhat.com>
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/blk-lib.c |   28 ++--------------------------
- 1 file changed, 2 insertions(+), 26 deletions(-)
-
---- a/block/blk-lib.c
-+++ b/block/blk-lib.c
-@@ -43,8 +43,6 @@ int blkdev_issue_discard(struct block_de
-       DECLARE_COMPLETION_ONSTACK(wait);
-       struct request_queue *q = bdev_get_queue(bdev);
-       int type = REQ_WRITE | REQ_DISCARD;
--      unsigned int granularity;
--      int alignment;
-       struct bio_batch bb;
-       struct bio *bio;
-       int ret = 0;
-@@ -56,10 +54,6 @@ int blkdev_issue_discard(struct block_de
-       if (!blk_queue_discard(q))
-               return -EOPNOTSUPP;
--      /* Zero-sector (unknown) and one-sector granularities are the same.  */
--      granularity = max(q->limits.discard_granularity >> 9, 1U);
--      alignment = (bdev_discard_alignment(bdev) >> 9) % granularity;
--
-       if (flags & BLKDEV_DISCARD_SECURE) {
-               if (!blk_queue_secdiscard(q))
-                       return -EOPNOTSUPP;
-@@ -72,8 +66,8 @@ int blkdev_issue_discard(struct block_de
-       blk_start_plug(&plug);
-       while (nr_sects) {
--              unsigned int req_sects;
--              sector_t end_sect, tmp;
-+              unsigned int req_sects = nr_sects;
-+              sector_t end_sect;
-               bio = bio_alloc(gfp_mask, 1);
-               if (!bio) {
-@@ -81,28 +75,10 @@ int blkdev_issue_discard(struct block_de
-                       break;
-               }
--              /*
--               * Issue in chunks of the user defined max discard setting,
--               * ensuring that bi_size doesn't overflow
--               */
--              req_sects = min_t(sector_t, nr_sects,
--                                      q->limits.max_discard_sectors);
-               if (req_sects > UINT_MAX >> 9)
-                       req_sects = UINT_MAX >> 9;
--              /*
--               * If splitting a request, and the next starting sector would be
--               * misaligned, stop the discard at the previous aligned sector.
--               */
-               end_sect = sector + req_sects;
--              tmp = end_sect;
--              if (req_sects < nr_sects &&
--                  sector_div(tmp, granularity) != alignment) {
--                      end_sect = end_sect - alignment;
--                      sector_div(end_sect, granularity);
--                      end_sect = end_sect * granularity + alignment;
--                      req_sects = end_sect - sector;
--              }
-               bio->bi_iter.bi_sector = sector;
-               bio->bi_end_io = bio_batch_end_io;
index 1ffe9e77f2a1b783be222e877f7eeba05d620f4a..35eb56c612bb527eef44e3b25a3654a43288b6f8 100644 (file)
@@ -68,8 +68,6 @@ mm-devm_memremap_pages-kill-mapping-system-ram-support.patch
 sunrpc-fix-cache_head-leak-due-to-queued-request.patch
 sunrpc-use-svc_net-in-svcauth_gss_-functions.patch
 crypto-x86-chacha20-avoid-sleeping-with-preemption-disabled.patch
-block-break-discard-submissions-into-the-user-defined-size.patch
-block-don-t-deal-with-discard-limit-in-blkdev_issue_discard.patch
 alsa-cs46xx-potential-null-dereference-in-probe.patch
 alsa-usb-audio-avoid-access-before-blength-check-in-build_audio_procunit.patch
 alsa-usb-audio-fix-an-out-of-bound-read-in-create_composite_quirks.patch