Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5418957pxu; Thu, 22 Oct 2020 01:33:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznQhcGht4pXAruzSOtWL7bru/cRql1w+auCfOUx+y8tLYXDr0P+H33brUZTvXEoB4YLH60 X-Received: by 2002:a17:906:3e17:: with SMTP id k23mr1268164eji.414.1603355614918; Thu, 22 Oct 2020 01:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603355614; cv=none; d=google.com; s=arc-20160816; b=HO6BAXH85MdMww0W6SJHdZz30U6tWSyJIrKsGXX7IeoOBxEfpLfj9nK3+XWBK9ge4T 4zq6pKhEffJ7GtiisrwrrZeLLc6sVlipciuGDmpVqVnP6LCHYYaZt8ZBREhVXfWpZ/PW 3LQTBUSxTpoZTD+HUjyl4BAo3hLa0l2HlUouBljA8Xd6uPTWRNXOqj3Y1nFcTueSLuGQ dCrpapGzXDlIaocz3POti1wBJZ1TC34S0vt4NUNzCmnObm8jwgdZOeKT600PVlrMrCqe t+ucsvzXXCHO16UMvShU1eECZIPotxcYcRz22HtsXJ/RvC67Ei9TJO1FR/SqiqYUJ59A lF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DJFeXJ4Phh+UDp2JSpLoukFj2w/srBpaEA4bj6Iiu88=; b=LP7wBGl9W4sloCL5GeHgN9Ni2GfzJYcS59f2eqUOqQa3vLHmOpz9j2nGybEs3ty74H CVgR4nXpX/A/kQk3gG7HMytbA9jHzKkJASk0FEQCVP+mSQyk3AGAla3RRhrOLLDPOYYI l5MeliOur9PLyElfEAz+7LS7cWLngNGvYJ2h8MDKCG304fJC8LTJ4kPpanzXAYLtrbA4 yCg76P9rEWHBQt9dU8ffDT4Oqw4F7rmB4Ek1+3mnhH5+k4uPD+KKrfZIo8G1f1IhpPR7 SVE6v2Jo97cPlbnyzP/iFjgHn02nL8yJHYLWPS9nN7hyAR3FBJ2Sasp1gQabrfbegSTF OIrg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rl16si428366ejb.407.2020.10.22.01.33.13; Thu, 22 Oct 2020 01:33:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2508120AbgJVF61 (ORCPT + 99 others); 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-kernel@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