From patchwork Fri Sep 30 19:12:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaun Tancheff X-Patchwork-Id: 9358785 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 32AF3600C8 for ; Fri, 30 Sep 2016 19:14:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EB1D2A154 for ; Fri, 30 Sep 2016 19:14:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 138C72A15E; Fri, 30 Sep 2016 19:14:36 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable 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 E88B22A154 for ; Fri, 30 Sep 2016 19:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934086AbcI3TOK (ORCPT ); Fri, 30 Sep 2016 15:14:10 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:33149 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932348AbcI3TOD (ORCPT ); Fri, 30 Sep 2016 15:14:03 -0400 Received: by mail-it0-f66.google.com with SMTP id 184so2603164ity.0; Fri, 30 Sep 2016 12:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=vKC+DJyIbfguds57gD0zWQaNe2Y9d1652wnEgfye2U4=; b=QEeqMmzsea2RBIq0ci0GT9jdp5/u9NyPNlObUKOLyYX7gnZkuhyuB/YrFaA8F3IGQG 2qERfcLNjZyi5kyYCApcn57cPcIjzf7m9pOFSbx6ktlZTn7m7ZowKdGrXlzTy8mMZHMS mehLfHYzIhB2Khr7xj+FaVhtjqwRKr/tPWc2e2ZVZrsvSiNeO+8mZyGnlhDeIJyhEw0S 5hAJw35ezmQu1aLOmAHgBXFbH1qCzF68VUNvg+dA+HOr2VeMDoFiHfmdp/1DgafDrtXH NFo+UoOM/kVSis2uObTsYP6wbWDxVKxE0S4DHF0p2AGVmgYqRBbeKZomUZpN8qIACBKw 0CKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vKC+DJyIbfguds57gD0zWQaNe2Y9d1652wnEgfye2U4=; b=Fx7GaZ3UU02N7kTfEpUWGBSzCcJtd/Ozp1/qM9sOF+mNwTvIKFrZ7TMeZ5TQfaitrk QJ85QQTC1HsB7s0mFPij9LTjWUyQg7jen96HZCFch9qn0KBjAEu55fBY2z89SwAeCXQq ZNUSW2vJZTl0JnAr6gpAzhKWzB17t5lyVpaB4CxW6SL/tb5/1Hi4EDWehF+lpGQPmyc7 u5c05a2R+cPS7luTHk1NfqjH2NM2Ug8QV5dMU2cLPC9wQKUSfLuW5CplOLNGm0tgdoJ+ USBahlo8SjaCSjRHpxF17Fl7Mgp35qZuKujWuigY6MVJtFEOvwLpUpg1gYhyCzZbFNJj cGwQ== X-Gm-Message-State: AA6/9RlBSKTiKQMDC/NfMliu2mbTLgyqsXSNMT3NLTCy/YeLK68ZqVTjSM65c9QzylFM/Q== X-Received: by 10.36.71.17 with SMTP id t17mr6691603itb.68.1475262842164; Fri, 30 Sep 2016 12:14:02 -0700 (PDT) Received: from helios.aeonazure.com (173-16-223-93.client.mchsi.com. [173.16.223.93]) by smtp.gmail.com with ESMTPSA id n69sm2599900ita.0.2016.09.30.12.14.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 12:14:01 -0700 (PDT) From: Shaun Tancheff To: Jens Axboe Cc: Hannes Reinecke , linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , "Martin K . Petersen" , "James E . J . Bottomley" , Damien Le Moal , Michael T Lombardi , Hannes Reinecke Subject: [PATCH v6 3/7] block: update chunk_sectors in blk_stack_limits() Date: Fri, 30 Sep 2016 14:12:32 -0500 Message-Id: <20160930191237.13695-4-shaun@tancheff.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160930191237.13695-1-shaun@tancheff.com> References: <20160930191237.13695-1-shaun@tancheff.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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);