stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "[PATCH 120/135] block: fix blk_rq_get_max_sectors for driver private" has been added to the 4.4-stable tree
@ 2016-09-09 13:38 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-09 13:38 UTC (permalink / raw)
  To: hch, Jeff.Lien, alexander.levin, axboe, gregkh, keith.busch
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    [PATCH 120/135] block: fix blk_rq_get_max_sectors for driver private

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     0120-block-fix-blk_rq_get_max_sectors-for-driver-private-.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 0bcfdc6ac7ac106c46b1a6c53310b754c58a8a5f Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Fri, 3 Jun 2016 07:42:17 -0600
Subject: [PATCH 120/135] block: fix blk_rq_get_max_sectors for driver private
 requests

[ Upstream commit f21018427cb007a0894c36ad702990ab639cbbb4 ]

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 <hch@lst.de>
Reported-by: Jeff Lien <Jeff.Lien@hgst.com>
Tested-by: Jeff Lien <Jeff.Lien@hgst.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>

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 <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/blkdev.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -890,7 +890,7 @@ static inline unsigned int blk_rq_get_ma
 {
 	struct request_queue *q = rq->q;
 
-	if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC))
+	if (unlikely(rq->cmd_type != REQ_TYPE_FS))
 		return q->limits.max_hw_sectors;
 
 	if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD))


Patches currently in stable-queue which might be from hch@lst.de are

queue-4.4/0120-block-fix-blk_rq_get_max_sectors-for-driver-private-.patch
queue-4.4/0033-NVMe-fix-build-with-CONFIG_NVM-enabled.patch
queue-4.4/0116-blk-mq-End-unstarted-requests-on-dying-queue.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-09 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 13:38 Patch "[PATCH 120/135] block: fix blk_rq_get_max_sectors for driver private" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).