From patchwork Mon Sep 26 11:14:39 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: 9350495 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 0A8326077A for ; Mon, 26 Sep 2016 11:15:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F118728AAE for ; Mon, 26 Sep 2016 11:15:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5ECF28AD4; Mon, 26 Sep 2016 11:15:31 +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 499C928AAE for ; Mon, 26 Sep 2016 11:15:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936366AbcIZLPX (ORCPT ); Mon, 26 Sep 2016 07:15:23 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:17584 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966010AbcIZLPO (ORCPT ); Mon, 26 Sep 2016 07:15:14 -0400 X-IronPort-AV: E=Sophos;i="5.30,399,1470672000"; d="scan'208";a="21226619" Received: from mail-by2nam03lp0050.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.50]) by ob1.hgst.iphmx.com with ESMTP; 26 Sep 2016 19:15:15 +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=WIBMaGwskpFb3cs19XwWtPQWOJm0joWtF08wwiE7/iM=; b=jEJDhb7g8LWdkopbAaBj+gx307N09zC7FAy3OLkEd5M0TP3WWZKBxocDISO6+asCcq0vvo/oftGzpFksSAM+/30C3FNiBo5UbtdzzJwu1i7+RkKHmSIz1LFOQuHXlthwXF+WQiV1Y8OR1ATt/2sXFX8Syi566LdY+yW80N11sD4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@hgst.com; Received: from washi.fujisawa.hgst.com (199.255.47.8) by BY2PR04MB1976.namprd04.prod.outlook.com (10.166.111.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Mon, 26 Sep 2016 11:15:11 +0000 From: Damien Le Moal To: Jens Axboe CC: , , Christoph Hellwig , "Martin K . Petersen" , Hannes Reinecke , Hannes Reinecke , Damien Le Moal Subject: [PATCH v2 3/7] block: update chunk_sectors in blk_stack_limits() Date: Mon, 26 Sep 2016 20:14:39 +0900 Message-ID: <1474888483-29762-4-git-send-email-damien.lemoal@hgst.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474888483-29762-1-git-send-email-damien.lemoal@hgst.com> References: <1474888483-29762-1-git-send-email-damien.lemoal@hgst.com> MIME-Version: 1.0 X-Originating-IP: [199.255.47.8] X-ClientProxiedBy: BY1PR0201CA0007.namprd02.prod.outlook.com (10.160.191.145) To BY2PR04MB1976.namprd04.prod.outlook.com (10.166.111.16) X-MS-Office365-Filtering-Correlation-Id: 06c59c13-9f5e-40da-86ed-08d3e5fe6277 X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB1976; 2:83npWwwn8Jvr9M7SuhC6Jp6nQqyjaqVXnBFVZhKYKzDnnhmAgAT5u+xL48pB5PuNP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/DgDk5lT8sEbyNz+7NKNI= X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB1976; 31:ueVx/ueTxLnHCOj5A+3VGf7HYTnccJqjbc8gMxwbof/WbLUYA2plrdTQp5483dZYcVbuk/qgmdUgqvLcOWUMQoknHTNeAYg7BLUbNurkekhSAxJQyJd8sx9nAaIoD3w6Z1nHDuqYQIeHeJj1ZPIhhLf/r34anKzsDOeE90Kimkwz+PdQJcX2D5Ti3QEBX85ENtvl+kfEt9+3TanuEoPcQMtDgQk03s4+7FJSRHPc0ZQ=; 20:AZUGOONP5u9DwxhW10y/c/GGTiMLaAnQBj9dbNZ8Jte0K1gWMEHUlqcVDg1K1hfCsryzl7du91aPpaa5oyTXZJ8+3k5gX27DI5F7S2f/8Lu/HnaLI4w+1a2kYd8xlU3nqFI/ESrUWpJZ+RUdqg4vwvJDC0nRm7kkX1/28W6PEmVSg2sA7azU4WPg6g3zwNFYAcUHVL1VSEcAZOt2rVeqxUYnsr/JUTOJ8Ob6qkHtVIn71wjep1+NIoifF3M72zzwpMUwiyc1ajcTB9w22almTJf/060bQ92E6osvOIFaOwQK/i/fOJGIjKUe/qsWE9tjorkmKZtoPJiW5OFymYVbB9bPg+BaQBuaLXZX/QrAI2LMLTUQDCPEyThg1u2f0w9uqNqAky/IDNHaJezOjgCIdDeilb6UDeQNX5mT1mJG0GTb0gUwW4do6G+ny1MpGqqa2PrklxkabyXzBprQf/sqo+qIEzifZtK+/6ubpkeNv/ilBhIv19tyEWBw683EvUKc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(79135771888625); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BY2PR04MB1976; BCL:0; PCL:0; RULEID:; SRVR:BY2PR04MB1976; X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB1976; 4:ZiVamyCGrWoN98W8iL/YFqlmI/SRNiTjVVbyfiuNHtR8MxhcdViLS9myRVlgc+B/12tyRt42FZXTioILBDmQNkCeh4zl11IXdXOCZ9fZ/alrAToNUfOKtvWn35iL2wuaH4u38Sm3nIT/KrMH9Es/Sfu8bcXAyZdDVZi9thZzDx4uc02lQGDwjltzzGRJUq960LZc7HZOwPiK6Fd22hbhrvh+JZJJidf2qM9lzjOy923TfJJ/OtLtgMKLZT1Hc05LUveQORWHo0/lN4CLkd7T+KtXJTmjIC6CHIb1jb16Dgp4e7QLG3Xma/djVqpqIkxDBDP9KdhbXXpThLtn+ODpd68MjhdU26qcfnzjdwHaX417aVRQ9k64MvS086GwUpbYey2cOLeRkUiXytjBMI81QZNEfzveNGDnX+y6qWmtpC7dGZUMYPZQYMHC/t7Op30IIa3+ZJTl2KTiAE/kth2EnQ== X-Forefront-PRVS: 00770C4423 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(2950100002)(77096005)(6916009)(36756003)(86362001)(50466002)(101416001)(107886002)(4001430100002)(97736004)(2906002)(50226002)(189998001)(68736007)(4326007)(19580405001)(50986999)(229853001)(66066001)(586003)(47776003)(7846002)(81166006)(81156014)(7736002)(106356001)(92566002)(305945005)(110136003)(5003940100001)(3846002)(48376002)(8676002)(105586002)(76176999)(5660300001)(33646002)(19580395003)(6116002)(42186005)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR04MB1976; H:washi.fujisawa.hgst.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; BY2PR04MB1976; 23:M2vGq6rk5lRvxmQMbGXpnQHe1Z+q/H6zFf0Fb54ce?= =?us-ascii?Q?nrT6Ch18OIMD21YtoFRj9trMUoTYHQnjY+dRuLq/hAd5FiiKXo+IU9dmDdMP?= =?us-ascii?Q?GEtdv3gC/lh6orc/8Q+1zOomyo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TLt62IvtsNqrIhtfks4qgYD7gdUb8zkwT+XTQnBWG8L2mgPnJ5QwkD SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB1976; 20:fv8jNolz7EyPekRdtLoT6QrUG9MAH8Wgf8R4canxM2IC116H/t09iBAjtEnnD63IDZP7DzstGwsOr52hFFT5feDjBt1ptVNJfOUbr9+Eu+0QH0uT2hrUUWxnyVfkqqHW5r7oFXCLNNF63PWjYqFr/6qVXeVapOM32GTwbCEdS2l4+vF4DVVYAKHi7VkLVlGNMGdg+DaPTtN93RdIhmN6Xxcw8hIil0rzd6LUn0EElpiTRneTGpMWeIIuQ8QYPfLC X-OriginatorOrg: hgst.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2016 11:15:11.3706 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR04MB1976 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: 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);