diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-05-08 03:25:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:01 -0400 |
commit | 79c0b2df79eb56fc71e54c75cd7fb3acf84370f9 (patch) | |
tree | f19be816fef3565b7f9cc746786e29fee0ac62e6 /include | |
parent | 880afc4d76af452267174b5989943f081c1db2c0 (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 'include')
-rw-r--r-- | include/linux/fs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 986b5d5d369f..527a09a82297 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -92,6 +92,7 @@ extern int dir_notify_enable; | |||
92 | /* public flags for file_system_type */ | 92 | /* public flags for file_system_type */ |
93 | #define FS_REQUIRES_DEV 1 | 93 | #define FS_REQUIRES_DEV 1 |
94 | #define FS_BINARY_MOUNTDATA 2 | 94 | #define FS_BINARY_MOUNTDATA 2 |
95 | #define FS_HAS_SUBTYPE 4 | ||
95 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | 96 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ |
96 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() | 97 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() |
97 | * during rename() internally. | 98 | * during rename() internally. |
@@ -961,6 +962,12 @@ struct super_block { | |||
961 | /* Granularity of c/m/atime in ns. | 962 | /* Granularity of c/m/atime in ns. |
962 | Cannot be worse than a second */ | 963 | Cannot be worse than a second */ |
963 | u32 s_time_gran; | 964 | u32 s_time_gran; |
965 | |||
966 | /* | ||
967 | * Filesystem subtype. If non-empty the filesystem type field | ||
968 | * in /proc/mounts will be "type.subtype" | ||
969 | */ | ||
970 | char *s_subtype; | ||
964 | }; | 971 | }; |
965 | 972 | ||
966 | extern struct timespec current_fs_time(struct super_block *sb); | 973 | extern struct timespec current_fs_time(struct super_block *sb); |