Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2417096ybz; Sun, 19 Apr 2020 00:47:25 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/762HU6xf5mrs6yNPG4+iE1T2m51Xa5js/VBlqVSDhEcTZFMy/q5FTFzNmag8Wo2NP7Pl X-Received: by 2002:aa7:dccd:: with SMTP id w13mr9658669edu.94.1587282445023; Sun, 19 Apr 2020 00:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587282445; cv=none; d=google.com; s=arc-20160816; b=Vc5KAvRviAlLijIkGLXkslph89UClOld0wgwBfJgjdnmP7md3encoqz0BhmNSw3eI2 zzRl8D4rXwj3+ebNAdRWGMajNHS4snDvsPx6YtzGJ2l620NqDnZ6IHV48OB+rhx/DQ9E wQyuK0PX4hqPfmdcanQNNX7zRRLYoPm7GCps328UECaIoCaToq/qN9OLWbGcRzRBN1ll aiJd+tx1CS67MM8T7coIliNtjOdVThfUvLwq1CPhmv1tnA1TpQI6U/bQ52gDnuItzRNx wSJwxwkNFLP2a2+JRCCOGHbmCBq+GI9w8iA0PG9o2udt/kOt2NBNLSVqT7oOttHFu86X 6E+g== 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 :message-id:date:subject:cc:to:from; bh=iK8eMq3flDoFvZHrreFZxbTNsLPpYkHEO6Hr1c97lbc=; b=TtOqrxGCciFvtc9/SP0I/8nA0eiGOY49YvBhiLYLvj6aR531uPi0CHWZ7Zjjm5d/X8 L5TtE+My9p0MtR2Mhe/vr3JqGzpjjD8JsTqv5MnI/HKP0+uk1GJX50NOTcp5xm/pw+0M D1W8xUyf5eJTa0G6Bl1Bj8SutlSqAxavF0TUEMhgKrlebIaD7gcTEJuD2EjlBgBKRCKn ttiIz5UtqfwUUshhOeBC7qloyKqsU1t/R9dGnALxEzUJLQ8Wy+16tu++Ta0wqG0Lx1lh 2DKOvoMc+Jmg6d3JvDQgV2sMrbrwC3nNEl8RGu7K5hYoSTROO3XKNzsYOw45M6SCQc88 jYTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bonedaddy.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si10123489ejq.460.2020.04.19.00.46.44; Sun, 19 Apr 2020 00:47:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bonedaddy.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725939AbgDSHpT (ORCPT + 99 others); Sun, 19 Apr 2020 03:45:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725903AbgDSHpT (ORCPT ); Sun, 19 Apr 2020 03:45:19 -0400 X-Greylist: delayed 844 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 19 Apr 2020 00:45:18 PDT Received: from master.debian.org (master.debian.org [IPv6:2001:41b8:202:deb:216:36ff:fe40:4001]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 853E1C061A0C for ; Sun, 19 Apr 2020 00:45:18 -0700 (PDT) Received: from pabs by master.debian.org with local (Exim 4.92) (envelope-from ) id 1jQ4Q1-00040I-4w; Sun, 19 Apr 2020 07:31:09 +0000 From: Paul Wise To: Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, linux-kernel@vger.kernel.org Cc: Paul Wise Subject: [PATCH 0/3] dm raid/raid1: enable discard support when any devices support discard Date: Sun, 19 Apr 2020 15:30:23 +0800 Message-Id: <20200419073026.197967-1-pabs3@bonedaddy.net> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This makes dm raid and dm raid1 (mirroring) consistent with md raid, which supports discard when only some of the devices support discard. Another patch will be needed to fix the queue discard limits sysfs files, fixing `fstrim --fstab`, but these patches suffice to fix `fstrim /` and I haven't finished figuring out how the queue discard limits are set yet. Paul Wise (3): dm: add support for targets that allow discard when one device does dm raid: only check for RAID 4/5/6 once during discard support setup dm raid/raid1: enable discard support when any devices support discard drivers/md/dm-cache-target.c | 2 +- drivers/md/dm-clone-target.c | 2 +- drivers/md/dm-log-writes.c | 2 +- drivers/md/dm-raid.c | 21 ++++++++++----------- drivers/md/dm-raid1.c | 1 + drivers/md/dm-table.c | 32 +++++++++++++++++++++----------- drivers/md/dm-thin.c | 8 ++++---- drivers/md/dm-zoned-target.c | 2 +- include/linux/device-mapper.h | 13 ++++++++----- include/uapi/linux/dm-ioctl.h | 4 ++-- 10 files changed, 50 insertions(+), 37 deletions(-) -- 2.26.1