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 0/6 v2] btrfs-progs: a structure for the disks scan for btrfs
Date: Thu, 30 May 2013 11:40:20 +0800	[thread overview]
Message-ID: <1369885226-3640-1-git-send-email-anand.jain@oracle.com> (raw)
In-Reply-To: <1368788082-12090-1-git-send-email-anand.jain@oracle.com>

The idea was to introduce /dev/mapper to find for btrfs disk, 
However I found first we need to congregate the disk scan
procedure at a function so it would help to consistently tune
it across the btrfs-progs. As of now both fi show and
dev scan use the disks scan they do it on their own.

So here it would congregate btrfs-disk scans at the function
scan_devs_for_btrfs, adds /dev/mapper to be used to scan
for btrfs, and updates its calling functions and few bug fixes.

v1->v2:
 Rebased on top of David' integration branch origin/integration-20130524

 patch 1 to 5 (below) are made independent of the idea to have the
 /dev/mapper as one of the path to recognize the btrfs disks.
 Which means they can be installed with out having anything
 new. It just adds the framework/improves to integrated a
 /dev/mapper path, which is only done in the patch 6.
 So patch 1 to 5 are safe.
 Also in v1 I suggested that we have -d option instead of
 long option --all-devices which I have dropped that idea
 here in v2.

 Patch 6: adds a new option --mapper to the filesystem show
 and device scan which inturn will use /dev/mapper to scan
 for the btrfs.

 Example output of using the --mapper option is as below..

btrfs filesystem show --mapper
Label: none  uuid: 0a621111-ad84-4d80-842a-dd9c1c60bf51
	Total devices 2 FS bytes used 1.17MB
	devid    1 size 44.99GB used 2.04GB path /dev/mapper/mpathe
	devid    2 size 48.23GB used 2.03GB path /dev/mapper/mpathd

Label: none  uuid: bad9105f-bdc6-4626-9ba7-80bd97aebe19
	Total devices 1 FS bytes used 28.00KB
	devid    1 size 15.00GB used 2.04GB path /dev/mapper/mpathbp1

Btrfs v0.20-rc1-350-g7731651

btrfs device scan --mapper
-----
[1118885.473298] device fsid bad9105f-bdc6-4626-9ba7-80bd97aebe19 devid 1 transid 4 /dev/mapper/mpathbp1
[1118885.474077] device fsid 0a621111-ad84-4d80-842a-dd9c1c60bf51 devid 2 transid 103 /dev/mapper/mpathd
[1118885.474133] device fsid 0a621111-ad84-4d80-842a-dd9c1c60bf51 devid 1 transid 103 /dev/mapper/mpathe
-----

Anand Jain (6):
  btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments
  btrfs-progs: label option in btrfs filesystem show is not coded
  btrfs-progs: update device scan usage
  btrfs-progs: congregate dev scan
  btrfs-progs: btrfs_scan_one_dir not to skip links when /dev/mapper is
    provided
  btrfs-progs: scan /dev/mapper in filesystem show and device scan

 btrfs-find-root.c |  2 +-
 cmds-device.c     | 19 ++++++++++---------
 cmds-filesystem.c | 16 ++++++++--------
 disk-io.c         |  2 +-
 man/btrfs.8.in    | 16 +++++++++-------
 utils.c           | 34 +++++++++++++++++++++++++++++-----
 utils.h           |  9 ++++++---
 7 files changed, 64 insertions(+), 34 deletions(-)

-- 
1.8.1.227.g44fe835


  parent reply	other threads:[~2013-05-30  3:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17 10:54 [PATCH 0/4] a structure for the disks scan for btrfs Anand Jain
2013-05-17 10:54 ` [PATCH 1/4] btrfs-progs: replace filesystem show --all-devices with -d option Anand Jain
2013-05-17 10:54 ` [PATCH 2/4] btrfs-progs: label option in btrfs filesystem show is not coded Anand Jain
2013-05-17 10:54 ` [PATCH 3/4] btrfs-progs: use /dev/mapper to find the btrfs disks Anand Jain
2013-05-17 10:54 ` [PATCH 4/4] btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments Anand Jain
2013-05-17 11:21 ` [PATCH 0/4] a structure for the disks scan for btrfs Gabriel de Perthuis
2013-05-17 11:25   ` Gabriel de Perthuis
2013-05-18  4:35   ` anand jain
2013-05-30  3:40 ` Anand Jain [this message]
2013-05-30  3:40   ` [PATCH 1/6 v2] btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments Anand Jain
2013-05-30  3:40   ` [PATCH 2/6 v2] btrfs-progs: label option in btrfs filesystem show is not coded Anand Jain
2013-05-30  3:40   ` [PATCH 3/6 v2] btrfs-progs: update device scan usage Anand Jain
2013-05-30  3:40   ` [PATCH 4/6 v2] btrfs-progs: congregate dev scan Anand Jain
2013-05-31  8:17     ` [PATCH 4/6 v3] " Anand Jain
2013-05-30  3:40   ` [PATCH 5/6 v2] btrfs-progs: btrfs_scan_one_dir not to skip links when /dev/mapper is provided Anand Jain
2013-05-30  3:40   ` [PATCH 6/6 v2] btrfs-progs: scan /dev/mapper in filesystem show and device scan 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=1369885226-3640-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).