# Re: \[dm-devel\] \[PATCH 02/13\] dm: kill dm\_rq\_bio\_destructor

- From: Kent Overstreet \<hidden\>
- Date: 2012-05-18 18:50:27 
- List: linux-bcache
- Page: https://ratatoskr.run/linux-bcache/2012/05/64301
- Thread: https://ratatoskr.run/dm-devel/2012/05/64301/t.md

```text
On Fri, May 18, 2012 at 05:43:19PM +0100, Alasdair G Kergon wrote:
> On Fri, May 18, 2012 at 08:57:29AM -0700, Tejun Heo wrote:
> > Please explain why this is done and how it's safe.  Alasdair / dm
> > folks, can you please ack this?
>  
> I think it's relying on there being never more than one reference on those 
> bios so that that endio fn, called exactly once, always frees it and there
> are no dm_puts elsewhere.

Is that a safe assumption? From my perusal of the code it certainly
looks like it should be, but I don't know dm all that well.

Seems like it might be better to use bio set's front_pad to put it in
the same allocation as the bio, but I don't really want to get into that
myself.
```
