From patchwork Tue Oct 18 06:40:31 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: 9381365 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 D605D60487 for ; Tue, 18 Oct 2016 06:41:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4E5D28C99 for ; Tue, 18 Oct 2016 06:41:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B94D5293D9; Tue, 18 Oct 2016 06:41:43 +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 5071B28C99 for ; Tue, 18 Oct 2016 06:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757915AbcJRGlm (ORCPT ); Tue, 18 Oct 2016 02:41:42 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:43074 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757819AbcJRGli (ORCPT ); Tue, 18 Oct 2016 02:41:38 -0400 X-IronPort-AV: E=Sophos;i="5.31,508,1473091200"; d="scan'";a="22753059" Received: from mail-dm3nam03lp0020.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.20]) by ob1.hgst.iphmx.com with ESMTP; 18 Oct 2016 14:41:37 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wmI9Bs/4WTgawiSwqVbHtx5b6JmEUV/qNF7hNBD1Ies=; b=EfZ5DZFJ2iYbWkpYJCxxYBtOx9ts9OO82j4GRgcPrWy7jYnDsclx7V1j+qKtS72WMnMAEBmHzy6V2fHB08lvSIzTsz2S+qG9d0vKjtpjHE0k716fjBv5J31HBwJxkfmt7WrQbP8i4HsmRt42eVTSrVV9h7mDpb6Qdbw5Mr453oo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@wdc.com; Received: from washi.fujisawa.hgst.com (199.255.47.8) by SN1PR04MB1982.namprd04.prod.outlook.com (10.166.69.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Tue, 18 Oct 2016 06:41:34 +0000 From: Damien Le Moal To: Jens Axboe CC: , , Christoph Hellwig , "Martin K . Petersen" , Hannes Reinecke , Shaun Tancheff , Hannes Reinecke , Damien Le Moal Subject: [PATCH v8 3/7] block: update chunk_sectors in blk_stack_limits() Date: Tue, 18 Oct 2016 15:40:31 +0900 Message-ID: <1476772835-18541-4-git-send-email-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476772835-18541-1-git-send-email-damien.lemoal@wdc.com> References: <1476772835-18541-1-git-send-email-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Originating-IP: [199.255.47.8] X-ClientProxiedBy: CO2PR06CA014.namprd06.prod.outlook.com (10.141.242.14) To SN1PR04MB1982.namprd04.prod.outlook.com (10.166.69.142) X-MS-Office365-Filtering-Correlation-Id: 16d296d6-0868-4d91-e6ed-08d3f721ce89 X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1982; 2:BxRhW2JfmfH86VMCiGK8wyExzaevlU8bXg+v8pj76Oxvvp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ZzviqzlDw5s/OzMdHbhQYMii4hte3C24//T5de6TH4SLUNUib/X3gCXWwiYv; 20:mo9SYfmduqMN8KkeFs1OXV4gUIheEMlYSrpyHTazRnNoO3MB2Y7/2VsIuFnyXIFZup5A1o8IUb+GYsPAJXfyFvU+/7g5hNY8jsCdMQty/aaOReGnte+7t5bWDa8JkeNbpxTfY48pWe3Tg/SuL2rGDWtv0qbpb6VQv6pYX5QJmjZ9yIZ6QGFXANI4GfzCpfxB+GU/VbTTPsQMTvGArAFwZU4jvpG6Tr8KKnAbdsYPJbCgGJBVRrVqqxguuQRZQ8pik250AqlPHF2RnuIxjQR3X7XPJoAL2SIenghlZdkQ5dhE1vzQvS6stJ86OqXTXunkV8CVLDrqwtaA+FpN/lb5JsAUJbY56h6qCKXUuhMbVRmbST9O5YySjnTkXusQJ1E4PshCAWHSTCL4Vxx1Fq+uHQPQ5hZiX9D7w4nlPP4ProXunY/Ei+cWFUsodIId4iXEWYffWVt9SuUAC/XJ4rvbVqdztbYVEJpScddhhJzXayK7gEbynJv3mZRiRnbnVO4W 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)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SN1PR04MB1982; BCL:0; PCL:0; RULEID:; SRVR:SN1PR04MB1982; X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1982; 4:v+G+N7yUEYCyef8l7lMFLX8hC2NcwBrEDROwoS8c2Mapjp8EIFutzbiIQjEgAmk4Uoe3TQHelBPcekxgllqMyVqkkSoDypuV4c64Q6e30Rlyo93mc+z0+RpcHPzJhiE7Q26ehqq0W4rCs+LJ+6HfQWrR9TsrEsR/9sj4Kd/RpR93ZXIsRBYSEmK29XJZ8U/tFZd5V2tjvTVSoW9lNxmT22E56MgG0XgMCPkEdw2RhDsiKYA3/UJboNvKyaz8dA4gmlAFdKUs7K5cz8HXWStzSCdotClTgzMSnJu/XfedGUvfXaYV1P3+oKfdLNKpfrhpV/MRyv3gzvMkwo65/6NN8A/gg3IDJDw5A3YHCreui9ZuVAXbjJHrcHc9QI6FLpeT4KWd2GhOvpMlIfsorC1M5KE04i4hQymbUAIMQTAFclgwJY2QW8ljXK80rx767ZBuTrvZLEUpznVbUqIfdRy26vVG+9cSnDM2gjIsZ8p7vKr+WmZKlS3WaZ7DygITOhxB X-Forefront-PRVS: 00997889E7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(979002)(6009001)(7916002)(189002)(199003)(81166006)(81156014)(97736004)(3846002)(586003)(19580395003)(19580405001)(105586002)(4326007)(6116002)(68736007)(42186005)(106356001)(50226002)(2906002)(8676002)(33646002)(2950100002)(66066001)(47776003)(189998001)(7736002)(5003940100001)(7846002)(5660300001)(101416001)(229853001)(6916009)(110136003)(6666003)(50986999)(36756003)(76176999)(86362001)(48376002)(50466002)(92566002)(305945005)(107886002)(4001430100002)(77096005)(7099028)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR04MB1982; H:washi.fujisawa.hgst.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: wdc.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR04MB1982; 23:J0omVMicI9yNVOJ+znaD+p1fsgLoIfgEkIdL6XYLq?= =?us-ascii?Q?+nM6eWfoQIL0rSc3UboMckCdgQl9KPB06nrXsN47xz8F8ioX257Myd9H2aEU?= =?us-ascii?Q?iCfxlXDaEwUAcOkgXZR8SH5NJwyY0S+rp5xSLeU06umOJ8F1SrKoaJt0GKk5?= =?us-ascii?Q?wOR80AWmCaFzS95ZdAlpKNo0ioCOu1ca9UNhDODJU0vRCYfSD1a78CmEJPSR?= =?us-ascii?Q?FHi0g1+82TpTrX3RdMmJqPQ11BE9c2TW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l98ycSj6RFdzUiBCeCGk6TctlREOxGImg4RXb1/LQYZBZt8oBjjA94CKFER8J5MUCykgjpXyd7UNeD9zAmgv/cszOQzO2PEfzk0MJpH5X8IErImExPMtxFWEU48gZFHaasgwW7aA8xGefUfQAfnvL6ArpWlskob1rEJ9/Quv8D6LMf/4tc9vN5sY4mgIF4x1giLG3tS0N7M12H3OE6SgUemTLeARJDC/hGk+bSATo72OWEL8IDXbBvk=; 20:SnZKfjGHHLLjcEx2k+rSCmO0Ed8ZQyx0yQjmHa3AbYL61TKMmsiD076/7FsANvQvi06wll5hx82TYShFWGwd4Uc3tMYaOjN7dFd4rKwVlHPvrRb5y6qGT/HZHu7JnYJhhVjndt9kKp3vjHWe5Ta7+qzadPRsqz3riKhlQu1gY+qyhg0CLrbmai77Zgg0Tvp8kMXP4YpBq14pi32u8l/CW31eNl3HW+V7soTlSqcA1f0MgEFIM9vvzuBOpbmAxFk0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2016 06:41:34.2996 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR04MB1982 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);