Ilya Dryomov fc218544fb ceph: fix iov_iter issues in ceph_direct_read_write()
dio_get_pagev_size() and dio_get_pages_alloc() introduced in commit
b5b98989dc7e ("ceph: combine as many iovec as possile into one OSD
request") assume that the passed iov_iter is ITER_IOVEC.  This isn't
the case with splice where it ends up poking into the guts of ITER_BVEC
or ITER_PIPE iterators, causing lockups and crashes easily reproduced
with generic/095.

Rather than trying to figure out gap alignment and stuff pages into
a page vector, add a helper for going from iov_iter to a bio_vec array
and make use of the new CEPH_OSD_DATA_TYPE_BVECS code.

Fixes: b5b98989dc7e ("ceph: combine as many iovec as possile into one OSD request")
Link: http://tracker.ceph.com/issues/18130
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Tested-by: Luis Henriques <lhenriques@suse.com>
2018-05-10 10:15:12 +02:00
..
2018-04-07 09:08:24 -07:00
2018-04-20 09:59:33 -07:00
2018-05-04 20:32:18 -10:00
2018-05-04 20:51:10 -10:00
2018-03-14 13:31:23 +01:00
\n
2018-04-20 09:01:26 -07:00
2018-04-11 10:28:39 -07:00
2018-03-27 13:18:09 -04:00
2018-04-12 12:55:50 -07:00
2018-04-03 16:27:08 -04:00
2018-04-11 10:28:39 -07:00
2018-04-20 17:18:36 -07:00
2018-02-07 14:25:22 -08:00
2018-04-10 10:25:57 -07:00
2018-04-11 10:28:39 -07:00
2018-04-11 10:28:37 -07:00
2017-12-07 14:23:30 -05:00
2018-05-03 16:11:37 -06:00
2018-04-11 10:28:39 -07:00
2018-01-29 07:27:24 -08:00
2018-02-06 10:41:33 -08:00
2018-02-15 15:34:42 -05:00
2018-04-04 12:44:02 -07:00