From patchwork Wed Sep 28 01:22:33 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: 9353019 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 C1D216077A for ; Wed, 28 Sep 2016 01:23:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B040828A38 for ; Wed, 28 Sep 2016 01:23:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A32C02920F; Wed, 28 Sep 2016 01:23:06 +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 47E4028A38 for ; Wed, 28 Sep 2016 01:23:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934589AbcI1BXE (ORCPT ); Tue, 27 Sep 2016 21:23:04 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:31916 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933226AbcI1BXD (ORCPT ); Tue, 27 Sep 2016 21:23:03 -0400 X-IronPort-AV: E=Sophos;i="5.30,407,1470672000"; d="scan'208";a="18715513" Received: from mail-co1nam03lp0024.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.24]) by ob1.hgst.iphmx.com with ESMTP; 28 Sep 2016 09:22:59 +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=a2J0Dqcdm7cDCD+Gqz+t+z7V11aplr4Odg4v9PIuHUD2JGUD/AYkSJwKv/9b2jaLF15QxCnjv3DQcMD6L+1SNkQR0jr4SHJZV4p0w4y7DBm9u0pd7Qqi4Hkt1DtuCTrci7LK4XBWuc6HnDv/htkVVVbXBGc49M4xt/K9AouxVUk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@hgst.com; Received: from washi.fujisawa.hgst.com (199.255.47.8) by BL2PR04MB1972.namprd04.prod.outlook.com (10.167.97.144) 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 01:22:55 +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 v3 3/7] block: update chunk_sectors in blk_stack_limits() Date: Wed, 28 Sep 2016 10:22:33 +0900 Message-ID: <1475025757-6340-4-git-send-email-damien.lemoal@hgst.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475025757-6340-1-git-send-email-damien.lemoal@hgst.com> References: <1475025757-6340-1-git-send-email-damien.lemoal@hgst.com> MIME-Version: 1.0 X-Originating-IP: [199.255.47.8] X-ClientProxiedBy: CY1PR13CA0119.namprd13.prod.outlook.com (10.164.65.45) To BL2PR04MB1972.namprd04.prod.outlook.com (10.167.97.144) X-MS-Office365-Filtering-Correlation-Id: 25769952-cd78-4770-848c-08d3e73dfad5 X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 2:sWBsfBO3/SOET2uyOpg48yLIZKtjbsTb3VPgoSMeJOWMpS3jcN1BZ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AZpgau+q+eP8jgw46iNAisxZI= X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 31:shvGJSVZ1c0qUbfODBygX9ucFuDLgQIJ5V1PojP/cffSP/we5pn7CSmKSlwpQvWyE9zawY4cAeK41hZt1Nkjc/6739vh2K7yO30hp895y0EDmFoQu9QSaU8U6Vq9LSyctVmiesyJLSkhe2OHIZYhGcM7iSIK7qtRJvGeQs7GwWNoQcsv/uQ8DW8WHW3DH6ky2yUFXOwTV5cPw82Q4FrG7pyaMC7ntK7M20LGSQcIneQ=; 20:EjvcMED9sK5gFo2i6RsPXdkNScM4mFtf83YQSTNT133wKtf9muGMHimGPF5NsRyiKvDgU5k+RMBaSsqyt4P1vjHp4qXJdwfHUfqb74py56LdowcmYDcJ/7iA4EN7pFQcyRLsDCiB6PuPq4Qm6S71/4IdzboGwuQ1JgcwVFkddh7oqaEaDIbgBSzALAACLMfRC/1XH+w5tLQOcrznerNKPQCcNO44eyu5GgMsred0QMnD0FUH7PHizrc0E5x86AmSLdKfc5GPy4gGQv2GVTD5ZCLW1HHKvxizZ7ZGRXk7ub4SyoqX2dsGdymwiDz29h0n9mFL/10OebcRsLL7QE1ZNnPqFquKdmfiuq+gKaZrWo51n9PyGRrrlWAIy6oHQTvleR8J0vCaRsoz10KjbQrYA5DsgtEV1U6TQJvzR52T9Imp9P3t3cxdUHUnyFJBnEihDNjyP8ACPD9oABl5vsjJxFU32A3FDxFB4YJ+UQhl4p8+4HS1Ih9PfVfNEaaAeHp8 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)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:BL2PR04MB1972; BCL:0; PCL:0; RULEID:; SRVR:BL2PR04MB1972; X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 4:BGY4D55Lut/vSgIq3k7SkjNKXKuqw50K9zbx6ZdRHVXkDtX32Rjd1KX0Yu3gbuzTT19To6nYYDoXvRDTqCfLaXQl3fw0f5ubuU4pvQJAkyGwTehrjlgm1yo61ekkEJvMPj1w2PrqK3CFYdMYLpmaciKimC6Z6KZbGtmHRZcEtTPr8nEIeUgCQEmVhUPeVGqTpXXdAUZJFFBpjMy1OrUV5Jd/SjKcT96YdYSnuP7Dz+8A+qxVkqCNMNAlV4e/LeGXPAOk32uPe0PiVS5uV8JrR1USVG2QcNjjUFNZepI42LhsczpByzMpL+Tke8KQO8Vg6L9TviRCMBDgfAsNuiQgE2TUsQhAKxq07gxtpSgHhZsyTm1vVoMPR/pPDVYe1LhNCo2aB+G5nmRPbRCjwbqq0CJzQmBDD/pTLiJlkmZQIva+K/lgHyEntYP16XKTpQ6uKzhZrLwusf5USZZkZ3OUuw== X-Forefront-PRVS: 0079056367 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(33646002)(77096005)(229853001)(3846002)(6116002)(586003)(105586002)(106356001)(97736004)(101416001)(189998001)(6916009)(2950100002)(42186005)(50986999)(76176999)(50226002)(86362001)(8676002)(19580395003)(19580405001)(4326007)(66066001)(36756003)(81156014)(81166006)(50466002)(7846002)(48376002)(305945005)(7736002)(68736007)(110136003)(5660300001)(2906002)(92566002)(5003940100001)(47776003)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR04MB1972; 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; BL2PR04MB1972; 23:O7+CRo67X/Na2uNcijHc1or3lbLtzX2GEYDZ95qrm?= =?us-ascii?Q?hEpy1/VYsB9YLoew01xAyikpiX7nEeMpMwziD4Q5QFb2dHbRHIbGlP3u5WnR?= =?us-ascii?Q?0eeS95VZ8WxW1Q5UXe9Isji2dTTCw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put: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 20:qhlXOo7y+5bCoWYx0YhlVy86gavj2f24XG4I+Cxq2QOhq8dBwJPmokJXn8zWbDSzLKhLZhZHa9XE1xYuwQuex3JsvA+eytgnPR1aCCfLDh9rtUJhK6QtNK9YxabQx4CvOWoArRKPWAT5oSYW4bKM6MBt5umzFsNpvsDKD9ci1kRTRsmFjNeQywVeKLNCUm/E1G0wLdvzDfoKcErHiWJ/xRxNDUEYPshEMMKC5BeaSFSVst9lEUamkq07h/hdR4FQ X-OriginatorOrg: hgst.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2016 01:22:55.6543 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR04MB1972 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: 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);