aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2007-05-08 03:25:43 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:01 -0400
commit79c0b2df79eb56fc71e54c75cd7fb3acf84370f9 (patch)
treef19be816fef3565b7f9cc746786e29fee0ac62e6 /fs/namespace.c
parent880afc4d76af452267174b5989943f081c1db2c0 (diff)
add filesystem subtype support
There's a slight problem with filesystem type representation in fuse based filesystems. From the kernel's view, there are just two filesystem types: fuse and fuseblk. From the user's view there are lots of different filesystem types. The user is not even much concerned if the filesystem is fuse based or not. So there's a conflict of interest in how this should be represented in fstab, mtab and /proc/mounts. The current scheme is to encode the real filesystem type in the mount source. So an sshfs mount looks like this: sshfs#user@server:/ /mnt/server fuse rw,nosuid,nodev,... This url-ish syntax works OK for sshfs and similar filesystems. However for block device based filesystems (ntfs-3g, zfs) it doesn't work, since the kernel expects the mount source to be a real device name. A possibly better scheme would be to encode the real type in the type field as "type.subtype". So fuse mounts would look like this: /dev/hda1 /mnt/windows fuseblk.ntfs-3g rw,... user@server:/ /mnt/server fuse.sshfs rw,nosuid,nodev,... This patch adds the necessary code to the kernel so that this can be correctly displayed in /proc/mounts. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index be5e56bfb73e..c5b88100d914 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -377,6 +377,10 @@ static int show_vfsmnt(struct seq_file *m, void *v)
377 seq_path(m, mnt, mnt->mnt_root, " \t\n\\"); 377 seq_path(m, mnt, mnt->mnt_root, " \t\n\\");
378 seq_putc(m, ' '); 378 seq_putc(m, ' ');
379 mangle(m, mnt->mnt_sb->s_type->name); 379 mangle(m, mnt->mnt_sb->s_type->name);
380 if (mnt->mnt_sb->s_subtype && mnt->mnt_sb->s_subtype[0]) {
381 seq_putc(m, '.');
382 mangle(m, mnt->mnt_sb->s_subtype);
383 }
380 seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? " ro" : " rw"); 384 seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? " ro" : " rw");
381 for (fs_infop = fs_info; fs_infop->flag; fs_infop++) { 385 for (fs_infop = fs_info; fs_infop->flag; fs_infop++) {
382 if (mnt->mnt_sb->s_flags & fs_infop->flag) 386 if (mnt->mnt_sb->s_flags & fs_infop->flag)