From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 17 Oct 2018 08:14:18 +0200 From: Christoph Hellwig Subject: Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg Message-ID: <20181017061418.GA21790@lst.de> References: <20181015065637.1860-1-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+geert=linux-m68k.org@lists.infradead.org To: Richard Weinberger Cc: Jens Axboe , Richard Weinberger , linux-um@lists.infradead.org, linux-block@vger.kernel.org, "linux-mtd @ lists . infradead . org" , Christoph Hellwig List-ID: On Wed, Oct 17, 2018 at 12:43:14AM +0200, Richard Weinberger wrote: > On Mon, Oct 15, 2018 at 8:56 AM Christoph Hellwig wrote: > > > > There is no good reason to create a scatterlist in the ubd driver, > > it can just iterate the request directly. > > BTW: Does it make sense to drop blk_rq_map_sq from() > drivers/mtd/ubi/block.c too? > If so we have to allocate a temporary structure for the worker thread > for each segment, just like > UBD does already. I'm not sure if that is cheaper than blk_rq_map_sq(). UBI should not need a new per-thread structure, mostly because there are no threads involved. The scatterlist support in UBI only seems to exists for ubiblock, but it goes down a few layers. In the end all that could switch to a iov_iter-like setup and clean things up a lot, but it would be a fair amount of work. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/