Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3963393pxu; Wed, 9 Dec 2020 05:14:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJypCeZxO6K452WCNxu8vRR4PG1dZb2eSWcwCabe8JULlqzZMmGXjkS2PGzlqQ451SQfdWhi X-Received: by 2002:aa7:d915:: with SMTP id a21mr1906279edr.251.1607519678818; Wed, 09 Dec 2020 05:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607519678; cv=none; d=google.com; s=arc-20160816; b=0Yc16K+8WtPrqFpb5Jw31xzEliH91Yh3Hc3UiwYlbLokc1XdnXSWZiKBoHLwtswmWN EzkC/ndjolDq0/S6vuBbfXTI5aNktGx9lHnRhNJdxSXcVsg6i3wCjgTEfoJwUw1eBtE+ XYjHVW1da+TvmQGk8+d2LGA+f3sskjUcsNn8hg4iZjxyn/md3fyT100IYSz5wVE55AFX c/M6moMKUmPf03J8VZZvtgBFMXvmGvOsmya0FDaFm+Oud/KTXTDvz/x08ZQ/cgR3pOqc ixlUkY0gd5betmE8SqQsr22VdJ4l57gzaZcUp87yT7GMLlQ+BqF5Mq03Nfvsfe+JrUt3 4H/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=JTqT3LMXZw1By0AVPjPW5T3J6zJt6wgyTiqJzVkIVZA=; b=pP9LDqpi7oPjnB6UIJnsADhTIDzbfUttMP5TuItduv2oxE9QViGu29QFRUuKZ4RL9U HfmLE6DI/h33Y8fN6UKzzcSdpg/37n5TLumhl3U+7hn3COmmNcCO+pyIJougvfDntjpm 58Zl/B/oEWPIs6NuigSJiEvnw//c5hUNMT112vG6n2coYA/k55jDetTyP85JcgqMqCuK 2TXYDNWk8xKPrtyj+8BN+yJ74jYq9sfWCSWunsaex0YLbhxWZji6KnAzylNt45CGMTIH Y904fz7Ic3NnnmCv+ednIRfw2xVXYWIwR+iZtbB8JMW8kMcFBUaM39Dzf6FPf3MEd9dY Fazg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@veeam.com header.s=mx2 header.b=YeoxJmVy; 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 hp39si716034ejc.214.2020.12.09.05.14.13; Wed, 09 Dec 2020 05:14:38 -0800 (PST) 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=YeoxJmVy; 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 S1732178AbgLINKc (ORCPT + 99 others); Wed, 9 Dec 2020 08:10:32 -0500 Received: from mx2.veeam.com ([64.129.123.6]:49400 "EHLO mx2.veeam.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732106AbgLINKZ (ORCPT ); Wed, 9 Dec 2020 08:10:25 -0500 X-Greylist: delayed 476 seconds by postgrey-1.27 at vger.kernel.org; Wed, 09 Dec 2020 08:10:24 EST 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 0BAB94131D; Wed, 9 Dec 2020 08:01:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veeam.com; s=mx2; t=1607518906; bh=JTqT3LMXZw1By0AVPjPW5T3J6zJt6wgyTiqJzVkIVZA=; h=From:To:CC:Subject:Date:From; b=YeoxJmVyVrtCccC+JmCdywZguQTpBCdn+S7F5b05lxjxOUTwoPtxqKLnvsY33a/Nv 67kjEeju2u/Ctz0syDqKc7n9jvkxeGhU9/EbcdthBdfMdD9DVPJKZ1OVBAX/6f6teP hz6PCKbcNVvMFPdAj37X+g1ABT4GTz25G4dxI5es= Received: from prgdevlinuxpatch01.amust.local (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, 9 Dec 2020 14:01:43 +0100 From: Sergei Shtepa To: , , , , , , , , , CC: , Subject: [PATCH 0/3] block: blk_interposer - Block Layer Interposer Date: Wed, 9 Dec 2020 16:01:48 +0300 Message-ID: <1607518911-30692-1-git-send-email-sergei.shtepa@veeam.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.24.14.5] X-ClientProxiedBy: prgmbx02.amust.local (172.24.0.172) To prgmbx01.amust.local (172.24.0.171) X-EsetResult: clean, is OK X-EsetId: 37303A29C604D26A627160 X-Veeam-MMEX: True Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all. I try to suggest the Block Layer Interposer (blk_interposer) again. It`s allows to intercept bio requests, remap bio to another devices or add new bios. Initially, blk_interposer was designed to be compatible with device mapper. Our (my and Hannes) previous attempt to offer blk_interposer integrated with device mapper did not receive any comments from the dm-devel team, and without their help I will not be able to make a full implementation. I hope later they will have time to support blk_interposer in device mapper. And my blk-snap module requires an architecture change to support blk_interposer. This time I offer it along with a sample. Despite the fact that blk_interposer is quite simple, there are a few non-obvious points that I would like to clarify. However, I suggest the blk_interposer now so that people could discuss it and use it in their projects as soon as possible. Sergei Shtepa (3): block: blk_interposer - Block Layer Interposer block: blk_interposer - sample block: blk_interposer - sample config block/blk-core.c | 32 +++ include/linux/blk_types.h | 6 +- include/linux/genhd.h | 12 +- samples/Kconfig | 7 + samples/Makefile | 1 + samples/blk_interposer/Makefile | 2 + samples/blk_interposer/blk-interposer.c | 276 ++++++++++++++++++++++++ 7 files changed, 333 insertions(+), 3 deletions(-) create mode 100644 samples/blk_interposer/Makefile create mode 100644 samples/blk_interposer/blk-interposer.c -- 2.20.1