aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-02-08 07:21:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:39 -0500
commitb3b304a23a8f7ae4c40c7b512ee45afae0010a70 (patch)
tree04ada9ae35e912b6c3d56c0aefdc297216f2e0a5 /include/linux
parentf84e3f521e1449300e0fdc314b7b43b418a66dc3 (diff)
mount options: add generic_show_options()
Add a new s_options field to struct super_block. Filesystems can save mount options passed to them in mount or remount. It is automatically freed when the superblock is destroyed. A new helper function, generic_show_options() is introduced, which uses this field to display the mount options in /proc/mounts. Another helper function, save_mount_options() may be used by filesystems to save the options in the super block. 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/linux')
-rw-r--r--include/linux/fs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3db22fc2249a..cb3a9001f3b9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1038,6 +1038,12 @@ struct super_block {
1038 * in /proc/mounts will be "type.subtype" 1038 * in /proc/mounts will be "type.subtype"
1039 */ 1039 */
1040 char *s_subtype; 1040 char *s_subtype;
1041
1042 /*
1043 * Saved mount options for lazy filesystems using
1044 * generic_show_options()
1045 */
1046 char *s_options;
1041}; 1047};
1042 1048
1043extern struct timespec current_fs_time(struct super_block *sb); 1049extern struct timespec current_fs_time(struct super_block *sb);
@@ -1970,6 +1976,9 @@ extern int __must_check inode_setattr(struct inode *, struct iattr *);
1970 1976
1971extern void file_update_time(struct file *file); 1977extern void file_update_time(struct file *file);
1972 1978
1979extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt);
1980extern void save_mount_options(struct super_block *sb, char *options);
1981
1973static inline ino_t parent_ino(struct dentry *dentry) 1982static inline ino_t parent_ino(struct dentry *dentry)
1974{ 1983{
1975 ino_t res; 1984 ino_t res;