diff options
author | Sripathi Kodi <sripathik@in.ibm.com> | 2010-03-25 08:41:54 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-05-21 17:44:33 -0400 |
commit | 9b6533c9b331ddbba9a40c972d82222ecffbc359 (patch) | |
tree | 62d4f5ece3c2cbefc09197b386cac2cd4a6693ae /fs/9p/vfs_super.c | |
parent | c56e4acf55c804cbeea0ddb696ef698c73d39826 (diff) |
9p: VFS switches for 9p2000.L: VFS switches
Implements VFS switches for 9p2000.L protocol.
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r-- | fs/9p/vfs_super.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 806da5d3b3a..cc3fa8c3aab 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include "v9fs_vfs.h" | 45 | #include "v9fs_vfs.h" |
46 | #include "fid.h" | 46 | #include "fid.h" |
47 | 47 | ||
48 | static const struct super_operations v9fs_super_ops; | 48 | static const struct super_operations v9fs_super_ops, v9fs_super_ops_dotl; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * v9fs_set_super - set the superblock | 51 | * v9fs_set_super - set the superblock |
@@ -76,7 +76,10 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, | |||
76 | sb->s_blocksize_bits = fls(v9ses->maxdata - 1); | 76 | sb->s_blocksize_bits = fls(v9ses->maxdata - 1); |
77 | sb->s_blocksize = 1 << sb->s_blocksize_bits; | 77 | sb->s_blocksize = 1 << sb->s_blocksize_bits; |
78 | sb->s_magic = V9FS_MAGIC; | 78 | sb->s_magic = V9FS_MAGIC; |
79 | sb->s_op = &v9fs_super_ops; | 79 | if (v9fs_proto_dotl(v9ses)) |
80 | sb->s_op = &v9fs_super_ops_dotl; | ||
81 | else | ||
82 | sb->s_op = &v9fs_super_ops; | ||
80 | sb->s_bdi = &v9ses->bdi; | 83 | sb->s_bdi = &v9ses->bdi; |
81 | 84 | ||
82 | sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC | | 85 | sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC | |
@@ -222,6 +225,17 @@ static const struct super_operations v9fs_super_ops = { | |||
222 | .umount_begin = v9fs_umount_begin, | 225 | .umount_begin = v9fs_umount_begin, |
223 | }; | 226 | }; |
224 | 227 | ||
228 | static const struct super_operations v9fs_super_ops_dotl = { | ||
229 | #ifdef CONFIG_9P_FSCACHE | ||
230 | .alloc_inode = v9fs_alloc_inode, | ||
231 | .destroy_inode = v9fs_destroy_inode, | ||
232 | #endif | ||
233 | .statfs = simple_statfs, | ||
234 | .clear_inode = v9fs_clear_inode, | ||
235 | .show_options = generic_show_options, | ||
236 | .umount_begin = v9fs_umount_begin, | ||
237 | }; | ||
238 | |||
225 | struct file_system_type v9fs_fs_type = { | 239 | struct file_system_type v9fs_fs_type = { |
226 | .name = "9p", | 240 | .name = "9p", |
227 | .get_sb = v9fs_get_sb, | 241 | .get_sb = v9fs_get_sb, |