[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: FUJITA Tomonori <fujita tomonori lab ntt co jp>
- To: axboe kernel dk
- Cc: martin petersen oracle com, snitzer redhat com, linux-kernel vger kernel org, dm-devel redhat com, James Bottomley suse de, linux-scsi vger kernel org, akpm linux-foundation org, hch lst de
- Subject: Re: [dm-devel] [PATCH 1/2] block: fix leaks associated with discard request payload
- Date: Mon, 28 Jun 2010 17:45:21 +0900
On Mon, 28 Jun 2010 10:18:48 +0200
Jens Axboe <axboe kernel dk> wrote:
> On 2010-06-28 10:14, FUJITA Tomonori wrote:
> > On Mon, 28 Jun 2010 09:57:38 +0200
> > Christoph Hellwig <hch lst de> wrote:
> >
> >> On Sun, Jun 27, 2010 at 09:32:07PM +0900, FUJITA Tomonori wrote:
> >>> On Sun, 27 Jun 2010 13:07:12 +0200
> >>> Christoph Hellwig <hch lst de> wrote:
> >>>
> >>>>> How about this?
> >>>>
> >>>> As I tried to explain before this utterly confuses the I/O completion
> >>>> path. With the patch applied even a simple mkfs.xfs that issues discard
> >>>> just hangs.
> >>>
> >>> Wired. I just tried mkfs.xfs against scsi_debug with my block patches
> >>> (I saw one discard command). Seemed that it worked fine.
> >>
> >> I've tracked it down to the call to scsi_requeue_command in scsi_end_request.
> >> When the command is marked BLOCK_PC we'll just get it back as such in
> >> ->prep_fn next time, but now it's reverting to the previous state.
> >
> > If scsi_end_request() calls scsi_requeue_command(), the command has a
> > left over (i.e. hasn't finished all the data), right? You hit such
> > condition with discard commands?
> >
> > BLOCK_PC requests don't hit this case since blk_end_request() always
> > return false for PC.
>
> You can get requeues on the ->queuecommand() path as well, for a
> variety of reasons, and that would be what Christoph is hitting.
Probably, that's would be fine (we need to fix memory leak in that
path). I guess that requeue with the partial completion commands might
cause problems.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]