From afc1839e7f6e41373a90b9804b8e7ca9ac71bcad Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 7 Aug 2008 05:11:18 +0000 Subject: [PATCH] Branch b1_6 b=16208 i=adilger, johann Implement lustre ll_show_options method. --- lustre/ChangeLog | 4 ++++ lustre/llite/llite_internal.h | 1 + lustre/llite/llite_lib.c | 29 +++++++++++++++++++++++++++++ lustre/llite/super.c | 1 + lustre/llite/super25.c | 1 + 5 files changed, 36 insertions(+) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 08c7037..936bb42 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -39,6 +39,10 @@ tbd Sun Microsystems, Inc. old (verbose) output can be obtained by using -v option. Severity : enhancement +Bugzilla : 16208 +Description: Implement lustre ll_show_options method. + +Severity : enhancement Bugzilla : 16188 Description: Update to SLES9 kernel-2.6.5-7.312. diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 0c63559..f1ea9f0 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -723,6 +723,7 @@ void ll_umount_begin(struct vfsmount *vfsmnt, int flags); void ll_umount_begin(struct super_block *sb); #endif int ll_remount_fs(struct super_block *sb, int *flags, char *data); +int ll_show_options(struct seq_file *seq, struct vfsmount *vfs); int ll_prep_inode(struct obd_export *exp, struct inode **inode, struct ptlrpc_request *req, int offset, struct super_block *); void lustre_dump_dentry(struct dentry *, int recur); diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index ff3f128..2ee51ea 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -776,10 +776,14 @@ static int ll_options(char *options, int *flags) /* Ignore deprecated mount option. The client will * always try to mount with ACL support, whether this * is used depends on whether server supports it. */ + LCONSOLE_ERROR_MSG(0x152, "Ignoring deprecated " + "mount option 'acl'.\n"); goto next; } tmp = ll_set_opt("noacl", s1, LL_SBI_ACL); if (tmp) { + LCONSOLE_ERROR_MSG(0x152, "Ignoring deprecated " + "mount option 'noacl'.\n"); goto next; } @@ -2226,3 +2230,28 @@ int ll_process_config(struct lustre_cfg *lcfg) lcfg, sb); return(rc); } + +int ll_show_options(struct seq_file *seq, struct vfsmount *vfs) +{ + struct ll_sb_info *sbi; + + LASSERT((seq != NULL) && (vfs != NULL)); + sbi = ll_s2sbi(vfs->mnt_sb); + + if (sbi->ll_flags & LL_SBI_NOLCK) + seq_puts(seq, ",nolock"); + + if (sbi->ll_flags & LL_SBI_FLOCK) + seq_puts(seq, ",flock"); + + if (sbi->ll_flags & LL_SBI_LOCALFLOCK) + seq_puts(seq, ",localflock"); + + if (sbi->ll_flags & LL_SBI_USER_XATTR) + seq_puts(seq, ",user_xattr"); + + if (sbi->ll_flags & LL_SBI_ACL) + seq_puts(seq, ",acl"); + + RETURN(0); +} diff --git a/lustre/llite/super.c b/lustre/llite/super.c index 66c0b61..06e1ed6 100644 --- a/lustre/llite/super.c +++ b/lustre/llite/super.c @@ -66,6 +66,7 @@ struct super_operations lustre_super_operations = .fh_to_dentry = ll_fh_to_dentry, .dentry_to_fh = ll_dentry_to_fh, .remount_fs = ll_remount_fs, + .show_options = ll_show_options, }; diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c index 1d86876..613e228 100644 --- a/lustre/llite/super25.c +++ b/lustre/llite/super25.c @@ -98,6 +98,7 @@ struct super_operations lustre_super_operations = .statfs = ll_statfs, .umount_begin = ll_umount_begin, .remount_fs = ll_remount_fs, + .show_options = ll_show_options, }; -- 1.8.3.1