From patchwork Thu Oct 6 01:04:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 9363589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 372976075E for ; Thu, 6 Oct 2016 01:07:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B51428DA6 for ; Thu, 6 Oct 2016 01:07:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FACD28DA9; Thu, 6 Oct 2016 01:07:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABCAA28D71 for ; Thu, 6 Oct 2016 01:07:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754769AbcJFBHD (ORCPT ); Wed, 5 Oct 2016 21:07:03 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:54658 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753131AbcJFBG7 (ORCPT ); Wed, 5 Oct 2016 21:06:59 -0400 X-IronPort-AV: E=Sophos;i="5.31,451,1473091200"; d="scan'208";a="20799449" Received: from mail-bn3nam01lp0175.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([216.32.180.175]) by ob1.hgst.iphmx.com with ESMTP; 06 Oct 2016 09:05:14 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-hgst-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wmI9Bs/4WTgawiSwqVbHtx5b6JmEUV/qNF7hNBD1Ies=; b=ar6suy831h4lAvFPImmjGZJu9KVEzh3IFchcrMeMrPe6BUkdDZ9Pp4fxwjuPYmz/B7aMM3Q1ClBVNIVMWzBkqFIZidCgrAsMaeGFh/p+MXbRgDHAyGajYbFBET0lPl2W2e3z0Miuf7GJ5dufLbxVy1y2xmrs663HodF3CJzijFQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@hgst.com; Received: from washi.fujisawa.hgst.com (199.255.47.8) by SN1PR04MB1983.namprd04.prod.outlook.com (10.166.69.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Thu, 6 Oct 2016 01:05:11 +0000 From: Damien Le Moal To: Jens Axboe CC: , , "Christoph Hellwig" , "Martin K . Petersen" , Hannes Reinecke , Shaun Tancheff , "Damien Le Moal" , Hannes Reinecke Subject: [PATCH v7 3/7] block: update chunk_sectors in blk_stack_limits() Date: Thu, 6 Oct 2016 10:04:48 +0900 Message-ID: <1475715892-18856-4-git-send-email-damien.lemoal@hgst.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475715892-18856-1-git-send-email-damien.lemoal@hgst.com> References: <1475715892-18856-1-git-send-email-damien.lemoal@hgst.com> MIME-Version: 1.0 X-Originating-IP: [199.255.47.8] X-ClientProxiedBy: SN1PR17CA0065.namprd17.prod.outlook.com (10.163.3.161) To SN1PR04MB1983.namprd04.prod.outlook.com (10.166.69.143) X-MS-Office365-Filtering-Correlation-Id: 9a2f7afa-6fd0-46ee-50bd-08d3ed84d388 X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 2:j9bcH5sYRHZJQFG1ndEk8DN+veQQpDkWS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smb4XR5DKDIcTathMymoKaV43rlj4RLDOBGnBJ14b+PaiXHdghxPHPaULy3+hs3W42W1qsN0xEe++zOTAdNcH1140uvEptJ/tGl+UPfMey3qTLniUE6a6zP7BzN41IBDR90TopO4HUnQHZttfpGjUfXC0Yx6J63yo/cDG3T/+LcYQYZ3L0XL0AAnqU7eFMhz/Eb7JSIA0oUS7rY5GSO+zitnJSTsdh525VUT0oUwzmBbgs2Tdfg2RyumH5GA2N3VAMqGH3suyE6cXj8u5tsmaXNZwN6v+lUufZC+WDJRZpkEEHUmLWp9eGISEW/PQAmf+60f3QjdB3K/NpVirQyagIsYR4KfLkh9F4zxF6Yd0jRfTY/eD8znC+U19rwsyLWkiVbiaf9xwmVsd5SlvuZ0ZbiqdoY+7GYMrRPLVKCzHy4n0kd7HvqK2gR4htZrUlb+xgN/HYbchx1h8fukkBPM70wlJ4NeLbAP4alvRuIsPMrr X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(79135771888625)(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:SN1PR04MB1983; BCL:0; PCL:0; RULEID:; SRVR:SN1PR04MB1983; X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 4:dUB786ZjK/wyjBmEwfCoLo/GY15bJh3Ajt9Ms+jSFyYyVCGI2LEHzLs8Yeqj1ovetC4zFE6HZJ0wNxJwZF2rCbZCjvZR+hp16RkOx2BJmn60f/4sqABs32O7L0wIwSpgulU59q8V0XVcageM8ybs80oB3dfdzBptFRM8Ip82w183be0m9dvRBhIhz+dZ07KywmtUqJmJz5TiroHAXQMxm8QZJPRYhNSA1AqMd+s+1HvTFtX5YNQd2ydTylM/oK1rjKIpLBSj77YHR1XMSkMtVAg/FOcfewkq+wkkdniVFYoxyYHqrco3A5ukhw4bl4tvULFVwRDNShN1IX7VaTZFBYCqKO1BZZBDl7NSHOkVGpMM+wqTuTKpNxXf9kDAUWkw12jWdEX3rI9NEhiQVDaATpGiEOKGtCWF46u+USK5epM1XliMgD0RUVjLOnmAf+FAOmuECzyiD/CMduPv0kftnisSXBobLgjeLDZUhQbCNzk= X-Forefront-PRVS: 00872B689F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(92566002)(2950100002)(19580395003)(19580405001)(6916009)(97736004)(305945005)(6666003)(7736002)(7846002)(6116002)(3846002)(586003)(229853001)(189998001)(66066001)(5660300001)(33646002)(110136003)(47776003)(86362001)(48376002)(2906002)(76176999)(68736007)(4326007)(5003940100001)(50466002)(42186005)(105586002)(106356001)(77096005)(36756003)(81156014)(81166006)(101416001)(50226002)(50986999)(8676002)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR04MB1983; H:washi.fujisawa.hgst.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: hgst.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR04MB1983; 23:p1bTingbKerNe1J+X6ww0MkNOc4yA6lrvNhS9OPIU?= =?us-ascii?Q?dMI6MxBkSnz88zyUPHaUKcnHSte2nNGnySbuXCezzpjrCLwvTLi497RYt3WY?= =?us-ascii?Q?BImQF5OVb8VCBGun7X5FrW68hxaI/dEKXA2uWydo8bgdn3Eti/BGCXhKx5A/?= =?us-ascii?Q?/q0Yx4fxT1oqPxjuk/l+KhtlyPrdCH8s0R0lp5jfl+AqdKG8oJYD2GUcOIFV?= =?us-ascii?Q?6WlWufvFYkE9J54yvekpitY1W0MqjUIQstoA6u56Gecjov6o49MB1MtCcO2S?= =?us-ascii?Q?CCeGNJi/MioV2Y/FgsdNFgbWX+t84o6MEgtw1E0UG0ZulVvh8SXGjkh5L9Wd?= =?us-ascii?Q?ooW6jkbmgNcTfbEwM3Mib0T2qvo/h/7Q8SlRm6UFJ8EA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+SeEy3hYtv23olkCbcVu/lDzgdzx6PZ2nPBbG2R7b7m5E+YaXVOnK5Km+71zFqDCIqiXObaVZ+iGTxcSVDp5f0msboqwn6AxCfGjIAk6p1FgL4GxynGxcVYnd72OTxyo4o7v/eq+J4OAYVwBaYBI+tLW60Xx1OdhHknLCtUF5CKDezpgLHyctpet6QC1ynQSvMo2X3OzPNUvAZ3w9V9w==; 5:caqMIFAq+ZDJzgA88IJQ+iCxwimqDApyIVZFzeVUPC/qnDi8y45FZxAh/x8KH74x7O+BT5P0pGLQASwDYAkTG2AMuiXX79UETxZzKwiZTQzFWoEgvBcsTjCUm/EgJhR2SRyfwlgJTtqcFk8DU5KRbg==; 24:TqavKfeK73NZMlghNZthkTOIAl0zMQMEYbdHCu9o5Sv1J9rgndLwDYzM/OuKHG0AWETafPc7pNyClrHnkn6NhcIsoG3xNYZdqmVyuQu5zdI=; 7:XT5vTasiW0zaWEyY1yVP1oMPJ4Uw1qWAScG8ao/1nD/T9JuYba1qKaOViYH73AGkFZWG8UUuP3bugkNl5c7elzMD0SWeB9D9Ly5nmH0db2JkPvyp3rY7A181C+9C+Tmdf2QT01F4OWsgRscMXW9wFwFvpavJUe354Lv/kE2821QdpnmwEpknywmDZD4KcdGs197B76trSUbfIe/E7cRjaRy/RkjYutvJ8gz7dLvM2Pet5TppsqOhnBXbvim1O+GKgfsRI0rPMvHwziLnTpJyjm85YuPX6jXiNKM/rgPCPXkksHR/dJ0KRrvYhUgo+xE8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 20:k5yWqqzq9/sm0699XM+pSBWBhxaNpOKArF4qRvbFZQ1shx9O9oGWhcJckTbomEZToKU4Q5F30OsymG8zPDqSRlNbDkt6PjQf4FdNGtN65kePFx093HHOmx8VDQACpNOGq7yRx5fL2muCZSZoghD16WluRFuRoLe4KPkqoN8xxXkDwgKgudkNq3aRgjBQHQCTcOQKgXkipi8H2qFwO04iWGuT+d7zg5nN51D1+O+ng+JI/T967WwaXSr8xJbceubB X-OriginatorOrg: hgst.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2016 01:05:11.4881 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR04MB1983 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hannes Reinecke Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff --- 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);