Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5456158pxu; Thu, 22 Oct 2020 02:50:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ4iI44yptQk3dknkhv4lYyURjtH+Y+B7XUXdaovuJAsCZxj6ppdFFP6U7/0W26cKE8aqV X-Received: by 2002:a17:906:364d:: with SMTP id r13mr1337080ejb.521.1603360229932; Thu, 22 Oct 2020 02:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603360229; cv=none; d=google.com; s=arc-20160816; b=I+CZTtyTmGvbVKEJNoQxNZhyraDziukxcqT3c4XI9qz1NEtpHhEHF+/BF2EloN9+sY pCmnqeIgu0iFa8Bz925Qg5v9ENDj/b1/4bHd4Q1kdyM+IeiiSd/AKKL9TAuKq9sE40nf E5ypmMerxywK/Vi20oNb1ylFd13x1UYaCGWD4Db3f7U93NH3Rm/N6U7T6FQX2c630NpN yTjIThYbT4FpWgBR+ybicd3RmVMxqFHRWJEf261g0KqgSBx6kSZvaRIvNNcHLxejCoqB B3GIuV5+bv29/WiibmSS5ESbsvkhUcb/1x/uguNN+M+DaSvPX0vpG/MYJ5fv5HlyUfDP 4MxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=URjUPvv4BF0KAk65rVnV3rB7ijtCMnz1I7O/6wLzuXQ=; b=Tk18/u1ZFOYpH2BAuouucspcOjGK+3NLol9ny8Kni0QxBvUy+ecfqTYgoywan1beYl Z5Z446njw+yHBCLpCaygggEI7aNiwYfNYwKAn1DS5myNKzpwCL+srIVBXtXDYoPxbpjS 9vXaXw7FOelJEFBIPX0BW3rksyEV54k5IphlpZuzkrbX2t50CxaRlUdY+tDiOyN+4kEd 4kdzl1x2e37+iGzI9S/WVWBMFtY0isHtvM+hlI1UynaoUz/aZ10qM740yPmLme0ksc3c VO4ymXJOxhyUWZxmr4pUS20ln/S5kd18+6O9fOZBm3xDaPWXIvZj3xKB80Erb0PMnCPB ZIGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@veeam.com header.s=mx2 header.b=oQQKDYEm; 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=REJECT sp=REJECT dis=NONE) header.from=veeam.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si610741edt.484.2020.10.22.02.50.08; Thu, 22 Oct 2020 02:50:29 -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=@veeam.com header.s=mx2 header.b=oQQKDYEm; 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=REJECT sp=REJECT dis=NONE) header.from=veeam.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2896063AbgJVJn0 (ORCPT + 99 others); Thu, 22 Oct 2020 05:43:26 -0400 Received: from mx2.veeam.com ([64.129.123.6]:60718 "EHLO mx2.veeam.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2895914AbgJVJn0 (ORCPT ); Thu, 22 Oct 2020 05:43:26 -0400 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 Content-Transfer-Encoding: 8bit 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). > > > > Yes, reconfiguring the storage stack on a machine is almost impossible. > > > >> > >> What I _could_ imagine would be a 'dm-intercept' thingie, which > >> redirects the current submit_bio() function for any block device, and > >> 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_ can > >> 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 move > >> the whole setup to device-mapper first. > > > > Hm... > > Did I understand correctly that the filter itself can be left approximately > > 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 more > > detail. > > > > > Actually, once we have an dm-intercept, why do you need the block-layer > filter at all? > From you initial description the block-layer filter was implemented > such that blk-snap could work; but if we have dm-intercept (and with it > the ability to use device-mapper functionality even for normal block > 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. 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? > > Cheers, > > Hannes > -- > Dr. Hannes Reinecke Kernel Storage Architect > hare@suse.de +49 911 74053 688 > SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg > HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer -- Sergei Shtepa Veeam Software developer.