Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-18 Thread Richard Weinberger
Am Mittwoch, 17. Oktober 2018, 08:21:51 CEST schrieb Christoph Hellwig: > On Tue, Oct 16, 2018 at 08:26:31AM -0600, Jens Axboe wrote: > > > Yes. Shall I send a patch with your suggestion or will you? > > > > Christoph should just fold it in, the bug only exists after his > > change to it. > >

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-17 Thread Christoph Hellwig
On Tue, Oct 16, 2018 at 08:26:31AM -0600, Jens Axboe wrote: > > Yes. Shall I send a patch with your suggestion or will you? > > Christoph should just fold it in, the bug only exists after his > change to it. Sorry, I missed what suggestion we had. Is that the patch form Jens earlier? > > > I

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-17 Thread Christoph Hellwig
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

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-16 Thread Richard Weinberger
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

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-16 Thread Jens Axboe
On 10/16/18 2:38 AM, Richard Weinberger wrote: > Am Dienstag, 16. Oktober 2018, 04:19:51 CEST schrieb Jens Axboe: >> On 10/15/18 4:44 PM, Richard Weinberger wrote: >>> Am Dienstag, 16. Oktober 2018, 00:04:20 CEST schrieb Jens Axboe: On 10/15/18 3:46 PM, Richard Weinberger wrote: > Am

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-16 Thread Richard Weinberger
Am Dienstag, 16. Oktober 2018, 04:19:51 CEST schrieb Jens Axboe: > On 10/15/18 4:44 PM, Richard Weinberger wrote: > > Am Dienstag, 16. Oktober 2018, 00:04:20 CEST schrieb Jens Axboe: > >> On 10/15/18 3:46 PM, Richard Weinberger wrote: > >>> Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Jens Axboe
On 10/15/18 4:44 PM, Richard Weinberger wrote: > Am Dienstag, 16. Oktober 2018, 00:04:20 CEST schrieb Jens Axboe: >> On 10/15/18 3:46 PM, Richard Weinberger wrote: >>> Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Dienstag, 16. Oktober 2018, 00:04:20 CEST schrieb Jens Axboe: > On 10/15/18 3:46 PM, Richard Weinberger wrote: > > Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: > >> On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: > Sadly not. I'm checking now

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Jens Axboe
On 10/15/18 3:46 PM, Richard Weinberger wrote: > Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: >> On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: Sadly not. I'm checking now what exactly is broken. >>> >>> I take this back. Christoph's fixup makes

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: > On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: > > > Sadly not. I'm checking now what exactly is broken. > > > > I take this back. Christoph's fixup makes reading work. > > The previous version corrupted

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: > > Sadly not. I'm checking now what exactly is broken. > > I take this back. Christoph's fixup makes reading work. > The previous version corrupted my test block device in interesting ways > and confused all tests. > But the

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Montag, 15. Oktober 2018, 21:17:46 CEST schrieb Richard Weinberger: > Am Montag, 15. Oktober 2018, 10:45:41 CEST schrieb Christoph Hellwig: > > On Mon, Oct 15, 2018 at 10:40:06AM +0200, Richard Weinberger wrote: > > > hm, this breaks UML. > > > Every filesystem fails to mount. > > > > > > I

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Montag, 15. Oktober 2018, 10:45:41 CEST schrieb Christoph Hellwig: > On Mon, Oct 15, 2018 at 10:40:06AM +0200, Richard Weinberger wrote: > > hm, this breaks UML. > > Every filesystem fails to mount. > > > > I did some very rough tests, it seems that the driver fails to read > > data correctly

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Anton Ivanov
On 10/15/18 9:40 AM, Richard Weinberger wrote: Christoph, [CC'ing also Anton, he improved the old driver a lot.] I was just about to start testing it :) Anton, this patch is based on: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/?h=mq-conversions Thanks. I remember

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
On Mon, Oct 15, 2018 at 10:40:06AM +0200, Richard Weinberger wrote: > hm, this breaks UML. > Every filesystem fails to mount. > > I did some very rough tests, it seems that the driver fails to read > data correctly as soon the upper layer tries to get more than 4096 bytes > at once out of the

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Christoph, [CC'ing also Anton, he improved the old driver a lot.] Anton, this patch is based on: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/?h=mq-conversions Am Montag, 15. Oktober 2018, 08:56:37 CEST schrieb Christoph Hellwig: > There is no good reason to create a

[PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
There is no good reason to create a scatterlist in the ubd driver, it can just iterate the request directly. Signed-off-by: Christoph Hellwig --- Now that we have the blk-mq conversion something like the patch below should help to simplify the driver even further. arch/um/drivers/ubd_kern.c |