From patchwork Tue Jul 19 13:20:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 9237343 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 0E23D607DA for ; Tue, 19 Jul 2016 13:20:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F066326E69 for ; Tue, 19 Jul 2016 13:20:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E526126E64; Tue, 19 Jul 2016 13:20:50 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 AB72826D19 for ; Tue, 19 Jul 2016 13:20:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753706AbcGSNUu (ORCPT ); Tue, 19 Jul 2016 09:20:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:59850 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753215AbcGSNUp (ORCPT ); Tue, 19 Jul 2016 09:20:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AA649AD61; Tue, 19 Jul 2016 13:20:41 +0000 (UTC) From: Hannes Reinecke To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, Damien Le Moal , Hannes Reinecke , Hannes Reinecke Subject: [PATCH 2/6] block: update chunk_sectors in blk_stack_limits() Date: Tue, 19 Jul 2016 15:20:35 +0200 Message-Id: <1468934439-93579-3-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1468934439-93579-1-git-send-email-hare@suse.de> References: <1468934439-93579-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-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Hannes Reinecke Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Reviewed-by: Christoph Hellwig 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 f679ae1..bfaf579 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -630,6 +630,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);