Re: [PATCH 1/2] block: fix leaks associated with discard request payload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 26, 2010 at 03:56:50PM -0400, Mike Snitzer wrote:
> Fix leaks introduced via "block: don't allocate a payload for discard
> request" commit a1d949f5f44.
> 
> sd_done() is not called for REQ_TYPE_BLOCK_PC commands so cleanup
> discard request's payload directly in scsi_finish_command().
> 
> Also cleanup page allocated for discard payload in
> scsi_setup_discard_cmnd's scsi_setup_blk_pc_cmnd error path.

This looks good - I've tested an equivalent patch doing xfstests runs
for more than 24hours now without seeing leaks.

On the long run I'd prefer not having the knowledge of the payload
freeing inside the core scsi code, but that requires either calling
->done for block pc requests, or treating discards as fs requests all
the way, which will require much larger changes.

So for now:


Reviewed-by: Christoph Hellwig <hch@xxxxxx>

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux