From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9393AC56201 for ; Thu, 22 Oct 2020 09:43:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D64F2245F for ; Thu, 22 Oct 2020 09:43:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=veeam.com header.i=@veeam.com header.b="oQQKDYEm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D64F2245F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=veeam.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3BD206B005D; Thu, 22 Oct 2020 05:43:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36DA66B0062; Thu, 22 Oct 2020 05:43:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 238756B0068; Thu, 22 Oct 2020 05:43:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id E90716B005D for ; Thu, 22 Oct 2020 05:43:25 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6EB83180AD806 for ; Thu, 22 Oct 2020 09:43:25 +0000 (UTC) X-FDA: 77399073570.19.drug00_4e0b4fe2724f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 512EE1AD1B3 for ; Thu, 22 Oct 2020 09:43:25 +0000 (UTC) X-HE-Tag: drug00_4e0b4fe2724f X-Filterd-Recvd-Size: 5515 Received: from mx2.veeam.com (mx2.veeam.com [64.129.123.6]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Thu, 22 Oct 2020 09:43:24 +0000 (UTC) Received: from mail.veeam.com (prgmbx01.amust.local [172.24.0.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.veeam.com (Postfix) with ESMTPS id 2AB83413F2; Thu, 22 Oct 2020 05:43:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veeam.com; s=mx2; t=1603359801; bh=URjUPvv4BF0KAk65rVnV3rB7ijtCMnz1I7O/6wLzuXQ=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=oQQKDYEmamFH8Ys0kCLf7ywAyZM/wz8lHMKZxHCl8WudkvvaT2RFL89vccmfn1BCh BQIIafd7dyM1Xj67jFQVOk0/701HowZTS335k21tL80eefEELrNesD2rDmQIVVBM0H VNfsPHYwKyMOGvUNgJCnpwjvMSeRh8DnllIA7/To= Received: from veeam.com (172.24.14.5) by prgmbx01.amust.local (172.24.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.721.2; Thu, 22 Oct 2020 11:43:19 +0200 Date: Thu, 22 Oct 2020 12:44:02 +0300 From: Sergei Shtepa To: Hannes Reinecke CC: "axboe@kernel.dk" , "viro@zeniv.linux.org.uk" , "hch@infradead.org" , "darrick.wong@oracle.com" , "linux-xfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "rjw@rjwysocki.net" , "len.brown@intel.com" , "pavel@ucw.cz" , "akpm@linux-foundation.org" , "johannes.thumshirn@wdc.com" , "ming.lei@redhat.com" , "jack@suse.cz" , "tj@kernel.org" , "gustavo@embeddedor.com" , "bvanassche@acm.org" , "osandov@fb.com" , "koct9i@gmail.com" , "damien.lemoal@wdc.com" , "steve@sk2.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH 0/2] block layer filter and block device snapshot module Message-ID: <20201022094402.GA21466@veeam.com> References: <1603271049-20681-1-git-send-email-sergei.shtepa@veeam.com> <71926887-5707-04a5-78a2-ffa2ee32bd68@suse.de> <20201021141044.GF20749@veeam.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: X-Originating-IP: [172.24.14.5] X-ClientProxiedBy: prgmbx01.amust.local (172.24.0.171) To prgmbx01.amust.local (172.24.0.171) X-EsetResult: clean, is OK X-EsetId: 37303A29C604D26A677460 X-Veeam-MMEX: True Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The 10/22/2020 08:58, Hannes Reinecke wrote: > On 10/21/20 4:10 PM, Sergei Shtepa wrote: > > The 10/21/2020 16:31, Hannes Reinecke wrote: > >> I do understand where you are coming from, but then we already have = a > >> dm-snap which does exactly what you want to achieve. > >> Of course, that would require a reconfiguration of the storage stack= on > >> the machine, which is not always possible (or desired). > >=20 > > Yes, reconfiguring the storage stack on a machine is almost impossibl= e. > >=20 > >> > >> What I _could_ imagine would be a 'dm-intercept' thingie, which > >> redirects the current submit_bio() function for any block device, an= d > >> re-routes that to a linear device-mapper device pointing back to the > >> original block device. > >> > >> That way you could attach it to basically any block device, _and_ ca= n > >> use the existing device-mapper functionality to do fancy stuff once = the > >> submit_io() callback has been re-routed. > >> > >> And it also would help in other scenarios, too; with such a > >> functionality we could seamlessly clone devices without having to mo= ve > >> the whole setup to device-mapper first. > >=20 > > Hm... > > Did I understand correctly that the filter itself can be left approxi= mately > > as it is, but the blk-snap module can be replaced with 'dm-intercept'= , > > which would use the re-route mechanism from the dm? > > I think I may be able to implement it, if you describe your idea in m= ore > > detail. > >=20 > >=20 > Actually, once we have an dm-intercept, why do you need the block-layer= =20 > filter at all? > From you initial description the block-layer filter was implemented=20 > such that blk-snap could work; but if we have dm-intercept (and with it= =20 > the ability to use device-mapper functionality even for normal block=20 > devices) there wouldn't be any need for the block-layer filter, no? Maybe, but the problem is that I can't imagine how to implement dm-intercept yet.=20 How to use dm to implement interception without changing the stack of block devices. We'll have to make a hook somewhere, isn`t it? >=20 > Cheers, >=20 > Hannes > --=20 > Dr. Hannes Reinecke Kernel Storage Architect > hare@suse.de +49 911 74053 688 > SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg > HRB 36809 (AG N=C3=BCrnberg), Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3= =B6rffer --=20 Sergei Shtepa Veeam Software developer.