Re: [RFC][PATCH 1/2] reduce the amount of boilerplate in iov_iter.c

2014-11-23 Thread Al Viro
On Mon, Nov 24, 2014 at 01:09:54AM +, Al Viro wrote: > Specifically, it allows to add a new kind of iovecs (ITER_KVEC using > straight memcpy instead of going through copy_..._user) at the cost of > mere 74 extra lines (see the next patch) and allows to add the things > like csum_and_copy_{from

[RFC][PATCH 1/2] reduce the amount of boilerplate in iov_iter.c

2014-11-23 Thread Al Viro
iov_iter.c has already grown pretty large, and there is a couple of pending changes to it that promise to make it even bigger. On the other hand, there's a lot of duplicated logics in there. Generally, we'd want something like iterate(iter, size, f_iovec, f_bvec, data, move) that would apply the