engines/splice: remove buggy ->mem_align set
authorJens Axboe <axboe@kernel.dk>
Sat, 3 Aug 2019 14:33:24 +0000 (08:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 3 Aug 2019 14:33:24 +0000 (08:33 -0600)
Two things wrong here:

1) We align buffers by default, so no need for splice to do anything
   extra.
2) ->mem_align is not a true/false setting, it's the alignment itself.
   Hence the current setting to 1 is just buggy.

Fixes: https://github.com/axboe/fio/issues/810
Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/splice.c

index feb764f..6fc36bb 100644 (file)
@@ -278,13 +278,6 @@ static int fio_spliceio_init(struct thread_data *td)
         */
        sd->vmsplice_to_user_map = 1;
 
-       /*
-        * And if vmsplice_to_user works, we definitely need aligned
-        * buffers. Just set ->odirect to force that.
-        */
-       if (td_read(td))
-               td->o.mem_align = 1;
-
        td->io_ops_data = sd;
        return 0;
 }