iov_iter: use bvec iterator to implement iterate_bvec()
authorMing Lei <ming.lei@canonical.com>
Mon, 30 May 2016 13:34:32 +0000 (21:34 +0800)
committerJens Axboe <axboe@fb.com>
Thu, 9 Jun 2016 16:02:47 +0000 (10:02 -0600)
commit1bdc76aea1159a750846c2fc98e404403eb7d51c
treeeb61e4844ee2862fc43d396645224da2fa6fd177
parent80f162ff061c9e280589bb1a1890c7fc21c932cd
iov_iter: use bvec iterator to implement iterate_bvec()

bvec has one native/mature iterator for long time, so not
necessary to use the reinvented wheel for iterating bvecs
in lib/iov_iter.c.

Two ITER_BVEC test cases are run:
- xfstest(-g auto) on loop dio/aio, no regression found
- swap file works well under extreme stress(stress-ng --all 64 -t
  800 -v), and lots of OOMs are triggerd, and the whole
system still survives

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Tested-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
lib/iov_iter.c