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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6161CC5DF9D for ; Wed, 21 Oct 2020 14:10:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE51F22249 for ; Wed, 21 Oct 2020 14:10:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=veeam.com header.i=@veeam.com header.b="VeV/DnbL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE51F22249 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 C1CCA6B005C; Wed, 21 Oct 2020 10:09:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD0FC6B005D; Wed, 21 Oct 2020 10:09:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ABDF56B0068; Wed, 21 Oct 2020 10:09:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id 7E3476B005C for ; Wed, 21 Oct 2020 10:09:59 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D0446362D for ; Wed, 21 Oct 2020 14:09:58 +0000 (UTC) X-FDA: 77396116476.06.sock97_2f14f9927248 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id A2C731008191E for ; Wed, 21 Oct 2020 14:09:58 +0000 (UTC) X-HE-Tag: sock97_2f14f9927248 X-Filterd-Recvd-Size: 4311 Received: from mx4.veeam.com (mx4.veeam.com [104.41.138.86]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Wed, 21 Oct 2020 14:09:58 +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 mx4.veeam.com (Postfix) with ESMTPS id 255F68B1B6; Wed, 21 Oct 2020 17:09:55 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veeam.com; s=mx4; t=1603289395; bh=S6/ARzVD8H7/67HYgZs8YGKPZVCfzESpZ3pgvBKiAGg=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=VeV/DnbLBfCV6NCAbN2AZTuCJpbMCyv+ggraoRGqdsZhB0jEcmcbc8m1qVhHsuD2X k314WdS65AVHt3oiOE0eEeoP9ctoZ6/gfDgwwokbcRqQkjfKkJvdZUXGt36y3XYVYz bSP8IrlYgxS0pjvb9WPL4EZbNOIn04eC8KV9r/b4= 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; Wed, 21 Oct 2020 16:09:53 +0200 Date: Wed, 21 Oct 2020 17:10:44 +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: <20201021141044.GF20749@veeam.com> References: <1603271049-20681-1-git-send-email-sergei.shtepa@veeam.com> <71926887-5707-04a5-78a2-ffa2ee32bd68@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <71926887-5707-04a5-78a2-ffa2ee32bd68@suse.de> 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: 37303A29C604D26A677566 X-Veeam-MMEX: True 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/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. -- Sergei Shtepa Veeam Software developer.