summaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
2010-03-059P2010.L handshake: Add VFS flagsSripathi Kodi
Add 9P2000.u and 9P2010.L protocol flags to V9FS VFS This patch adds 9P2000.u and 9P2010.L protocol flags into V9FS VFS side code and removes the single flag used for 'extended'. Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2010-03-05ceph: update for write_inode API changeStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Sage Weil <sage@newdream.net>
2010-03-05Merge remote branch 'vfs/write_inode' into for-nextSage Weil
Conflicts: Documentation/ioctl/ioctl-number.txt
2010-03-05Merge branch 'writeback-for-2.6.34' into nfs-for-2.6.34Trond Myklebust
2010-03-05NFS: Remove requirement for inode->i_mutex from nfs_invalidate_mappingTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Clean up nfs_sync_mappingTrond Myklebust
Remove the redundant call to filemap_write_and_wait(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Simplify nfs_wb_page()Trond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Replace __nfs_write_mapping with sync_inode()Trond Myklebust
Now that we have correct COMMIT semantics in writeback_single_inode, we can reduce and simplify nfs_wb_all(). Also replace nfs_wb_nocommit() with a call to filemap_write_and_wait(), which doesn't need to hold the inode->i_mutex. With that done, we can eliminate nfs_write_mapping() altogether. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Simplify nfs_wb_page_cancel()Trond Myklebust
In all cases we should be able to just remove the request and call cancel_dirty_page(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Ensure inode is always marked I_DIRTY_DATASYNC, if it has unstable pagesTrond Myklebust
Since nfs_scan_list() doesn't wait for locked pages, we have a race in which it is possible to end up with an inode that needs to send a COMMIT, but which does not have the I_DIRTY_DATASYNC flag set. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Run COMMIT as an asynchronous RPC call when wbc->for_background is setTrond Myklebust
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Wu Fengguang <fengguang.wu@intel.com>
2010-03-05NFS: Reduce the number of unnecessary COMMIT callsTrond Myklebust
If the caller is doing a non-blocking flush, and there are still writebacks pending on the wire, we can usually defer the COMMIT call until those writes are done. Also ensure that we honour the wbc->nonblocking flag. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Add a count of the number of unstable writes carried by an inodeTrond Myklebust
In order to know when we should do opportunistic commits of the unstable writes, when the VM is doing a background flush, we add a field to count the number of unstable writes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05NFS: Cleanup - move nfs_write_inode() into fs/nfs/write.cTrond Myklebust
The sole purpose of nfs_write_inode is to commit unstable writes, so move it into fs/nfs/write.c, and make nfs_commit_inode static. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-03-05Merge branch 'write_inode2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'write_inode2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: pass writeback_control to ->write_inode make sure data is on disk before calling ->write_inode
2010-03-05Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: Switch !O_CREAT case to use of do_last() Get rid of symlink body copying Finish pulling of -ESTALE handling to upper level in do_filp_open() Turn do_link spaghetty into a normal loop Unify exits in O_CREAT handling Kill is_link argument of do_last() Pull handling of LAST_BIND into do_last(), clean up ok: part in do_filp_open() Leave mangled flag only for setting nd.intent.open.flag Get rid of passing mangled flag to do_last() Don't pass mangled open_flag to finish_open() pull more into do_last() bail out with ELOOP earlier in do_link loop pull the common predecessors into do_last() postpone __putname() until after do_last() unroll do_last: loop in do_filp_open() Shift releasing nd->root from do_last() to its caller gut do_filp_open() a bit more (do_last separation) beginning to untangle do_filp_open()
2010-03-05Merge branch 'for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (36 commits) ext4: fix up rb_root initializations to use RB_ROOT ext4: Code cleanup for EXT4_IOC_MOVE_EXT ioctl ext4: Fix the NULL reference in double_down_write_data_sem() ext4: Fix insertion point of extent in mext_insert_across_blocks() ext4: consolidate in_range() definitions ext4: cleanup to use ext4_grp_offs_to_block() ext4: cleanup to use ext4_group_first_block_no() ext4: Release page references acquired in ext4_da_block_invalidatepages ext4: Fix ext4_quota_write cross block boundary behaviour ext4: Convert BUG_ON checks to use ext4_error() instead ext4: Use direct_IO_no_locking in ext4 dio read ext4: use ext4_get_block_write in buffer write ext4: mechanical rename some of the direct I/O get_block's identifiers ext4: make "offset" consistent in ext4_check_dir_entry() ext4: Handle non empty on-disk orphan link ext4: explicitly remove inode from orphan list after failed direct io ext4: fix error handling in migrate ext4: deprecate obsoleted mount options ext4: Fix fencepost error in chosing choosing group vs file preallocation. jbd2: clean up an assertion in jbd2_journal_commit_transaction() ...
2010-03-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linusLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus: Squashfs: get rid of obsolete definition in header file Squashfs: get rid of obsolete variable in struct squashfs_sb_info Squashfs: add decompressor entries for lzma and lzo Squashfs: add a decompressor framework Squashfs: factor out remaining zlib dependencies into separate wrapper file Squashfs: move zlib decompression wrapper code into a separate file
2010-03-05pass writeback_control to ->write_inodeChristoph Hellwig
This gives the filesystem more information about the writeback that is happening. Trond requested this for the NFS unstable write handling, and other filesystems might benefit from this too by beeing able to distinguish between the different callers in more detail. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05make sure data is on disk before calling ->write_inodeChristoph Hellwig
Similar to the fsync issue fixed a while ago in commit 2daea67e966dc0c42067ebea015ddac6834cef88 we need to write for data to actually hit the disk before writing out the metadata to guarantee data integrity for filesystems that modify the inode in the data I/O completion path. Currently XFS and NFS handle this manually, and AFS has a write_inode method that does nothing but waiting for data, while others are possibly missing out on this. Fortunately this change has a lot less impact than the fsync change as none of the write_inode methods starts data writeout of any form by itself. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Merge branch 'for-2.6.34-rc1-batch2' into for-linusAlex Elder
2010-03-05xfs: return inode fork offset in bulkstat for fsrDave Chinner
So that fsr can attempt to get the fork offset of the temporary inode it uses the same as the inode it is defragmenting, pass the fork offset out in the bulkstat information. The bulkstat structure has padding that has always been zeroed, so userspace can tell if this field is set or not by use of the xattr present flag and a non-zero value for the fork offset. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
2010-03-05xfs: Increase the default size of the reserved blocks poolDave Chinner
The current default size of the reserved blocks pool is easy to deplete with certain workloads, in particular workloads that do lots of concurrent delayed allocation extent conversions. If enough transactions are running in parallel and the entire pool is consumed then subsequent calls to xfs_trans_reserve() will fail with ENOSPC. Also add a rate limited warning so we know if this starts happening again. This is an updated version of an old patch from Lachlan McIlroy. Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Alex Elder <aelder@sgi.com>
2010-03-05xfs: truncate delalloc extents when IO fails in writebackDave Chinner
We currently use block_invalidatepage() to clean up pages where I/O fails in ->writepage(). Unfortunately, if the page has delalloc regions on it, we fail to remove the delalloc regions when we invalidate the page. This can result in tripping a BUG() in xfs_get_blocks() later on if a direct IO read is done on that same region - the delalloc extent is returned when none is supposed to be there. Fix this by truncating away the delalloc regions on the page before invalidating it. Because they are delalloc, we can do this without needing a transaction. Indeed - if we get ENOSPC errors, we have to be able to do this truncation without a transaction as there is no space left for block reservation (typically why we see a ENOSPC in writeback). Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
2010-03-05xfs: check for more work before sleeping in xfssyncdDave Chinner
xfssyncd processes a queue of work by detaching the queue and then iterating over all the work items. It then sleeps for a time period or until new work comes in. If new work is queued while xfssyncd is actively processing the detached work queue, it will not process that new work until after a sleep timeout or the next work event queued wakes it. Fix this by checking the work queue again before going to sleep. Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
2010-03-05xfs: Fix a build warning in xfs_aops.cDave Chinner
Fix a build warning that slipped through. Dave Chinner had posted an updated version of his patch but the previous version--without this fix--was what got committed. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Alex Elder <aelder@sgi.com>
2010-03-05Squashfs: get rid of obsolete definition in header filePhillip Lougher
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-03-05Squashfs: get rid of obsolete variable in struct squashfs_sb_infoPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-03-05[LogFS] Check feature flagsJoern Engel
2010-03-05Switch !O_CREAT case to use of do_last()Al Viro
... and now we have all intents crap well localized Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Get rid of symlink body copyingAl Viro
Now that nd->last stays around until ->put_link() is called, we can just postpone that ->put_link() in do_filp_open() a bit and don't bother with copying. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Finish pulling of -ESTALE handling to upper level in do_filp_open()Al Viro
Don't bother with path_walk() (and its retry loop); link_path_walk() will do it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Turn do_link spaghetty into a normal loopAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Unify exits in O_CREAT handlingAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Kill is_link argument of do_last()Al Viro
We set it to 1 iff we return NULL Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Pull handling of LAST_BIND into do_last(), clean up ok: part in do_filp_open()Al Viro
Note that in case of !O_CREAT we know that nd.root has already been given up Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Leave mangled flag only for setting nd.intent.open.flagAl Viro
Nothing else uses it anymore Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Get rid of passing mangled flag to do_last()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Don't pass mangled open_flag to finish_open()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05pull more into do_last()Al Viro
Handling of LAST_DOT/LAST_ROOT/LAST_DOTDOT/terminating slash can be pulled in as well Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05bail out with ELOOP earlier in do_link loopAl Viro
If we'd passed through 32 trailing symlinks already, there's no sense following the 33rd - we'll bail out anyway. Better bugger off earlier. It *does* change behaviour, after a fashion - if the 33rd happens to be a procfs-style symlink, original code *would* allow it. This one will not. Cry me a river if that hurts you. Please, do. And post a video of that, while you are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05pull the common predecessors into do_last()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05postpone __putname() until after do_last()Al Viro
Since do_last() doesn't mangle nd->last_name, we can safely postpone __putname() done in handling of trailing symlinks until after the call of do_last() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05unroll do_last: loop in do_filp_open()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05Shift releasing nd->root from do_last() to its callerAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05gut do_filp_open() a bit more (do_last separation)Al Viro
Brute-force separation of stuff reachable from do_last: with the exception of do_link:; just take all that crap to a helper function as-is and have it tell the caller if it has to go to do_link. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-05beginning to untangle do_filp_open()Al Viro
That's going to be a long and painful series. The first step: take the stuff reachable from 'ok' label in do_filp_open() into a new helper (finish_open()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-04ext4: fix up rb_root initializations to use RB_ROOTVenkatesh Pallipadi
ext4 uses rb_node = NULL; to zero rb_root at few places. Using RB_ROOT as the initializer is more portable in case the underlying implementation of rbtrees changes in the future. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: Eric Paris <eparis@redhat.com>
2010-03-05sysfs: Kill unused sysfs_sb variable.Eric W. Biederman
Now that there are no more users we can remove the sysfs_sb variable. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-05sysfs: Pass super_block to sysfs_get_inodeEric W. Biederman
Currently sysfs_get_inode magically returns an inode on sysfs_sb. Make the super_block parameter explicit and the code becomes clearer. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>