Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp441311ybz; Fri, 24 Apr 2020 19:50:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJzxm7WvhZXa9tXCGzLlXMp68AxaWEEVFyoNEDuX/D8CmM2AdTwJvO4WFAqrIzpI876n2a+ X-Received: by 2002:a17:906:310e:: with SMTP id 14mr10456999ejx.177.1587783051882; Fri, 24 Apr 2020 19:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587783051; cv=none; d=google.com; s=arc-20160816; b=COMT0ivnVxuXd7URYdJhPcuL8QVh2kASWAHdIsIljxIws5kD6yjbl79vVGt2ZRvjBj JlWeDusucLLq+pBAwtG6YvnKyFfWI6NHJxYOhThpsZID0VBSGwqo0/gwiCjaS7C6XPsT /P20U7O2BjeAN/wIKwEYB6aMNiny3sYmVv3CBEsbNzIHMN+ikqMUq1Jv6cEboOYqfld8 x10bTBCsc0XjNb7ZwuVJkZLtj0R4zcyuPYImNdPC+W1gQL4cctkDPHfCeg1HYXjfWM+L lIZRcXKsD+LAxBhatqHYHJ2Sv2btNbJo8jodj4UZ1o6Ujrtbo2/ccHB3p7sBMjhC2+8p f7sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:mime-version:date:references :in-reply-to:cc:to:from:subject:message-id:dkim-signature; bh=9/eYPdM9A/BRpPvuz618cds4AcWdwHEn8lAc2Evji0g=; b=KsVHFVS6cHi6GAgkf4VszyDhZmO/K7/+L/s53ZQNWKprTZU9CERctVeWNFyMLFVs7A o6GuokEshATbZMOHv+1KC88ELXdmhtGQ+TmenDg9C99KT35v/MkTJVzu40MGrrZclMsb +U+3hUb0rwk//dB/di6c1cg/fRGSpKwpdfiZAq7ws+23GS/DLJnYw4QdkHrIPPinsqca bPBVCZ10qSd2T2kN98PPtgWa6J+WQdujwtdlox/GOMvdVvOTwK525SMG935ylWm10N9k jMSSPjpi5WmRGmSVMXmADb+18ThEky0WsvFol/Hv78cTYJKYh+6Y3Z4ukfzFVNzXGA66 6mQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bonedaddy.net header.s=mail header.b=SvleyPmi; 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=pass (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 y5si4151692edr.90.2020.04.24.19.50.27; Fri, 24 Apr 2020 19:50:51 -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; dkim=pass header.i=@bonedaddy.net header.s=mail header.b=SvleyPmi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=bonedaddy.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726147AbgDYCqs (ORCPT + 99 others); Fri, 24 Apr 2020 22:46:48 -0400 Received: from smtp.bonedaddy.net ([45.33.94.42]:52940 "EHLO smtp.bonedaddy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbgDYCqr (ORCPT ); Fri, 24 Apr 2020 22:46:47 -0400 Received: from chianamo (n58-108-4-64.per1.wa.optusnet.com.au [58.108.4.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pabs3@bonedaddy.net) by smtp.bonedaddy.net (Postfix) with ESMTPSA id 4605B18003F; Fri, 24 Apr 2020 22:46:45 -0400 (EDT) Authentication-Results: smtp.bonedaddy.net; dmarc=fail (p=none dis=none) header.from=bonedaddy.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bonedaddy.net; s=mail; t=1587782808; bh=9/eYPdM9A/BRpPvuz618cds4AcWdwHEn8lAc2Evji0g=; h=Subject:From:To:Cc:In-Reply-To:References:Date; b=SvleyPmiCv9TuTuDHW3fIMBPSXiknzz/HLuFwJZu04FkDjB9RMbTDj7XGgti6Rckr ZcgJgKKCbHpqRrwl1T2TaCpRq5EVSz5ObUMdsIBFf+kj3Qa46z9seKhW3cARW7HMP4 bt7KCvRvcJgTGyau+ES8Ca/Sac6hsTAqUiGJi6q59IHqJ5J7lK9JvswWChrDR7Hzrw RoU1gVo6xiK68T/BGWcwH2zVu1/HGIUVZCidvGceCV51GigPgjEchsoSRl89/QTMlM jTq6lQ/E3z7wNRBXg2qJrNp9MemOcOo30cepYKUNXe1ekcwBuAlGyiJSBG7jxdBOam QBYCNn4+P+Wyg== Message-ID: <92911928f258ce7d1649b138e71abff90cdf660d.camel@bonedaddy.net> Subject: Re: [PATCH 0/3] dm raid/raid1: enable discard support when any devices support discard From: Paul Wise To: Mike Snitzer Cc: Alasdair Kergon , dm-devel@redhat.com, linux-kernel@vger.kernel.org In-Reply-To: <20200419131908.GA22398@redhat.com> References: <20200419073026.197967-1-pabs3@bonedaddy.net> <20200419131908.GA22398@redhat.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-yBq2dcpBngBNf7Rpu8FT" Date: Sat, 25 Apr 2020 10:46:40 +0800 MIME-Version: 1.0 User-Agent: Evolution 3.36.1-2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-yBq2dcpBngBNf7Rpu8FT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2020-04-19 at 09:19 -0400, Mike Snitzer wrote: > You went overboard with implementation before checking to see if your > work would be well received. ... > I haven't looked closely at MD raid in this area but if you trully think > underlying MD raid can cope with issuing discards to devices that don't > support them (or that it avoids issuing them?) then please update > dm-raid.c to conditionally set ti->discard_supported (if not all devices > support discard). That is how to inform DM core that the target knows > better and it will manage discards issued to it. It keeps the change > local to dm-raid.c without the flag-day you're proposing. So, now that I know that my approach to this was completely bogus, what *is* the correct way to safely enable mixed-discard support? It seems to me that the right way would be one of these options: * a sysfs toggle for the block layer * an=C2=A0lvchange based option for the dm layer I'm leaning towards the latter for my personal use-case but the former would make Linux much more flexible but would touch more code and have the potential for more damage. --=20 bye, pabs https://bonedaddy.net/pabs3/ --=-yBq2dcpBngBNf7Rpu8FT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAl6jpIwACgkQMRa6Xp/6 aaOrrg/+JpSOuup2HurdD9NIAtht/hAlQukVyB8jLF79Y7TiRBj/bGBL3bNFyeu9 9onyY8oKkJNxz2lDP8TX/RthuQQPe4mKIK1naHwZn2v1HGSCCCT0+QuzNOks4FEi Az+GqNWR3ICss7z59I+4Llq4iLpZx+Zpwe0RtRb9wHoml+RmIN15fh4LzyHlL/+N go55fQ7wgTcd2V8q0yeleOa6GGpJSr4wAX3GfS7CKHMRunT7TSBrlJnI8Qqt3G9i +92GpoPbpHBDszeLbTNllCBrx5XsJjdBC5CxTuin4MS1LFZpgEHJpKKePyF5mPge XlzvbPQlqh6CXNfsGx1c89CEkITvPkmd9ROdSliFE2Gmu8kDN9lWhf3Vhu9GCAzH 7qaJPzK5zYOmQXxRmyaqZ2fqMckWnJhm14toMtb8bIHapwCVXBGfpsBrk6hsXlwB Ur8nCiDZJAhnrwfPp0VmGpi917vSOF0sp+t9MkdSoj40b58hhwoyyH9rnrtmpEAH 9GE9Cg7iad5fs4+JEyOIXu3HIyoRpCMIAAvvohJltXSSkrN/ww0qr5WOef9amVKs q/lhcKixRahAn3kfuLd8ecAaPOVlhx/CqB0X/D5xTS+1KFVOdnE2FDbsGKpXRVwA VSq68JP+twI1qoGxaC+wuH3iPFHAVXgRsRDzMQ0kjEfzS1gN7D4= =XHKy -----END PGP SIGNATURE----- --=-yBq2dcpBngBNf7Rpu8FT--