linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] filesystem show need to read from the kernel
Date: Fri, 10 May 2013 19:02:42 +0800	[thread overview]
Message-ID: <1368183764-7865-1-git-send-email-anand.jain@oracle.com> (raw)

(This is a review patch to seek comments and review, not yet
ready for the integration).

The motivation to write this patch is that 'btrfs fi show' 
shows the stale information after the dev del.

So this adds two ioctls to read fsinfo and devinfo from the
kernel and report to the user.

This is done by providing option -k (which reports only
mounted fs and disks) and -K (which reports both mounted/
unmounted-stale fs) from the kernel as shown below.

------
usage: btrfs filesystem show [-k|K] [--all-devices] [<uuid>|<label>]

    Show the structure of a filesystem

    	If no argument is given, structure of all present filesystems is shown
	-K list both mounted and unmounted/stale btrfs as per kernel
	-k list mounted btrfs as known to the kernel.
-----


Anand Jain (1):
  btrfs: add framework to read fs info and dev info from the kernel

 fs/btrfs/super.c           | 87 ++++++++++++++++++++++++++++++++++++++++++----
 fs/btrfs/volumes.c         | 86 ++++++++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/volumes.h         |  2 ++
 include/uapi/linux/btrfs.h | 58 ++++++++++++++++++++++++++++++-
 4 files changed, 225 insertions(+), 8 deletions(-)

Anand Jain (1):
  btrfs-progs: add framework to read fs info and dev info from the
    kernel

 cmds-filesystem.c |  92 ++++++++++++++++++++++++++++++--
 ioctl.h           |  60 ++++++++++++++++++++-
 utils.c           | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 utils.h           |   2 +
 4 files changed, 303 insertions(+), 4 deletions(-)

-- 
1.8.1.227.g44fe835


             reply	other threads:[~2013-05-10 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 11:02 Anand Jain [this message]
2013-05-10 11:02 ` [PATCH] btrfs: add framework to read fs info and dev info from the kernel Anand Jain
2013-05-10 11:02 ` [PATCH] btrfs-progs: " Anand Jain

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=1368183764-7865-1-git-send-email-anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).