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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: FUJITA Tomonori
Date: Wednesday, June 30, 2010 - 4:55 am

On Mon, 28 Jun 2010 17:25:36 +0200
Christoph Hellwig <hch@lst.de> wrote:


Ok, I figured out what's wrong.

As I suspected, it's due to the partial completion.

qemu scsi driver tells that the WRITE_SAME command was successful but
somehow the command has resid. So we retry it again and again (and
leak some memory).

I don't know yet why qemu scsi driver is broken. Maybe there is a bug
in it or converting discard to FS sends broken commands to the driver.

I'll try to figure out it tomorrow.

I've put a patch to complete discard command in the all-or-nothing
manner:

git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git discard


At least, the guest kernel doesn't hang for me.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH, RFC] block: don't allocate a payload for discard r ..., Christoph Hellwig, (Fri Jun 18, 7:59 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Sun Jun 27, 2:26 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Sun Jun 27, 2:38 am)
Re: [PATCH 2/2] block: defer the use of inline biovecs for ..., Christoph Hellwig, (Sun Jun 27, 2:39 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Sun Jun 27, 4:07 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Sun Jun 27, 8:33 am)
Re: [PATCH 2/2 v2] block: defer the use of inline biovecs ..., Christoph Hellwig, (Sun Jun 27, 8:33 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Sun Jun 27, 8:35 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Mon Jun 28, 12:57 am)
Re: [PATCH 2/2] block: defer the use of inline biovecs for ..., Christoph Hellwig, (Mon Jun 28, 5:44 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Mon Jun 28, 8:25 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Martin K. Petersen, (Mon Jun 28, 10:16 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Wed Jun 30, 1:42 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., Christoph Hellwig, (Wed Jun 30, 3:41 am)
Re: [PATCH 1/2] block: fix leaks associated with discard r ..., FUJITA Tomonori, (Wed Jun 30, 4:55 am)