# Re: \[PATCH v7 3/3\] dm: add DM\_INTERPOSED\_FLAG

- From: Sergei Shtepa \<hidden\>
- Date: 2021-03-15 13:26:15 
- List: linux-block
- Page: https://ratatoskr.run/linux-block/2021/03/6300598
- Thread: https://ratatoskr.run/linux-block/2021/03/6298513/t.md

```text
The 03/14/2021 12:30, Christoph Hellwig wrote:
> On Fri, Mar 12, 2021 at 06:44:55PM +0300, Sergei Shtepa wrote:
> > DM_INTERPOSED_FLAG allow to create DM targets on "the fly".
> > Underlying block device opens without a flag FMODE_EXCL.
> > DM target receives bio from the original device via
> > bdev_interposer.
> 
> This is more of a philopical comment, but the idea of just letting the
> interposed reopen the device by itself seems like a bad idea.  I think
> that is probably better hidden in the block layer interposer attachment
> function, which could do the extra blkdev_get_by_dev for the caller.

I suppose this cannot be implemented, since we need to change the behavior
for block devices that already have been opened.

-- 
Sergei Shtepa
Veeam Software developer.
```
