Whamcloud - gitweb
Branch b1_6
authoryangsheng <yangsheng>
Thu, 7 Aug 2008 05:11:18 +0000 (05:11 +0000)
committeryangsheng <yangsheng>
Thu, 7 Aug 2008 05:11:18 +0000 (05:11 +0000)
b=16208
i=adilger, johann

Implement lustre ll_show_options method.

lustre/ChangeLog
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/super.c
lustre/llite/super25.c

index 08c7037..936bb42 100644 (file)
@@ -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.
 
index 0c63559..f1ea9f0 100644 (file)
@@ -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);
index ff3f128..2ee51ea 100644 (file)
@@ -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);
+}
index 66c0b61..06e1ed6 100644 (file)
@@ -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,
 };
 
 
index 1d86876..613e228 100644 (file)
@@ -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,
 };