aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAge
* nfs: switch to iter_splice_write_file()Al Viro2014-06-12
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* fs/splice.c: remove unneeded exportsAl Viro2014-06-12
| | | | | | ocfs2 was using a bunch of splice.c guts... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ocfs2: switch to iter_file_splice_write()Al Viro2014-06-12
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ->splice_write() via ->write_iter()Al Viro2014-06-12
| | | | | | | | | | iter_file_splice_write() - a ->splice_write() instance that gathers the pipe buffers, builds a bio_vec-based iov_iter covering those and feeds it to ->write_iter(). A bunch of simple cases coverted to that... [AV: fixed the braino spotted by Cyrill] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* bio_vec-backed iov_iterAl Viro2014-05-06
| | | | | | | | | | | | | | | 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>
* ceph: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ceph_sync_direct_write: stop poking into iov_iter gutsAl Viro2014-05-06
| | | | | | all needed primitives are there... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ceph_sync_read: stop poking into iov_iter gutsAl Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helper: copy_page_from_iter()Al Viro2014-05-06
| | | | | | | 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>
* fuse: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* btrfs: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ocfs2: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xfs: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* afs: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* gfs2: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* nfs: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ubifs: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cifs: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* udf: switch to ->write_iter()Al Viro2014-05-06
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* convert ext4 to ->write_iter()Al Viro2014-05-06
| | | | | | | | | | | 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>
* Merge ext4 changes in ext4_file_write() into for-nextAl Viro2014-05-06
|\ | | | | | | From ext4.git#dev, needed for switch of ext4 to ->write_iter() ;-/
| * ext4: fix locking for O_APPEND writesTheodore Ts'o2014-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | Al Viro pointed out that locking for O_APPEND writes was problematic, since the location of the write isn't known until after we take the i_mutex, which impacts the ext4_unaligned_aio() and s_bitmap_maxbytes check. For O_APPEND always assume that the write is unaligned so call ext4_unwritten_wait(). And to solve the second problem, take the i_mutex earlier before we start the s_bitmap_maxbytes check. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * ext4: factor out common code in ext4_file_write()Theodore Ts'o2014-04-21
| | | | | | | | | | | | | | This shouldn't change any logic flow; just delete duplicated code. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
| * ext4: move ext4_file_dio_write() into ext4_file_write()Theodore Ts'o2014-04-21
| | | | | | | | | | | | | | | | This commit doesn't actually change anything; it just moves code around in preparation for some code simplification work. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
| * ext4: inline generic_file_aio_write() into ext4_file_write()Theodore Ts'o2014-04-21
| | | | | | | | | | | | | | | | | | Copy generic_file_aio_write() into ext4_file_write(). This is part of a patch series which allows us to simplify ext4_file_write() and ext4_file_dio_write(), by calling __generic_file_aio_write() directly. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
| * ext4: rename uninitialized extents to unwrittenLukas Czerner2014-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in ext4 there is quite a mess when it comes to naming unwritten extents. Sometimes we call it uninitialized and sometimes we refer to it as unwritten. The right name for the extent which has been allocated but does not contain any written data is _unwritten_. Other file systems are using this name consistently, even the buffer head state refers to it as unwritten. We need to fix this confusion in ext4. This commit changes every reference to an uninitialized extent (meaning allocated but unwritten) to unwritten extent. This includes comments, function names and variable names. It even covers abbreviation of the word uninitialized (such as uninit) and some misspellings. This commit does not change any of the code paths at all. This has been confirmed by comparing md5sums of the assembly code of each object file after all the function names were stripped from it. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * ext4: get rid of EXT4_MAP_UNINIT flagLukas Czerner2014-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently EXT4_MAP_UNINIT is used in dioread_nolock case to mark the cases where we're using dioread_nolock and we're writing into either unallocated, or unwritten extent, because we need to make sure that any DIO write into that inode will wait for the extent conversion. However EXT4_MAP_UNINIT is not only entirely misleading name but also unnecessary because we can check for EXT4_MAP_UNWRITTEN in the dioread_nolock case instead. This commit removes EXT4_MAP_UNINIT flag. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* | blkdev_aio_write() - turn into blkdev_write_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | write_iter variants of {__,}generic_file_aio_write()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | ceph: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | nfs: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | fs/block_dev.c: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | pipe: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | cifs: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | fuse_file_aio_read(): convert to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | ocfs2: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | | | | | tracepoints are evil, exhibit #6969... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | ecryptfs: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | xfs: switch to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | switch simple generic_file_aio_read() users to ->read_iter()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | new methods: ->read_iter() and ->write_iter()Al Viro2014-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | replace checking for ->read/->aio_read presence with check in ->f_modeAl Viro2014-05-06
| | | | | | | | | | | | | | | | | | | | | | 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>
* | xfs: trim the argument lists of xfs_file_{dio,buffered}_aio_write()Al Viro2014-05-06
| | | | | | | | | | | | | | 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>
* | blkdev_aio_read(): switch to generic_file_read_iter(), get rid of iov_shorten()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | iov_iter_truncate()Al Viro2014-05-06
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | btrfs: switch check_direct_IO() to iov_iterAl Viro2014-05-06
| | | | | | | | | | | | ... and don't open-code iov_iter_alignment() there Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | new helper: iov_iter_get_pages_alloc()Al Viro2014-05-06
| | | | | | | | | | | | | | | | 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>
* | new helper: iov_iter_npages()Al Viro2014-05-06
| | | | | | | | | | | | | | | | 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>
* | f2fs: switch to iov_iter_alignment()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | fuse: switch to iov_iter_get_pages()Al Viro2014-05-06
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | fuse: pull iov_iter initializations upAl Viro2014-05-06
| | | | | | | | | | | | | | ... 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>