linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] btrfs-progs: device scan use BTRFS_SCAN_LBLKID by default
@ 2013-10-11 11:52 Anand Jain
  2013-10-11 11:52 ` [PATCH 2/2] btrfs-progs: use the marco BTRFS_UPDATE_KERNEL where needed Anand Jain
  0 siblings, 1 reply; 2+ messages in thread
From: Anand Jain @ 2013-10-11 11:52 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba

with this patch, BTRFS_SCAN_LBLKID (which leverages lblkid
to look for btrfs disks) would be the default scan method
to look for the btrfs disks. And thus the output as seen
in the latest btrfs fi show and btrfs fi show -m for the
mounted disks will have the consistent disks path.
(it was inconsistent (across disks) because btrfs dev scan
provided a different path from the mount command eg. below)

    devid    1 size 1.98GiB used 435.00MiB path /dev/mapper/mpatha
    devid    2 size 2.00GiB used 415.00MiB path /dev/dm-1

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cmds-device.c b/cmds-device.c
index 7cfc347..1315918 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -189,7 +189,7 @@ static const char * const cmd_scan_dev_usage[] = {
 static int cmd_scan_dev(int argc, char **argv)
 {
 	int	i, fd, e;
-	int	where = BTRFS_SCAN_PROC;
+	int	where = BTRFS_SCAN_LBLKID;
 	int	devstart = 1;
 
 	if( argc > 1 && !strcmp(argv[1],"--all-devices")){
-- 
1.7.1


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

* [PATCH 2/2] btrfs-progs: use the marco BTRFS_UPDATE_KERNEL where needed
  2013-10-11 11:52 [PATCH 1/2] btrfs-progs: device scan use BTRFS_SCAN_LBLKID by default Anand Jain
@ 2013-10-11 11:52 ` Anand Jain
  0 siblings, 0 replies; 2+ messages in thread
From: Anand Jain @ 2013-10-11 11:52 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dsterba

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-device.c |    2 +-
 utils.c       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmds-device.c b/cmds-device.c
index 1315918..6f32356 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -203,7 +203,7 @@ static int cmd_scan_dev(int argc, char **argv)
 	if(argc<=devstart){
 		int ret;
 		printf("Scanning for Btrfs filesystems\n");
-		ret = scan_for_btrfs(where, 1);
+		ret = scan_for_btrfs(where, BTRFS_UPDATE_KERNEL);
 		if (ret){
 			fprintf(stderr, "ERROR: error %d while scanning\n", ret);
 			return 1;
diff --git a/utils.c b/utils.c
index 2f1d54f..f324147 100644
--- a/utils.c
+++ b/utils.c
@@ -961,7 +961,7 @@ int check_mounted_where(int fd, const char *file, char *where, int size,
 
 	/* scan other devices */
 	if (is_btrfs && total_devs > 1) {
-		if((ret = btrfs_scan_for_fsid(0)))
+		if((ret = btrfs_scan_for_fsid(!BTRFS_UPDATE_KERNEL)))
 			return ret;
 	}
 
-- 
1.7.1


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 11:52 [PATCH 1/2] btrfs-progs: device scan use BTRFS_SCAN_LBLKID by default Anand Jain
2013-10-11 11:52 ` [PATCH 2/2] btrfs-progs: use the marco BTRFS_UPDATE_KERNEL where needed 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).