From patchwork Fri Jul 31 13:36:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 6911501 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3041FC05AC for ; Fri, 31 Jul 2015 13:37:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DC7820511 for ; Fri, 31 Jul 2015 13:37:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7892720647 for ; Fri, 31 Jul 2015 13:37:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751770AbbGaNgb (ORCPT ); Fri, 31 Jul 2015 09:36:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:59630 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbbGaNgZ (ORCPT ); Fri, 31 Jul 2015 09:36:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id F0721AD8A; Fri, 31 Jul 2015 13:36:21 +0000 (UTC) From: Hannes Reinecke To: James Bottomley Cc: Christoph Hellwig , linux-scsi@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org, Hannes Reinecke , Hannes Reinecke Subject: [PATCH 2/8] block: update chunk_sectors in blk_stack_limits() Date: Fri, 31 Jul 2015 15:36:14 +0200 Message-Id: <1438349780-116429-3-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1438349780-116429-1-git-send-email-hare@suse.de> References: <1438349780-116429-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Hannes Reinecke --- block/blk-settings.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index 12600bf..63aa067 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -647,6 +647,9 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, t->discard_granularity; } + if (b->chunk_sectors) + t->chunk_sectors = max(t->chunk_sectors, b->chunk_sectors); + return ret; } EXPORT_SYMBOL(blk_stack_limits);