diff mbox

Include subvolume= and metadata_ratio= in /cat/proc

Message ID 201001142100.00106.kreijack@libero.it (mailing list archive)
State New, archived
Headers show

Commit Message

Goffredo Baroncelli Jan. 14, 2010, 7:59 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 3f9b457..faeaa7f 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -461,6 +461,16 @@  static int btrfs_show_options(struct seq_file *seq, 
struct vfsmount *vfs)
 		seq_puts(seq, ",discard");
 	if (!(root->fs_info->sb->s_flags & MS_POSIXACL))
 		seq_puts(seq, ",noacl");
+	if( root->fs_info->metadata_ratio )
+		seq_printf(seq, ",metadata_ratio=%d", 
+			root->fs_info->metadata_ratio);
+	spin_lock(&vfs->mnt_root->d_lock);
+	if (vfs->mnt_root->d_name.len != 1 ||
+	    vfs->mnt_root->d_name.name[0] != '/'){
+		seq_puts(seq, ",subvol=");
+		seq_puts(seq, vfs->mnt_root->d_name.name);
+	}
+	spin_unlock(&vfs->mnt_root->d_lock);
 	return 0;
 }