Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755694Ab0GAM3v (ORCPT ); Thu, 1 Jul 2010 08:29:51 -0400 Received: from 0122700014.0.fullrate.dk ([95.166.99.235]:40351 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755280Ab0GAM3u (ORCPT ); Thu, 1 Jul 2010 08:29:50 -0400 Message-ID: <4C2C8A3C.8000803@kernel.dk> Date: Thu, 01 Jul 2010 14:29:48 +0200 From: Jens Axboe MIME-Version: 1.0 To: FUJITA Tomonori CC: snitzer@redhat.com, hch@lst.de, James.Bottomley@suse.de, linux-scsi@vger.kernel.org, dm-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: References: <1277981359-10717-1-git-send-email-fujita.tomonori@lab.ntt.co.jp> In-Reply-To: <1277981359-10717-1-git-send-email-fujita.tomonori@lab.ntt.co.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 32 On 2010-07-01 12:49, FUJITA Tomonori wrote: > This patchset fixes page leak issue in discard commands with unprep > facility that James posted: > > http://marc.info/?l=linux-scsi&m=127791727508214&w=2 > > The 1/3 patch adds unprep facility to the block layer (identical to > what James posted). > > The 2/3 patch frees a page for discard commands by using the unprep > facility. James' original patch doesn't work since it accesses to > rq->bio in q->unprep_rq_fn. We hit oops since q->unprep_rq_fn is > called when all the data buffer (req->bio and scsi_data_buffer) in the > request is freed. > > I use rq->buffer to keep track of an allocated page as the block layer > sets rq->buffer to the address of bio's page. scsi-ml (and llds) don't > use rq->buffer (rq->buffer is set to NULL). So I can't say that I like > it lots. Any other way to do that? > > The 3/3 path just removes the dead code. I've queued up these three for 2.6.36. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/