mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
ceph: drop unconnected inodes
Positve dentry and corresponding inode are always accompanied in MDS reply. So no need to keep inode in the cache after dropping all its aliases. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
56f91aad69
commit
9f12bd119e
3 changed files with 12 additions and 0 deletions
|
@ -436,6 +436,16 @@ void ceph_destroy_inode(struct inode *inode)
|
||||||
call_rcu(&inode->i_rcu, ceph_i_callback);
|
call_rcu(&inode->i_rcu, ceph_i_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ceph_drop_inode(struct inode *inode)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Positve dentry and corresponding inode are always accompanied
|
||||||
|
* in MDS reply. So no need to keep inode in the cache after
|
||||||
|
* dropping all its aliases.
|
||||||
|
*/
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helpers to fill in size, ctime, mtime, and atime. We have to be
|
* Helpers to fill in size, ctime, mtime, and atime. We have to be
|
||||||
* careful because either the client or MDS may have more up to date
|
* careful because either the client or MDS may have more up to date
|
||||||
|
|
|
@ -686,6 +686,7 @@ static const struct super_operations ceph_super_ops = {
|
||||||
.alloc_inode = ceph_alloc_inode,
|
.alloc_inode = ceph_alloc_inode,
|
||||||
.destroy_inode = ceph_destroy_inode,
|
.destroy_inode = ceph_destroy_inode,
|
||||||
.write_inode = ceph_write_inode,
|
.write_inode = ceph_write_inode,
|
||||||
|
.drop_inode = ceph_drop_inode,
|
||||||
.sync_fs = ceph_sync_fs,
|
.sync_fs = ceph_sync_fs,
|
||||||
.put_super = ceph_put_super,
|
.put_super = ceph_put_super,
|
||||||
.show_options = ceph_show_options,
|
.show_options = ceph_show_options,
|
||||||
|
|
|
@ -691,6 +691,7 @@ extern const struct inode_operations ceph_file_iops;
|
||||||
|
|
||||||
extern struct inode *ceph_alloc_inode(struct super_block *sb);
|
extern struct inode *ceph_alloc_inode(struct super_block *sb);
|
||||||
extern void ceph_destroy_inode(struct inode *inode);
|
extern void ceph_destroy_inode(struct inode *inode);
|
||||||
|
extern int ceph_drop_inode(struct inode *inode);
|
||||||
|
|
||||||
extern struct inode *ceph_get_inode(struct super_block *sb,
|
extern struct inode *ceph_get_inode(struct super_block *sb,
|
||||||
struct ceph_vino vino);
|
struct ceph_vino vino);
|
||||||
|
|
Loading…
Reference in a new issue