From 27013bf5ad606020a3a9743561547c73b9a29531 Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Thu, 6 Sep 2007 13:34:16 -0700 Subject: [PATCH] --- yaml --- r: 67719 b: refs/heads/master c: d550071c03f129a60dfad60d23dab73f894129a9 h: refs/heads/master i: 67717: 1f7a3fded70c83c3b7417ce230eed963fc2bd259 67715: 3927748be037e97545a4638b8ddb772b2dcf8414 67711: 82b12519456fa868284990912e9dd9089c689db3 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/super.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ce890c6c6792..0e30c5fec928 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 19b613d41051296be628581e7e21b847e9eaba80 +refs/heads/master: d550071c03f129a60dfad60d23dab73f894129a9 diff --git a/trunk/fs/ocfs2/super.c b/trunk/fs/ocfs2/super.c index 19436d1ff57f..e5ac0714dab2 100644 --- a/trunk/fs/ocfs2/super.c +++ b/trunk/fs/ocfs2/super.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -91,6 +92,7 @@ struct mount_options static int ocfs2_parse_options(struct super_block *sb, char *options, struct mount_options *mopt, int is_remount); +static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt); static void ocfs2_put_super(struct super_block *sb); static int ocfs2_mount_volume(struct super_block *sb); static int ocfs2_remount(struct super_block *sb, int *flags, char *data); @@ -133,6 +135,7 @@ static const struct super_operations ocfs2_sops = { .write_super = ocfs2_write_super, .put_super = ocfs2_put_super, .remount_fs = ocfs2_remount, + .show_options = ocfs2_show_options, }; enum { @@ -830,6 +833,41 @@ static int ocfs2_parse_options(struct super_block *sb, return status; } +static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt) +{ + struct ocfs2_super *osb = OCFS2_SB(mnt->mnt_sb); + unsigned long opts = osb->s_mount_opt; + + if (opts & OCFS2_MOUNT_HB_LOCAL) + seq_printf(s, ",_netdev,heartbeat=local"); + else + seq_printf(s, ",heartbeat=none"); + + if (opts & OCFS2_MOUNT_NOINTR) + seq_printf(s, ",nointr"); + + if (opts & OCFS2_MOUNT_DATA_WRITEBACK) + seq_printf(s, ",data=writeback"); + else + seq_printf(s, ",data=ordered"); + + if (opts & OCFS2_MOUNT_BARRIER) + seq_printf(s, ",barrier=1"); + + if (opts & OCFS2_MOUNT_ERRORS_PANIC) + seq_printf(s, ",errors=panic"); + else + seq_printf(s, ",errors=remount-ro"); + + if (osb->preferred_slot != OCFS2_INVALID_SLOT) + seq_printf(s, ",preferred_slot=%d", osb->preferred_slot); + + if (osb->s_atime_quantum != OCFS2_DEFAULT_ATIME_QUANTUM) + seq_printf(s, ",atime_quantum=%u", osb->s_atime_quantum); + + return 0; +} + static int __init ocfs2_init(void) { int status;