On Mon, Feb 01 2021 at 1:18pm -0500, Sergei Shtepa <sergei.shtepa@xxxxxxxxx> wrote: > The 02/01/2021 18:45, Bart Van Assche wrote: > > On 1/28/21 9:12 AM, Sergei Shtepa wrote: > > > I`m ready to suggest the blk_interposer again. > > > blk_interposer allows to intercept bio requests, remap bio to > > > another devices or add new bios. > > > > > > This version has support from device mapper. > > > > > > For the dm-linear device creation command, the `noexcl` parameter > > > has been added, which allows to open block devices without > > > FMODE_EXCL mode. It allows to create dm-linear device on a block > > > device with an already mounted file system. > > > The new ioctl DM_DEV_REMAP allows to enable and disable bio > > > interception. > > > > > > Thus, it is possible to add the dm-device to the block layer stack > > > without reconfiguring and rebooting. > > > > What functionality does this driver provide that is not yet available in > > a RAID level 1 (mirroring) driver + a custom dm driver? My understanding > > is that there are already two RAID level 1 drivers in the kernel tree > > and that both driver support sending bio's to two different block devices. > > > > Thanks, > > > > Bart. > > Hi Bart. > > The proposed patch is not realy aimed at RAID1. > > Creating a new dm device in the non-FMODE_EXCL mode and then remaping bio > requests from the regular block device to the new DM device using > the blk_interposer will allow to use device mapper for regular devices. > For dm-linear, there is not much benefit from using blk_interposer. > This is a good and illustrative example. Later, using blk-interposer, > it will be possible to connect the dm-cache "on the fly" without having > to reboot and/or reconfigure. > My intention is to let users use dm-snap to create snapshots of any device. > blk-interposer will allow to add new features to Device Mapper. > > As per Daniel's advice I want to add a documentation, I'm working on it now. > The documentation will also contain a description of new features that > blk_interposer will add to Device Mapper More Documentation is fine, but the code needs to be improved and fully formed before you start trying to polish with Documentation -- definitely don't put time to Documentation that is speculative! You'd do well to focus on an implementation that doesn't require an extra clone if interposed device will use DM (DM core already handles cloning all incoming bios). Mike