Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2501197imm; Mon, 24 Sep 2018 05:32:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOvMC+ELfoAeG20tCWXPNSJywGDAAQS60lUCfP2WhHGnLZS3GztZHVt3vLOzmyzDowKavy X-Received: by 2002:a62:3a08:: with SMTP id h8-v6mr10199617pfa.61.1537792363643; Mon, 24 Sep 2018 05:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792363; cv=none; d=google.com; s=arc-20160816; b=hLNUyKFHH3yzfUBqrNR1/+XvSwOi4ElVfOjQWwF5345i12h63DdCaZFjrKvVCt7bCE 4Upx5C8P2mKjjfVEJ1eg62yCHZdCKdmsRWhZ7ij4KgcyDZL13nEgY5bYoG/wqcnmxYkP Jzl0iPjjyKfzRwzIwXa3CopPltmzM+Wm0D79zxnrbaFUVa4bRKA3ifRL7Ele6wya+skE /nXc9IByM7Uz+n1bqg320sQY5ncQUXAEOOXKWqC0ce4686eQ2wk3OKbRe3S9TbxDkog9 8KFsM32iX9uExuvZie0ZudR2rCL32JgbjS5mWUxS+hWJBOfYhXlJZ00eLZsjUsih4ePb zZXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=3T46pqWTh/P9WlbFCjmO54JwAJ0EtF1tSzUDpi26cGk=; b=abs7MkLKfvsPVJhfeGy3atkJz9bbfdqsHuxQ1hzwRPLgNceHQu0SNtAroHJKFFn63y jA+SCAcfky6NYGfGtDg6+N/6sDqPrG1sDIkQd27VDi/9Ymc70TizACZRl4JbGUoW3Q5x +UfkBxB9CXLwAekgiBJobAnz/KpYX99Cqs2KoJkZk5zHlcHsmManbwjjNuvu/iP9nUwx EHlcuAbahSYjXlifSJqUyq2743LrDbyIwn9RCnaNNun8xcYXzHdwR5ih7m5bKDZSp64Q ff+B6uMgrn7LXizGTiqeWQlZxQAjMlL0iJlWG/t8RBz0mbLAledGeBfjlWaUfMuCcDff DHRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si10340362plh.374.2018.09.24.05.32.28; Mon, 24 Sep 2018 05:32:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387835AbeIXScC (ORCPT + 99 others); Mon, 24 Sep 2018 14:32:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57752 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733273AbeIXScC (ORCPT ); Mon, 24 Sep 2018 14:32:02 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4FEA11098; Mon, 24 Sep 2018 12:30:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Mike Snitzer , Jens Axboe , Sasha Levin Subject: [PATCH 4.18 041/235] block: allow max_discard_segments to be stacked Date: Mon, 24 Sep 2018 13:50:27 +0200 Message-Id: <20180924113109.273838066@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mike Snitzer [ Upstream commit 42c9cdfe1e11e083dceb0f0c4977b758cf7403b9 ] Set max_discard_segments to USHRT_MAX in blk_set_stacking_limits() so that blk_stack_limits() can stack up this limit for stacked devices. before: $ cat /sys/block/nvme0n1/queue/max_discard_segments 256 $ cat /sys/block/dm-0/queue/max_discard_segments 1 after: $ cat /sys/block/nvme0n1/queue/max_discard_segments 256 $ cat /sys/block/dm-0/queue/max_discard_segments 256 Fixes: 1e739730c5b9e ("block: optionally merge discontiguous discard bios into a single request") Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- block/blk-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -128,7 +128,7 @@ void blk_set_stacking_limits(struct queu /* Inherit limits from component devices */ lim->max_segments = USHRT_MAX; - lim->max_discard_segments = 1; + lim->max_discard_segments = USHRT_MAX; lim->max_hw_sectors = UINT_MAX; lim->max_segment_size = UINT_MAX; lim->max_sectors = UINT_MAX;