Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5275644pxu; Wed, 21 Oct 2020 19:47:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIDnPbKyO7YJ/Kna+69QqPkKEQjhfCpPU/HWcflkvSUEdcF4UzsZwXj0if2ZrPsPBYE95G X-Received: by 2002:a17:906:1446:: with SMTP id q6mr309019ejc.549.1603334854125; Wed, 21 Oct 2020 19:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603334854; cv=none; d=google.com; s=arc-20160816; b=JVOBXJeQ6b+s/GIdGI/SlQOiQqCGKPjyxRX9kr6klnrHs+VPRFjkGW/EOcClWUqbWb EQaIqpmDTVezqyfIn+zmTuOMpLmZxkYMhLDqa6ePLRoFvKiOzIt7iG5nC++2A+EZWN7E fgtcbdPw5piEgNAENzh0xbKkJ1JPM3jEsF+AnV3LB9q3gqDz9ilRqpSN6Pn5eyIXHpr2 QptbagzzoscSKARJgFEQr38BuQgbBTkdwrsX+UIgZ3I25jWuOkvsVPEKoCY1xgArRMvz pfXBjrXBhLyesnI+ELLlVT5rw5wfqyJB6UHMcIekGPAQmhULbhcFl1st/H5Fm9Ux47GZ IGnw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S6/ARzVD8H7/67HYgZs8YGKPZVCfzESpZ3pgvBKiAGg=; b=reGoAd1Ql6u/ZykljisdrSdIysuecmMCHSpJFluo41or+SFTrG9KqOLh8y5LYjLBII N1fBOtIFS97/fhZRZGrIEaKPj9DtZ/EjeDNrftWtNx3u0Q6N36EwfyGg6ylZaSM+7lKd VBxFL8O50t9KPJi7xqmpRINmm5l0PQnoecLmHTA7+N4IaqPO5xMB5hzWA9Wah+Y0a4C5 ZZajBzsr5YCHAVYdDFP+HwiGAFCbIc40aWxRkiY25oyHlbpw8qBauhDrEMcJl9zBBaid +8OXRvVUikqHum/xasyWQTYke1yw7Kf+ZjV4WsxfvZclLCd8JcUNze5De9ja5zYnwnoK 7/Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@veeam.com header.s=mx4 header.b="VeV/DnbL"; 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 m16si158868eds.221.2020.10.21.19.46.58; Wed, 21 Oct 2020 19:47: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; dkim=pass header.i=@veeam.com header.s=mx4 header.b="VeV/DnbL"; 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 S2443286AbgJUOJ6 (ORCPT + 99 others); Wed, 21 Oct 2020 10:09:58 -0400 Received: from mx4.veeam.com ([104.41.138.86]:45980 "EHLO mx4.veeam.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440751AbgJUOJ6 (ORCPT ); Wed, 21 Oct 2020 10:09:58 -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 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.