summaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2014-05-07bio_vec-backed iov_iterAl Viro1-1/+1
New variant of iov_iter - ITER_BVEC in iter->type, backed with bio_vec array instead of iovec one. Primitives taught to deal with such beasts, __swap_write() switched to using that kind of iov_iter. Note that bio_vec is just a <page, offset, length> triple - there's nothing block-specific about it. I've left the definition where it was, but took it from under ifdef CONFIG_BLOCK. Next target: ->splice_write()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ceph: switch to ->write_iter()Al Viro1-31/+26
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ceph_sync_direct_write: stop poking into iov_iter gutsAl Viro1-26/+23
all needed primitives are there... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ceph_sync_read: stop poking into iov_iter gutsAl Viro1-28/+18
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07new helper: copy_page_from_iter()Al Viro1-110/+19
parallel to copy_page_to_iter(). pipe_write() switched to it (and became ->write_iter()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07fuse: switch to ->write_iter()Al Viro1-16/+11
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07btrfs: switch to ->write_iter()Al Viro1-14/+10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ocfs2: switch to ->write_iter()Al Viro1-18/+12
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07xfs: switch to ->write_iter()Al Viro1-20/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07afs: switch to ->write_iter()Al Viro3-10/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07gfs2: switch to ->write_iter()Al Viro1-10/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07nfs: switch to ->write_iter()Al Viro3-12/+10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ubifs: switch to ->write_iter()Al Viro1-12/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07cifs: switch to ->write_iter()Al Viro3-42/+35
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07udf: switch to ->write_iter()Al Viro1-6/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07convert ext4 to ->write_iter()Al Viro1-18/+11
unfortunately, Ted's changes to ext4_file_write() are *still* an incomplete fix - playing with rlimits can let you smuggle an unaligned request past the checks. So there almost certainly will be more merge PITA around that place... [fix from Peter Ujfalusi <peter.ujfalusi@ti.com> folded] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07Merge ext4 changes in ext4_file_write() into for-nextAl Viro8-245/+240
From ext4.git#dev, needed for switch of ext4 to ->write_iter() ;-/
2014-05-07blkdev_aio_write() - turn into blkdev_write_iter()Al Viro1-10/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07write_iter variants of {__,}generic_file_aio_write()Al Viro25-52/+52
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ceph: switch to ->read_iter()Al Viro1-11/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07nfs: switch to ->read_iter()Al Viro3-14/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07fs/block_dev.c: switch to ->read_iter()Al Viro1-10/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07pipe: switch to ->read_iter()Al Viro1-11/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07cifs: switch to ->read_iter()Al Viro3-32/+22
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07fuse_file_aio_read(): convert to ->read_iter()Al Viro1-6/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ocfs2: switch to ->read_iter()Al Viro1-11/+10
tracepoints are evil, exhibit #6969... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ecryptfs: switch to ->read_iter()Al Viro1-5/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07xfs: switch to ->read_iter()Al Viro1-12/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07switch simple generic_file_aio_read() users to ->read_iter()Al Viro34-73/+73
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07new methods: ->read_iter() and ->write_iter()Al Viro4-11/+105
Beginning to introduce those. Just the callers for now, and it's clumsier than it'll eventually become; once we finish converting aio_read and aio_write instances, the things will get nicer. For now, these guys are in parallel to ->aio_read() and ->aio_write(); they take iocb and iov_iter, with everything in iov_iter already validated. File offset is passed in iocb->ki_pos, iov/nr_segs - in iov_iter. Main concerns in that series are stack footprint and ability to split the damn thing cleanly. [fix from Peter Ujfalusi <peter.ujfalusi@ti.com> folded] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07replace checking for ->read/->aio_read presence with check in ->f_modeAl Viro3-7/+15
Since we are about to introduce new methods (read_iter/write_iter), the tests in a bunch of places would have to grow inconveniently. Check once (at open() time) and store results in ->f_mode as FMODE_CAN_READ and FMODE_CAN_WRITE resp. It might end up being a temporary measure - once everything switches from ->aio_{read,write} to ->{read,write}_iter it might make sense to return to open-coded checks. We'll see... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07xfs: trim the argument lists of xfs_file_{dio,buffered}_aio_write()Al Viro1-19/+14
pos is redundant (it's iocb->ki_pos), and iov/nr_segs/count are taken care of by lifting iov_iter into the caller. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07blkdev_aio_read(): switch to generic_file_read_iter(), get rid of iov_shorten()Al Viro1-3/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07iov_iter_truncate()Al Viro4-28/+26
Now It Can Be Done(tm) - we don't need to do iov_shorten() in generic_file_direct_write() anymore, now that all ->direct_IO() instances are converted to proper iov_iter methods and honour iter->count and iter->iov_offset properly. Get rid of count/ocount arguments of generic_file_direct_write(), while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07btrfs: switch check_direct_IO() to iov_iterAl Viro1-25/+15
... and don't open-code iov_iter_alignment() there Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07new helper: iov_iter_get_pages_alloc()Al Viro1-202/+88
same as iov_iter_get_pages(), except that pages array is allocated (kmalloc if possible, vmalloc if that fails) and left for caller to free. Lustre and NFS ->direct_IO() switched to it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07new helper: iov_iter_npages()Al Viro2-22/+3
counts the pages covered by iov_iter, up to given limit. do_block_direct_io() and fuse_iter_npages() switched to it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07f2fs: switch to iov_iter_alignment()Al Viro1-6/+5
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07fuse: switch to iov_iter_get_pages()Al Viro1-21/+12
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07fuse: pull iov_iter initializations upAl Viro3-30/+38
... to fuse_direct_{read,write}(). ->direct_IO() path uses the iov_iter passed by the caller instead. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07new helper: iov_iter_get_pages()Al Viro1-73/+38
iov_iter_get_pages(iter, pages, maxsize, &start) grabs references pinning the pages of up to maxsize of (contiguous) data from iter. Returns the amount of memory grabbed or -error. In case of success, the requested area begins at offset start in pages[0] and runs through pages[1], etc. Less than requested amount might be returned - either because the contiguous area in the beginning of iterator is smaller than requested, or because the kernel failed to pin that many pages. direct-io.c switched to using iov_iter_get_pages() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07dio: take updating ->result into do_direct_IO()Al Viro1-4/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07start adding the tag to iov_iterAl Viro9-17/+17
For now, just use the same thing we pass to ->direct_IO() - it's all iovec-based at the moment. Pass it explicitly to iov_iter_init() and account for kvec vs. iovec in there, by the same kludge NFS ->direct_IO() uses. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07new helper: generic_file_read_iter()Al Viro2-15/+2
iov_iter-using variant of generic_file_aio_read(). Some callers converted. Note that it's still not quite there for use as ->read_iter() - we depend on having zero iter->iov_offset in O_DIRECT case. Fortunately, that's true for all converted callers (and for generic_file_aio_read() itself). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07fuse_file_aio_write(): merge initializations of iov_iterAl Viro1-2/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ceph_aio_read(): keep iov_iter across retriesAl Viro1-6/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07new primitive: iov_iter_alignment()Al Viro1-22/+5
returns the value aligned as badly as the worst remaining segment in iov_iter is. Use instead of open-coded equivalents. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07switch {__,}blockdev_direct_IO() to iov_iterAl Viro18-54/+43
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07get rid of pointless iov_length() in ->direct_IO()Al Viro16-28/+30
all callers have iov_length(iter->iov, iter->nr_segs) == iov_iter_count(iter) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-05-07ext4: switch the guts of ->direct_IO() to iov_iterAl Viro3-18/+15
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>