From patchwork Wed Sep 28 08:45:35 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: 9353337 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 D944360756 for ; Wed, 28 Sep 2016 08:46:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA0BE2942F for ; Wed, 28 Sep 2016 08:46:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE45A29458; Wed, 28 Sep 2016 08:46:57 +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 C9F6C29455 for ; Wed, 28 Sep 2016 08:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752286AbcI1Iqz (ORCPT ); Wed, 28 Sep 2016 04:46:55 -0400 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 X-IronPort-AV: E=Sophos;i="5.30,409,1470672000"; d="scan'208";a="18827642" Received: from mail-bn3nam01lp0183.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([216.32.180.183]) by ob1.hgst.iphmx.com with ESMTP; 28 Sep 2016 16:46:47 +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=Nl36z42Zpi+L+zUlztvGqZPBJjHdSHAiXKQq0FUSpRBEqJ2zfXaH7g9kmvoLienqA6HEx0ykhbj7+IYUfFC1r5ciBtsYhvCRFw7dCIcDUsj7NwNPlEYHJH43gLHsa8haF7e5OxyplbRse5WP/Iie+LJoKzkKEFaKuobNh2jyyXg= 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; Wed, 28 Sep 2016 08:46:44 +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 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> X-Mailer: git-send-email 2.7.4 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 X-Originating-IP: [199.255.47.8] X-ClientProxiedBy: CO2PR18CA0029.namprd18.prod.outlook.com (10.161.80.39) To SN1PR04MB1983.namprd04.prod.outlook.com (10.166.69.143) X-MS-Office365-Filtering-Correlation-Id: 1542939b-7409-47fe-d0e0-08d3e77bfa80 X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 2:FMyje9qcdeOQu4kjw5W1xMWkG7d5zaPBfZRjXhieRZGS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bBMc+x54K3urfjQjoI50qYdms7ZfbwTHPAdAurdtB3MHskDRBq8= X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 31:CaJnxqPrnKuho3oNK2ity4sUcl606hm4qHfC2JnW5PE7tbTdd7Yy7cFH+xXN1iZkJPdSg5VdPDYdgmSy/k8dst+vF8qcem3GB1fYnvLORF4HPv29q9bDYRmQQ1tZiCNp3l/DlzmrnGf534XzM9jK+qfsfGEP092Ez2sgdzYv6qxDNKx+s22IAc8EVBz+0kFEL5igtkHW5MY9pv6QBycNRpzB44L4g8joiMaRHrCIGDo=; 20:XVIQxuhbqXaFoFOIZoKXrA5IiTL/bbhw1QoXKdy5hws8tqJjV32d9Tvmoa9fbiiOwrt6lSNcz97umZzphC1yP2FQDbzj01xvzyuK+hfRTEqqARQjsslZk/RvPHBGK2iEHWbJbIkUeu0FgsiIswN/p61PiIIeSzLyUNhsNS73laEr+kf6BKei26OOyy/kbhHbfrSamzRdZsRjGABTijtHzFawBLU5EFaqrqTUAvkb680ge6fVL9jh3039KqI62N7IBbbLDNcTtf1raJlZKCRtGtjGiz++ps4etSnvkGmrOgp2+ofd+9A+Zirv6mYPBLcFUVrZk5LdZBM7fIN80u/3u6c6NZmFBKHYJyN5D4rpoV1aEEy1C9npt1q5+/wFJJf/3q4fu+aIfMjsPm0n9gcdU89d9Larcl8B2QTBx0dZ8M8Cjyb5qaEebESWvcL35U7ydODzgIXF5dEhQK3jDy9uFRZavRxgZicmnSGiAs74CJQK/H7WXxJnyoT0gd7P+EXz 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:SN1PR04MB1983; BCL:0; PCL:0; RULEID:; SRVR:SN1PR04MB1983; X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 4:6KRojoUS6yK6toNEk6Ghl+xlMqBVXuuPKytNvLkr2qb0Yr1obw4RaOzKlAVJtW1HK6KEGH0VGpDXNHktCkgNCXEutPA+EM6AvPc9RR0xh17i2izNb/NaX51xO+9C5ag5sfSDiimNS9omh8BvDBk0wi9pzCP9ELx+hDGAf6l0sqD/etTf9NV2lQezHTvwtRfXo7jRVYjS8VfQJVhQlM+4UlJ2RXVMOqifU3F9v9X702NYo42P+4l+NFQSsiK6tRFr0bGBNHwJTkBb0rEwlwItnyMKpV57MLsiBvuTAacYs+0NELL6jiTlUKhTuHWnpuvDvtIHDkqMMj9dY2GLE5JOjgZLRfmAhaYPWqHM8F3vqsc6bk+vNrjchSQC1WQyQKUFDq3r1iibOj7+mKGSqMosB5p3hJAxtHxxnNm+zBbhNiqr7zyyZSnk4skq6TLvLLMcVoVgXT/FnVkwKfDSMVWbkw== X-Forefront-PRVS: 0079056367 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(77096005)(19580395003)(97736004)(2906002)(7846002)(19580405001)(305945005)(7736002)(5660300001)(68736007)(48376002)(66066001)(229853001)(86362001)(110136003)(50466002)(5003940100001)(47776003)(81156014)(586003)(3846002)(106356001)(6116002)(36756003)(4326007)(81166006)(105586002)(42186005)(6916009)(8676002)(189998001)(33646002)(50226002)(76176999)(2950100002)(50986999)(92566002)(101416001)(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:KEAPR9VTw1ZMrxpRlrox0LmnD1piuCuCQwDfS5yzn?= =?us-ascii?Q?D81/Ggog8c9FT0Hm42gZJLoJ80UTbQrAdroeKxMvLGBGPjC1xURET7Z095hF?= =?us-ascii?Q?94sLvn8NDaIk3+dFuMcShm8IRJ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ErFR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR04MB1983; 20:N74gClKUvHWwfDppMDO6H8iveQisBeRvBtKCQ1kwcPj+/p63SVcR0BNKArpQrJUInLxB9j6SBpjRsLHoAK7TRKI1vQihy9349TXn4Lo9TgMdoMb0WsAyB3YRNEu6TWiPmMF4uc8K5aLXLZzTy3n9AAUhaTwpJbDuydPklf2IBAi/yfXx6+nEqVfUcn6wSocQ5KjEq7n8OQQJNwa0hhbBtphERCpm+VRTk2THaLUioJXvA1z7oq4xriZbZucnDkkL X-OriginatorOrg: hgst.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2016 08:46:44.1437 (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: Shaun Tancheff Tested-by: Shaun Tancheff Reviewed-by: Martin K. Petersen --- 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);