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=-5.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 2488CC5517A for ; Thu, 22 Oct 2020 05:58:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C918E2415A for ; Thu, 22 Oct 2020 05:58:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2508097AbgJVF61 (ORCPT ); Thu, 22 Oct 2020 01:58:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:59080 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409361AbgJVF61 (ORCPT ); Thu, 22 Oct 2020 01:58:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 15CBCAC55; Thu, 22 Oct 2020 05:58:25 +0000 (UTC) Subject: Re: [PATCH 0/2] block layer filter and block device snapshot module To: Sergei Shtepa 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" References: <1603271049-20681-1-git-send-email-sergei.shtepa@veeam.com> <71926887-5707-04a5-78a2-ffa2ee32bd68@suse.de> <20201021141044.GF20749@veeam.com> From: Hannes Reinecke Message-ID: Date: Thu, 22 Oct 2020 07:58:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201021141044.GF20749@veeam.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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? 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