diff mbox

[2/6] block: update chunk_sectors in blk_stack_limits()

Message ID 1468934439-93579-3-git-send-email-hare@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Hannes Reinecke July 19, 2016, 1:20 p.m. UTC
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 block/blk-settings.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Damien Le Moal July 20, 2016, 1:05 a.m. UTC | #1
On 7/19/16 22:20, Hannes Reinecke wrote:
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
>  block/blk-settings.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Damien Le Moal <damien.lemoal@hgst.com>
Tested-by: Damien Le Moal <damien.lemoal@hgst.com>
Christoph Hellwig July 21, 2016, 5:59 a.m. UTC | #2
Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin K. Petersen July 22, 2016, 8:46 p.m. UTC | #3
>>>>> "Hannes" == Hannes Reinecke <hare@suse.de> writes:

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
diff mbox

Patch

diff --git a/block/blk-settings.c b/block/blk-settings.c
index f679ae1..bfaf579 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -630,6 +630,10 @@  int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
 			t->discard_granularity;
 	}
 
+	if (b->chunk_sectors)
+		t->chunk_sectors = min_not_zero(t->chunk_sectors,
+						b->chunk_sectors);
+
 	return ret;
 }
 EXPORT_SYMBOL(blk_stack_limits);