summaryrefslogtreecommitdiffstats
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2010-08-09mbcache: fix shrinker function return valueAndreas Gruenbacher1-17/+10
The shrinker function is supposed to return the number of cache entries after shrinking, not before shrinking. Fix that. Based on a patch from Wang Sheng-Hui <crosslonelyover@gmail.com>. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09mbcache: Remove unused featuresAndreas Gruenbacher4-122/+55
The mbcache code was written to support a variable number of indexes, but all the existing users use exactly one index. Simplify to code to support only that case. There are also no users of the cache entry free operation, and none of the users keep extra data in cache entries. Remove those features as well. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09add f_flags to struct statfs(64)Christoph Hellwig1-1/+46
Add a flags field to help glibc implementing statvfs(3) efficiently. We copy the flag values from glibc, and add a new ST_VALID flag to denote that f_flags is implemented. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09pass a struct path to vfs_statfsChristoph Hellwig7-35/+55
We'll need the path to implement the flags field for statvfs support. We do have it available in all callers except: - ecryptfs_statfs. This one doesn't actually need vfs_statfs but just needs to do a caller to the lower filesystem statfs method. - sys_ustat. Add a non-exported statfs_by_dentry helper for it which doesn't won't be able to fill out the flags field later on. In addition rename the helpers for statfs vs fstatfs to do_*statfs instead of the misleading vfs prefix. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09All filesystems that need invalidate_inode_buffers() are doing that explicitlyAl Viro1-1/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert remaining ->clear_inode() to ->evict_inode()Al Viro33-57/+93
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09Make ->drop_inode() just return whether inode needs to be droppedAl Viro8-98/+55
... and let iput_final() do the actual eviction or retention Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09fs/inode.c:clear_inode() is goneAl Viro1-24/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09fs/inode.c:evict() doesn't care about delete vs. non-delete paths nowAl Viro1-4/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09->delete_inode() is goneAl Viro1-2/+0
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert ext4 to ->evict_inode()Al Viro4-10/+16
pretty much brute-force... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert logfs to ->evict_inode()Al Viro3-36/+31
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09logfs: get rid of magical inodesAl Viro6-41/+31
ordering problems at ->kill_sb() time are solved by doing iput() of these suckers in ->put_super() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert nilfs2 to ->evict_inode()Al Viro3-24/+26
[folded build fix from sfr] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert exofs to ->evict_inode()Al Viro3-6/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert reiserfs to ->evict_inode()Al Viro2-10/+11
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert btrfs to ->evict_inode()Al Viro3-4/+8
NB: do we want btrfs_wait_ordered_range() on eviction of inodes with positive i_nlink on subvolume with zero root_refs? If not, btrfs_evict_inode() can be simplified by unconditionally bailing out in case of i_nlink > 0 in the very beginning... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch gfs2 to ->evict_inode()Al Viro1-24/+15
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert ocfs2 to ->evict_inode()Al Viro3-11/+16
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch ncpfs to ->evict_inode()Al Viro1-6/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch udf to ->evict_inode()Al Viro4-35/+21
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch ubifs to ->evict_inode()Al Viro1-4/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch jfs to ->evict_inode()Al Viro3-25/+20
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch hpfs to ->evict_inode()Al Viro3-7/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch hppfs to ->evict_inode()Al Viro1-4/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09try to get rid of races in hostfs open()Al Viro3-12/+37
In case of mode mismatch, do *not* blindly close the descriptor another openers might be using right now. Open the underlying file with currently sufficient mode, then * if current mode has grown so that it's sufficient for us now, just close our new fd * if current mode has grown and our fd is *not* enough to cover it, close and repeat. * otherwise, install our fd if the file hadn't been opened at all or dup2() our fd over the current one (and close our fd). Critical section is protected by mutex; yes, system-wide. All we do under it is a bunch of comparison and maybe an overwriting dup2() on host. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09leak in hostfs_unlink()Al Viro1-2/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09hostfs: fix races in dentry_name() and inode_name()Al Viro1-46/+60
calculating size, then doing allocation, then filling the path is a Bad Idea(tm), since the ancestors can be renamed, leading to buffer overrun. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09new helper: __dentry_path()Al Viro1-5/+22
builds path relative to fs root, called under dcache_lock, doesn't append any nonsense to unlinked ones. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09hostfs: sanitize symlinksAl Viro1-26/+35
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09hostfs: get rid of inode_dentry_name()Al Viro1-35/+20
it's equivalent to dentry_name() anyway Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09hostfs: get rid of file_type(), fold init_inode()Al Viro3-93/+45
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch stat_file() to passing a single struct rather than fsckloads of pointersAl Viro3-68/+58
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09hostfs: pass pathname to init_inode()Al Viro1-30/+15
We will calculate it in all callers anyway, so there's no need to duplicate that inside. Moreover, that way we lose all failure exits in init_inode(), so it doesn't need to return anything. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09get rid of hostfs_read_inode()Al Viro1-53/+16
There are only two call sites; in one (hostfs_iget()) it's actually a no-op and in another (fill_super()) it's easier to expand the damn thing and use what we know about its arguments to simplify it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09hostfs: don't keep a field in each inode when we are using it only in rootAl Viro1-24/+15
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09stop icache pollution in hostfs, switch to ->evict_inode()Al Viro1-22/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch affs to ->evict_inode()Al Viro3-17/+14
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch omfs to ->evict_inode()Al Viro1-3/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch bfs to ->evict_inode(), clean upAl Viro1-38/+32
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09convert ext3 to ->evict_inode()Al Viro3-35/+28
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch ufs to ->evict_inode()Al Viro4-21/+28
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09covert fatfs to ->evict_inode()Al Viro1-11/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch smbfs to evict_inode()Al Viro1-4/+4
NB: treatment of inode hash is completely braindead there Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch sysv to ->evict_inode()Al Viro2-6/+10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09merge ext2 delete_inode and clear_inode, switch to ->evict_inode()Al Viro4-37/+36
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09Don't dirty the victim in ext2_xattr_delete_inode()Al Viro1-2/+0
... it's beyond fs-writeback reach already - writeback won't be started at that point. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09Take dirtying the inode to callers of ext2_free_blocks()Al Viro3-3/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09ext2: switch to dquot_free_block_nodirty()Al Viro2-8/+16
brute-force conversion Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09switch minix to ->evict_inode(), fix write_inode/delete_inode raceAl Viro2-9/+12
We need to wait for completion of possible writeback in progress before we clear on-disk inode during deletion. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>