From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-it1-x12d.google.com ([2607:f8b0:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAiPK-0002lX-3K for linux-mtd@lists.infradead.org; Thu, 11 Oct 2018 21:22:11 +0000 Received: by mail-it1-x12d.google.com with SMTP id l127-v6so19800514ith.1 for ; Thu, 11 Oct 2018 14:21:59 -0700 (PDT) Subject: Re: [PATCH 16/17] mtd_blkdevs: convert to blk-mq To: Richard Weinberger , linux-block@vger.kernel.org Cc: linux-mtd@lists.infradead.org, David Woodhouse References: <20181011165909.32615-1-axboe@kernel.dk> <263ca89f-94e4-1238-e396-8fb0a0111f97@kernel.dk> <19488748.6iqVKhkDGp@blindfold> From: Jens Axboe Message-ID: <6ac34916-e35d-d8d7-77d5-da83260714fc@kernel.dk> Date: Thu, 11 Oct 2018 15:21:56 -0600 MIME-Version: 1.0 In-Reply-To: <19488748.6iqVKhkDGp@blindfold> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 10/11/18 3:18 PM, Richard Weinberger wrote: > Jens, > > Am Donnerstag, 11. Oktober 2018, 23:14:07 CEST schrieb Jens Axboe: >> On 10/11/18 3:03 PM, Richard Weinberger wrote: >>> Jens, >>> >>> On Thu, Oct 11, 2018 at 7:00 PM Jens Axboe wrote: >>>> >>>> Straight forward conversion, using an internal list to enable the >>>> driver to pull requests at will. >>>> >>>> Dynamically allocate the tag set to avoid having to pull in the >>>> block headers for blktrans.h, since various mtd drivers use >>>> block conflicting names for defines and functions. >>> >>> This explodes on my test system. :-/ >> >> I think I see it, that was pretty stupid... Can you try with this one >> on top as well? >> >> diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c >> index c26d692781af..e8f8fddce063 100644 >> --- a/drivers/mtd/mtd_blkdevs.c >> +++ b/drivers/mtd/mtd_blkdevs.c >> @@ -187,8 +187,8 @@ static void mtd_blktrans_work(struct mtd_blktrans_dev *dev) >> mutex_unlock(&dev->lock); >> >> if (!blk_update_request(req, res, blk_rq_cur_bytes(req))) { >> - req = NULL; >> __blk_mq_end_request(req, res); >> + req = NULL; > > Hehe. :-) > With this fix applied it works and passes my trivial test. Great, thanks for testing! Can I add your tested-by to it? -- Jens Axboe