[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] [PATCH 1/2] block: fix leaks associated with discard request payload
- From: Christoph Hellwig <hch lst de>
- To: Mike Snitzer <snitzer redhat com>
- Cc: axboe kernel dk, martin petersen oracle com, linux-kernel vger kernel org, dm-devel redhat com, James Bottomley suse de, akpm linux-foundation org, Christoph Hellwig <hch lst de>
- Subject: Re: [dm-devel] [PATCH 1/2] block: fix leaks associated with discard request payload
- Date: Sun, 27 Jun 2010 11:38:23 +0200
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 lst de>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]