diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-05-27 09:11:46 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-06-10 10:41:12 -0400 |
commit | a53b4751ae92adb372017222887f3ec625cba60b (patch) | |
tree | 454c0876bb532ee44ad07485e6d40c60e157ca34 /fs/nilfs2/super.c | |
parent | 30c25be71fcbd87fd33518045cc014e69bff3d6f (diff) |
nilfs2: use device's backing_dev_info for btree node caches
Previously, default_backing_dev_info was used for the mapping of btree
node caches. This uses device dependent backing_dev_info to allow
detailed control of the device for the btree node pages.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r-- | fs/nilfs2/super.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 6989b03e97ab..9acf30b60600 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -134,7 +134,7 @@ void nilfs_warning(struct super_block *sb, const char *function, | |||
134 | 134 | ||
135 | static struct kmem_cache *nilfs_inode_cachep; | 135 | static struct kmem_cache *nilfs_inode_cachep; |
136 | 136 | ||
137 | struct inode *nilfs_alloc_inode(struct super_block *sb) | 137 | struct inode *nilfs_alloc_inode_common(struct the_nilfs *nilfs) |
138 | { | 138 | { |
139 | struct nilfs_inode_info *ii; | 139 | struct nilfs_inode_info *ii; |
140 | 140 | ||
@@ -144,10 +144,15 @@ struct inode *nilfs_alloc_inode(struct super_block *sb) | |||
144 | ii->i_bh = NULL; | 144 | ii->i_bh = NULL; |
145 | ii->i_state = 0; | 145 | ii->i_state = 0; |
146 | ii->vfs_inode.i_version = 1; | 146 | ii->vfs_inode.i_version = 1; |
147 | nilfs_btnode_cache_init(&ii->i_btnode_cache); | 147 | nilfs_btnode_cache_init(&ii->i_btnode_cache, nilfs->ns_bdi); |
148 | return &ii->vfs_inode; | 148 | return &ii->vfs_inode; |
149 | } | 149 | } |
150 | 150 | ||
151 | struct inode *nilfs_alloc_inode(struct super_block *sb) | ||
152 | { | ||
153 | return nilfs_alloc_inode_common(NILFS_SB(sb)->s_nilfs); | ||
154 | } | ||
155 | |||
151 | void nilfs_destroy_inode(struct inode *inode) | 156 | void nilfs_destroy_inode(struct inode *inode) |
152 | { | 157 | { |
153 | kmem_cache_free(nilfs_inode_cachep, NILFS_I(inode)); | 158 | kmem_cache_free(nilfs_inode_cachep, NILFS_I(inode)); |