From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Damien Le Moal To: Jens Axboe CC: , , "Christoph Hellwig" , "Martin K . Petersen" , Hannes Reinecke , Shaun Tancheff , "Damien Le Moal" , Hannes Reinecke Subject: [PATCH v4 3/7] block: update chunk_sectors in blk_stack_limits() Date: Wed, 28 Sep 2016 17:45:35 +0900 Message-ID: <1475052339-10202-4-git-send-email-damien.lemoal@hgst.com> In-Reply-To: <1475052339-10202-1-git-send-email-damien.lemoal@hgst.com> References: <1475052339-10202-1-git-send-email-damien.lemoal@hgst.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: damien.lemoal@hgst.com List-ID: From: Hannes Reinecke Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal --- block/blk-settings.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index b1d5b7f..55369a6 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -631,6 +631,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); -- 2.7.4 Western Digital Corporation (and its subsidiaries) E-mail Confidentiality Notice & Disclaimer: This e-mail and any files transmitted with it may contain confidential or legally privileged information of WDC and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Le Moal Subject: [PATCH v4 3/7] block: update chunk_sectors in blk_stack_limits() Date: Wed, 28 Sep 2016 17:45:35 +0900 Message-ID: <1475052339-10202-4-git-send-email-damien.lemoal@hgst.com> References: <1475052339-10202-1-git-send-email-damien.lemoal@hgst.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from esa2.hgst.iphmx.com ([68.232.143.124]:10022 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbcI1Iqs (ORCPT ); Wed, 28 Sep 2016 04:46:48 -0400 In-Reply-To: <1475052339-10202-1-git-send-email-damien.lemoal@hgst.com> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, Christoph Hellwig , "Martin K . Petersen" , Hannes Reinecke , Shaun Tancheff , Damien Le Moal , Hannes Reinecke From: Hannes Reinecke Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal --- block/blk-settings.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index b1d5b7f..55369a6 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -631,6 +631,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); -- 2.7.4