]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
btrfs: add missing options displayed in mount output
authorDavid Sterba <dsterba@suse.cz>
Tue, 28 Jun 2011 15:10:37 +0000 (15:10 +0000)
committerChris Mason <chris.mason@oracle.com>
Wed, 6 Jul 2011 22:46:43 +0000 (18:46 -0400)
There are three missed mount options settable by user which are not
currently displayed in mount output.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.h
fs/btrfs/super.c

index 8e948ec1ee6ba6b49de0ddf75aa9c89c507f9156..60e13ef23a5e500d371b44e06092afd7de047dd4 100644 (file)
@@ -1336,6 +1336,11 @@ struct btrfs_ioctl_defrag_range_args {
  */
 #define BTRFS_STRING_ITEM_KEY  253
 
+/*
+ * Flags for mount options.
+ *
+ * Note: don't forget to add new options to btrfs_show_options()
+ */
 #define BTRFS_MOUNT_NODATASUM          (1 << 0)
 #define BTRFS_MOUNT_NODATACOW          (1 << 1)
 #define BTRFS_MOUNT_NOBARRIER          (1 << 2)
index 3559d0b3518ab91fed3ab190e241ff8c51393cc4..5746081199ee9ab9b71238358007cbe86984b0a3 100644 (file)
@@ -721,6 +721,12 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
                seq_puts(seq, ",clear_cache");
        if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED))
                seq_puts(seq, ",user_subvol_rm_allowed");
+       if (btrfs_test_opt(root, ENOSPC_DEBUG))
+               seq_puts(seq, ",enospc_debug");
+       if (btrfs_test_opt(root, AUTO_DEFRAG))
+               seq_puts(seq, ",autodefrag");
+       if (btrfs_test_opt(root, INODE_MAP_CACHE))
+               seq_puts(seq, ",inode_cache");
        return 0;
 }