From patchwork Thu Jan 14 19:59:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 72929 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0EK0BUs028155 for ; Thu, 14 Jan 2010 20:00:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757530Ab0ANUAJ (ORCPT ); Thu, 14 Jan 2010 15:00:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757483Ab0ANUAJ (ORCPT ); Thu, 14 Jan 2010 15:00:09 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:49023 "EHLO mail-fx0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756598Ab0ANUAI (ORCPT ); Thu, 14 Jan 2010 15:00:08 -0500 Received: by fxm25 with SMTP id 25so448115fxm.21 for ; Thu, 14 Jan 2010 12:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:mime-version:content-type:content-transfer-encoding :message-id; bh=2ezOI8flCLtpXbNWr6jViQlf8fm+yheqjMZUaFOwy2Q=; b=dzG6mMojrCDaZTkdVoXbpCQ8wE+neJKtOj3CCTDTNruA9Erv54UnlKpsasv50XDfPi EkD83o9W32cE0z5ZLXpsVx5b24zCrZ22xb0VwZwqXsn4wM8VjDl5qlkwWblZlJZhSJI2 OkkmEt962SyAwBioOtTKiEmZeUUH9lJhOrFhU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; b=vrEeXkd5n2TNqxzLa0W3avkBGdkR6xvZ/Jw2J+W1R1Enp42tX9AohEUVH36lXbvDLm lmm9+zJRVGSOlFQrUwSvzviOoJvLn/hNpSR8IlpqhtUmAOIOVFNhnP1jU1PqYjXxP+lC 1I86zZMRG087PULV0/TaEXNArtuSMMtVj5Q7U= Received: by 10.216.88.143 with SMTP id a15mr453427wef.206.1263499206571; Thu, 14 Jan 2010 12:00:06 -0800 (PST) Received: from venice.localnet ([87.19.231.147]) by mx.google.com with ESMTPS id 5sm1462125eyf.4.2010.01.14.12.00.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 14 Jan 2010 12:00:05 -0800 (PST) From: Goffredo Baroncelli 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 User-Agent: KMail/1.13.0 (Linux/2.6.32-10-generic; KDE/4.3.90; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201001142100.00106.kreijack@libero.it> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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; }