Re: [PATCH 01/32] iov_iter: Add ITER_MAPPING

2020-07-19 Thread David Howells
Al Viro wrote: > My main problem here is that your iterate_mapping() assumes that STEP is > safe under rcu_read_lock(), with no visible mentioning of that fact. Yeah, that's probably the biggest objection to this. > Note, BTW, that iov_iter_for_each_range() quietly calls user-supplied > callbac

Re: [PATCH 01/32] iov_iter: Add ITER_MAPPING

2020-07-18 Thread Al Viro
On Mon, Jul 13, 2020 at 05:30:52PM +0100, David Howells wrote: > Add an iterator, ITER_MAPPING, that walks through a set of pages attached > to an address_space, starting at a given page and offset and walking for > the specified amount of bytes. > > The caller must guarantee that the pages are al

[PATCH 01/32] iov_iter: Add ITER_MAPPING

2020-07-13 Thread David Howells
Add an iterator, ITER_MAPPING, that walks through a set of pages attached to an address_space, starting at a given page and offset and walking for the specified amount of bytes. The caller must guarantee that the pages are all present and they must be locked using PG_locked, PG_writeback or PG_fsc