[dm-devel] [PATCH 1/2] block: fix leaks associated with discard request payload

Christoph Hellwig hch at lst.de
Wed Jun 30 08:42:04 UTC 2010


On Wed, Jun 30, 2010 at 11:32:43AM +0300, Boaz Harrosh wrote:
> May I ask a silly question? Why the dynamic allocation?
> 
> Why not have a const-static single global page at the block-layer somewhere
> that will be used for all discard-type operations and be done with it once and
> for all. A single page can be used for any size bio , any number of concurrent
> discards, any ZERO needed operation. It can also be used by other operations
> like padding and others. In fact isn't there one for the libsata padding?

for UNMAP we need to write into the payload.  And for ATA TRIM we need
to write into the WRITE SAME payload.  That's another layering violation
for those looking for them, btw..




More information about the dm-devel mailing list