linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] filesystem show need to read from the kernel
@ 2013-05-10 11:02 Anand Jain
  2013-05-10 11:02 ` [PATCH] btrfs: add framework to read fs info and dev info " Anand Jain
  2013-05-10 11:02 ` [PATCH] btrfs-progs: " Anand Jain
  0 siblings, 2 replies; 3+ messages in thread
From: Anand Jain @ 2013-05-10 11:02 UTC (permalink / raw)
  To: linux-btrfs

(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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-10 11:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 11:02 [PATCH] filesystem show need to read from the kernel Anand Jain
2013-05-10 11:02 ` [PATCH] btrfs: add framework to read fs info and dev info " Anand Jain
2013-05-10 11:02 ` [PATCH] btrfs-progs: " Anand Jain

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).