All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] Include subvolume= and metadata_ratio= in /cat/proc
Date: Thu, 14 Jan 2010 20:59:25 +0100	[thread overview]
Message-ID: <201001142100.00106.kreijack@libero.it> (raw)

[-- Attachment #1: Type: Text/Plain, Size: 1435 bytes --]

Hi all,

this patch include in /proc/mount the info about which subvolume is mounted 
and which metadata_ratio value is used.

$ cat /proc/mounts
rootfs / rootfs rw 0 0
[...]
/dev/sdc /tmp/t4 btrfs rw,relatime,metadata_ratio=20 0 0
/dev/sdc /mnt/btrfs btrfs rw,relatime,degraded,metadata_ratio=20,subvol=snap-
of-root 0 0

BR
G.Baroncelli

commit 3d7ea7bbd70a66c4d0f369b2879c503b722e8834
Author: ghigo <ghigo@kreijack.homelinux.net>
Date:   Thu Jan 14 20:27:41 2010 +0100

    Add info about metadata_ratio and subvolume name

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;
 }
 



-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijackATinwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2010-01-14 19:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201001142100.00106.kreijack@libero.it \
    --to=kreijack@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --subject='Re: [PATCH] Include subvolume= and metadata_ratio= in /cat/proc' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.