All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command
@ 2014-12-17 20:14 Goffredo Baroncelli
  2014-12-17 20:14 ` [PATCH 1/8] Add -v -q switches to mkfs.btrfs Goffredo Baroncelli
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs


Hi All,

enclosed a patches set to improve the output of mkfs.btrfs command.

Currently I find the output of mkfs.btrfs command quite confusing:

  -- cut -- cut --
# mkfs.btrfs -f -M -d raid5 -m raid5 /dev/vd[b-k] 

Btrfs v3.17
See http://btrfs.wiki.kernel.org for more information.

Turning ON incompat feature 'mixed-bg': mixed data and metadata block groups
Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
Turning ON incompat feature 'raid56': raid56 extended format
Created a data/metadata chunk of size 8388608
adding device /dev/vdc id 2
adding device /dev/vdd id 3
adding device /dev/vde id 4
adding device /dev/vdf id 5
adding device /dev/vdg id 6
adding device /dev/vdh id 7
adding device /dev/vdi id 8
adding device /dev/vdj id 9
adding device /dev/vdk id 10
fs created label (null) on /dev/vdb
	nodesize 4096 leafsize 4096 sectorsize 4096 size 356.01GiB
  -- cut -- cut --

After my patches the output becomes:
  -- cut -- cut --

# mkfs.btrfs -L btrfs-test -f -M -m raid5 -d raid5 /dev/vd[b-k]"
BTRFS filesystem summary:
  Label:		btrfs-test
  UUID:			4409e381-f066-4e7b-af74-b6525fefa08b

  Node size:		4096
  Leaf size:		4096
  Sector size:		4096
  Initial chunks:
    Data+Metadata:	9.01GiB
    System:		18.06MiB
  Metadata profile:	RAID5
  Data profile:		RAID5
  Mixed mode:		YES
  SSD detected:		NO
  Incompat features:	mixed-bg, extref, raid56
  Number of devices:	10
    UUID                                  ID    SIZE    PATH
    ------------------------------------  --  --------- -----------
    907a3722-5d3e-4ee8-9cf1-e0e31c5edea7   1   50.00GiB /dev/vdb
    2517a387-e060-46d1-9be7-9535802333c7   2   50.00GiB /dev/vdc
    763dbe5e-8b16-4330-8730-8b60e245056b   3   50.00GiB /dev/vdd
    180abbc2-4426-4f9c-a711-7735e19536d4   4   50.00GiB /dev/vde
    666799fd-0413-42ce-bac4-a96e3e855ea2   5   50.00GiB /dev/vdf
    a6af3e09-8469-4e57-9fa0-9d82e6c8faf1   6   50.00GiB /dev/vdg
    e2b8a73e-2e37-4eb8-a8cb-71721a96b358   7   50.00GiB /dev/vdh
    3fa65e67-88f6-48cc-9292-9336220e19a8   8    2.00GiB /dev/vdi
    5a238ef4-e143-4b84-b698-347a1ceb7aa7   9    2.00GiB /dev/vdj
    9794c5b4-8a9e-40d0-9774-b672034ef22b  10    2.00GiB /dev/vdk

  Total devices size:                         356.01GiB


  -- cut -- cut --
Each information is in its own row. The devices are listed with more
information (disk uuid, id, size of each devices...)
Nodesize, Leafsize, Sectorsize are separated by the filesystem size.

The metadata/data profile are displayed (before this information was missed).
Also the size of the data/metadata/system chunk are displayed.


These changes are also available via github
	https://github.com/kreijack/btrfs-progs
branch
	mkfs-verbose

Changelog:
v1: first issue (as RFC)
v2: replaced "disks" with "devices" (suggested by Duncan)
    replaced "Feature" with "Incompat features" (suggested by Satoru)
    updated the comment of the documentation patch (suggested by Duncan)
    removed a duplicate "-q" in the documentation patch (suggested by Duncan)
    split the patch #6 in #6 and #7 to simplify the reading and review

BR
G.Baroncelli

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-

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

* [PATCH 1/8] Add -v -q switches to mkfs.btrfs.
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-25  1:19   ` Satoru Takeuchi
  2014-12-17 20:14 ` [PATCH 2/8] Move group_profile_str() in utils.c Goffredo Baroncelli
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

Add -v -q switches to mkfs.btrfs, to control the verbosity of mkfs.btrfs.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 mkfs.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/mkfs.c b/mkfs.c
index e10e62d..a5f19cc 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -288,8 +288,10 @@ static void print_usage(void)
 	fprintf(stderr, "\t -r --rootdir the source directory\n");
 	fprintf(stderr, "\t -K --nodiscard do not perform whole device TRIM\n");
 	fprintf(stderr, "\t -O --features comma separated list of filesystem features\n");
+	fprintf(stderr, "\t -q --quiet enable quiet mode\n");
 	fprintf(stderr, "\t -U --uuid specify the filesystem UUID\n");
 	fprintf(stderr, "\t -V --version print the mkfs.btrfs version and exit\n");
+	fprintf(stderr, "\t -v --verbose enable verbose mode\n");
 	fprintf(stderr, "%s\n", BTRFS_BUILD_VERSION);
 	exit(1);
 }
@@ -351,6 +353,8 @@ static struct option long_options[] = {
 	{ "version", 0, NULL, 'V' },
 	{ "rootdir", 1, NULL, 'r' },
 	{ "nodiscard", 0, NULL, 'K' },
+	{ "verbose", 0, NULL, 'v' },
+	{ "quiet", 0, NULL, 'q' },
 	{ "features", 1, NULL, 'O' },
 	{ "uuid", required_argument, NULL, 'U' },
 	{ NULL, 0, NULL, 0}
@@ -998,7 +1002,7 @@ out:
  * This ignores symlinks with unreadable targets and subdirs that can't
  * be read.  It's a best-effort to give a rough estimate of the size of
  * a subdir.  It doesn't guarantee that prepopulating btrfs from this
- * tree won't still run out of space. 
+ * tree won't still run out of space.
  *
  * The rounding up to 4096 is questionable.  Previous code used du -B 4096.
  */
@@ -1266,6 +1270,8 @@ int main(int ac, char **av)
 	int discard = 1;
 	int ssd = 0;
 	int force_overwrite = 0;
+	int verbose = 0;
+	int quiet = 0;
 
 	char *source_dir = NULL;
 	int source_dir_set = 0;
@@ -1280,7 +1286,7 @@ int main(int ac, char **av)
 
 	while(1) {
 		int c;
-		c = getopt_long(ac, av, "A:b:fl:n:s:m:d:L:O:r:U:VMK",
+		c = getopt_long(ac, av, "A:b:fl:n:s:m:d:L:O:r:U:VMKqv",
 				long_options, &option_index);
 		if (c < 0)
 			break;
@@ -1355,6 +1361,12 @@ int main(int ac, char **av)
 			case 'K':
 				discard = 0;
 				break;
+			case 'v':
+				verbose = 1;
+				break;
+			case 'q':
+				quiet = 1;
+				break;
 			default:
 				print_usage();
 		}
-- 
2.1.3


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

* [PATCH 2/8] Move group_profile_str() in utils.c
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
  2014-12-17 20:14 ` [PATCH 1/8] Add -v -q switches to mkfs.btrfs Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-25  1:20   ` Satoru Takeuchi
  2014-12-17 20:14 ` [PATCH 3/8] Add verbose option to btrfs_add_to_fsid() Goffredo Baroncelli
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

This is a preparation patch.
Move the group_profile_str() function from cmds-filesystem.c to utils.c
to be re-used from other modules (in this case from mkfs.c)

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 cmds-filesystem.c | 22 ----------------------
 utils.c           | 22 ++++++++++++++++++++++
 utils.h           |  2 ++
 3 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 253f105..d1afeba 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -157,28 +157,6 @@ static char *group_type_str(u64 flag)
 	}
 }
 
-static char *group_profile_str(u64 flag)
-{
-	switch (flag & BTRFS_BLOCK_GROUP_PROFILE_MASK) {
-	case 0:
-		return "single";
-	case BTRFS_BLOCK_GROUP_RAID0:
-		return "RAID0";
-	case BTRFS_BLOCK_GROUP_RAID1:
-		return "RAID1";
-	case BTRFS_BLOCK_GROUP_RAID5:
-		return "RAID5";
-	case BTRFS_BLOCK_GROUP_RAID6:
-		return "RAID6";
-	case BTRFS_BLOCK_GROUP_DUP:
-		return "DUP";
-	case BTRFS_BLOCK_GROUP_RAID10:
-		return "RAID10";
-	default:
-		return "unknown";
-	}
-}
-
 static int get_df(int fd, struct btrfs_ioctl_space_args **sargs_ret)
 {
 	u64 count = 0;
diff --git a/utils.c b/utils.c
index 2a92416..19049bb 100644
--- a/utils.c
+++ b/utils.c
@@ -2450,3 +2450,25 @@ int find_next_key(struct btrfs_path *path, struct btrfs_key *key)
 	}
 	return 1;
 }
+
+char *group_profile_str(u64 flag)
+{
+	switch (flag & BTRFS_BLOCK_GROUP_PROFILE_MASK) {
+	case 0:
+		return "single";
+	case BTRFS_BLOCK_GROUP_RAID0:
+		return "RAID0";
+	case BTRFS_BLOCK_GROUP_RAID1:
+		return "RAID1";
+	case BTRFS_BLOCK_GROUP_RAID5:
+		return "RAID5";
+	case BTRFS_BLOCK_GROUP_RAID6:
+		return "RAID6";
+	case BTRFS_BLOCK_GROUP_DUP:
+		return "DUP";
+	case BTRFS_BLOCK_GROUP_RAID10:
+		return "RAID10";
+	default:
+		return "unknown";
+	}
+}
diff --git a/utils.h b/utils.h
index 289e86b..bb8a449 100644
--- a/utils.h
+++ b/utils.h
@@ -161,4 +161,6 @@ static inline u64 btrfs_min_dev_size(u32 leafsize)
 
 int find_next_key(struct btrfs_path *path, struct btrfs_key *key);
 
+char *group_profile_str(u64 flag);
+
 #endif
-- 
2.1.3


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

* [PATCH 3/8] Add verbose option to btrfs_add_to_fsid()
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
  2014-12-17 20:14 ` [PATCH 1/8] Add -v -q switches to mkfs.btrfs Goffredo Baroncelli
  2014-12-17 20:14 ` [PATCH 2/8] Move group_profile_str() in utils.c Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-25  1:28   ` Satoru Takeuchi
  2014-12-17 20:14 ` [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path Goffredo Baroncelli
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

Add verbose option to btrfs_add_to_fsid() in order to avoid to print
the information to console when not needed.
The same information is print in the summary of the mkfs.btrfs command.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 mkfs.c  | 3 ++-
 utils.c | 7 ++++---
 utils.h | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/mkfs.c b/mkfs.c
index a5f19cc..042d12e 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1638,7 +1638,8 @@ int main(int ac, char **av)
 		mixed = old_mixed;
 
 		ret = btrfs_add_to_fsid(trans, root, fd, file, dev_block_count,
-					sectorsize, sectorsize, sectorsize);
+					sectorsize, sectorsize, sectorsize,
+					verbose);
 		BUG_ON(ret);
 		btrfs_register_one_device(file);
 	}
diff --git a/utils.c b/utils.c
index 19049bb..dcb4f74 100644
--- a/utils.c
+++ b/utils.c
@@ -610,7 +610,7 @@ static int zero_dev_clamped(int fd, off_t start, ssize_t len, u64 dev_size)
 int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
 		      struct btrfs_root *root, int fd, char *path,
 		      u64 block_count, u32 io_width, u32 io_align,
-		      u32 sectorsize)
+		      u32 sectorsize, int verbose)
 {
 	struct btrfs_super_block *disk_super;
 	struct btrfs_super_block *super = root->fs_info->super_copy;
@@ -659,8 +659,9 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
 
 	memcpy(disk_super, super, sizeof(*disk_super));
 
-	printf("adding device %s id %llu\n", path,
-	       (unsigned long long)device->devid);
+	if (verbose)
+		printf("adding device %s id %llu\n", path,
+		       (unsigned long long)device->devid);
 
 	btrfs_set_super_bytenr(disk_super, BTRFS_SUPER_INFO_OFFSET);
 	btrfs_set_stack_device_id(dev_item, device->devid);
diff --git a/utils.h b/utils.h
index bb8a449..9218199 100644
--- a/utils.h
+++ b/utils.h
@@ -79,7 +79,7 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret,
 int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
 		      struct btrfs_root *root, int fd, char *path,
 		      u64 block_count, u32 io_width, u32 io_align,
-		      u32 sectorsize);
+		      u32 sectorsize, int verbose);
 int btrfs_scan_for_fsid(int run_ioctls);
 int btrfs_register_one_device(const char *fname);
 int btrfs_register_all_devices(void);
-- 
2.1.3


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

* [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path.
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (2 preceding siblings ...)
  2014-12-17 20:14 ` [PATCH 3/8] Add verbose option to btrfs_add_to_fsid() Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-25  1:29   ` Satoru Takeuchi
  2014-12-17 20:14 ` [PATCH 5/8] Return the fsid from make_btrfs() Goffredo Baroncelli
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

When creating a new btrfs_device, copy the path to track it.
This path is then used by mkfs.btrfs to list all devices.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utils.c b/utils.c
index dcb4f74..3f50e4d 100644
--- a/utils.c
+++ b/utils.c
@@ -647,6 +647,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
 	device->bytes_used = 0;
 	device->total_ios = 0;
 	device->dev_root = root->fs_info->dev_root;
+	device->name = strdup(path);
 
 	ret = btrfs_add_device(trans, root, device);
 	BUG_ON(ret);
-- 
2.1.3


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

* [PATCH 5/8] Return the fsid from make_btrfs()
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (3 preceding siblings ...)
  2014-12-17 20:14 ` [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-25  2:44   ` Satoru Takeuchi
  2014-12-17 20:14 ` [PATCH 6/8] Track the size of the chunk created Goffredo Baroncelli
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

The function make_btrfs() has as argument the fsid of the filesystem.
If this fsid is empty or null make_btrfs() generates a new fsid. However
If the buffer is valid (but the string is empty) the generated fsid is
copied back to the caller.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 mkfs.c  | 7 ++++---
 utils.c | 7 ++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/mkfs.c b/mkfs.c
index 042d12e..70c88ea 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1281,7 +1281,7 @@ int main(int ac, char **av)
 	int dev_cnt = 0;
 	int saved_optind;
 	char estr[100];
-	char *fs_uuid = NULL;
+	char fs_uuid[BTRFS_UUID_UNPARSED_SIZE] = { 0 };
 	u64 features = DEFAULT_MKFS_FEATURES;
 
 	while(1) {
@@ -1356,7 +1356,8 @@ int main(int ac, char **av)
 				source_dir_set = 1;
 				break;
 			case 'U':
-				fs_uuid = optarg;
+				strncpy(fs_uuid,optarg,
+					BTRFS_UUID_UNPARSED_SIZE - 1);
 				break;
 			case 'K':
 				discard = 0;
@@ -1387,7 +1388,7 @@ int main(int ac, char **av)
 		exit(1);
 	}
 
-	if (fs_uuid) {
+	if (*fs_uuid) {
 		uuid_t dummy_uuid;
 
 		if (uuid_parse(fs_uuid, dummy_uuid) != 0) {
diff --git a/utils.c b/utils.c
index 3f50e4d..c7f1b2f 100644
--- a/utils.c
+++ b/utils.c
@@ -203,7 +203,7 @@ int make_btrfs(int fd, const char *device, const char *label, char *fs_uuid,
 	memset(&super, 0, sizeof(super));
 
 	num_bytes = (num_bytes / sectorsize) * sectorsize;
-	if (fs_uuid) {
+	if (fs_uuid && *fs_uuid) {
 		if (uuid_parse(fs_uuid, super.fsid) != 0) {
 			fprintf(stderr, "could not parse UUID: %s\n", fs_uuid);
 			ret = -EINVAL;
@@ -216,6 +216,11 @@ int make_btrfs(int fd, const char *device, const char *label, char *fs_uuid,
 		}
 	} else {
 		uuid_generate(super.fsid);
+		/*
+		 * if the fs_uuid is a valid pointer, return the generated uuid
+		 */
+		if (fs_uuid)
+			uuid_unparse(super.fsid, fs_uuid);
 	}
 	uuid_generate(super.dev_item.uuid);
 	uuid_generate(chunk_tree_uuid);
-- 
2.1.3


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

* [PATCH 6/8] Track the size of the chunk created
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (4 preceding siblings ...)
  2014-12-17 20:14 ` [PATCH 5/8] Return the fsid from make_btrfs() Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-17 20:14 ` [PATCH 7/8] Print the summary Goffredo Baroncelli
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

Track the size of the chunk during the filesystem creation. These information
are printed in a next patch.

Signed-off-by: Goffredo Baroncelli
---
 mkfs.c | 54 +++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 43 insertions(+), 11 deletions(-)

diff --git a/mkfs.c b/mkfs.c
index 70c88ea..2d7b2ca 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -57,7 +57,16 @@ struct directory_name_entry {
 	struct list_head list;
 };
 
-static int make_root_dir(struct btrfs_root *root, int mixed)
+struct block_group_allocation {
+	u64 data;
+	u64 metadata;
+	u64 mixed;
+	u64 system;
+};
+
+
+static int make_root_dir(struct btrfs_root *root, int mixed,
+				struct block_group_allocation *allocation)
 {
 	struct btrfs_trans_handle *trans;
 	struct btrfs_key location;
@@ -74,6 +83,7 @@ static int make_root_dir(struct btrfs_root *root, int mixed)
 				     BTRFS_BLOCK_GROUP_SYSTEM,
 				     BTRFS_FIRST_CHUNK_TREE_OBJECTID,
 				     0, BTRFS_MKFS_SYSTEM_GROUP_SIZE);
+	allocation->system += BTRFS_MKFS_SYSTEM_GROUP_SIZE;
 	BUG_ON(ret);
 
 	if (mixed) {
@@ -92,8 +102,8 @@ static int make_root_dir(struct btrfs_root *root, int mixed)
 					     BTRFS_BLOCK_GROUP_DATA,
 					     BTRFS_FIRST_CHUNK_TREE_OBJECTID,
 					     chunk_start, chunk_size);
+		allocation->mixed += chunk_size;
 		BUG_ON(ret);
-		printf("Created a data/metadata chunk of size %llu\n", chunk_size);
 	} else {
 		ret = btrfs_alloc_chunk(trans, root->fs_info->extent_root,
 					&chunk_start, &chunk_size,
@@ -107,6 +117,7 @@ static int make_root_dir(struct btrfs_root *root, int mixed)
 					     BTRFS_BLOCK_GROUP_METADATA,
 					     BTRFS_FIRST_CHUNK_TREE_OBJECTID,
 					     chunk_start, chunk_size);
+		allocation->metadata += chunk_size;
 		BUG_ON(ret);
 	}
 
@@ -128,6 +139,7 @@ static int make_root_dir(struct btrfs_root *root, int mixed)
 					     BTRFS_BLOCK_GROUP_DATA,
 					     BTRFS_FIRST_CHUNK_TREE_OBJECTID,
 					     chunk_start, chunk_size);
+		allocation->data += chunk_size;
 		BUG_ON(ret);
 	}
 
@@ -187,7 +199,9 @@ static void recow_roots(struct btrfs_trans_handle *trans,
 }
 
 static int create_one_raid_group(struct btrfs_trans_handle *trans,
-			      struct btrfs_root *root, u64 type)
+			      struct btrfs_root *root, u64 type,
+			      struct block_group_allocation *allocation)
+
 {
 	u64 chunk_start;
 	u64 chunk_size;
@@ -203,6 +217,18 @@ static int create_one_raid_group(struct btrfs_trans_handle *trans,
 	ret = btrfs_make_block_group(trans, root->fs_info->extent_root, 0,
 				     type, BTRFS_FIRST_CHUNK_TREE_OBJECTID,
 				     chunk_start, chunk_size);
+	if ((type & BTRFS_BLOCK_GROUP_TYPE_MASK) == BTRFS_BLOCK_GROUP_DATA)
+		allocation->data += chunk_size;
+	else if ((type & BTRFS_BLOCK_GROUP_TYPE_MASK) == BTRFS_BLOCK_GROUP_METADATA)
+		allocation->metadata += chunk_size;
+	else if ((type & BTRFS_BLOCK_GROUP_TYPE_MASK) == BTRFS_BLOCK_GROUP_SYSTEM)
+		allocation->system += chunk_size;
+	else if ((type & BTRFS_BLOCK_GROUP_TYPE_MASK) ==
+			(BTRFS_BLOCK_GROUP_METADATA|BTRFS_BLOCK_GROUP_DATA))
+		allocation->mixed += chunk_size;
+	else
+		BUG_ON(1);
+
 	BUG_ON(ret);
 	return ret;
 }
@@ -210,7 +236,8 @@ static int create_one_raid_group(struct btrfs_trans_handle *trans,
 static int create_raid_groups(struct btrfs_trans_handle *trans,
 			      struct btrfs_root *root, u64 data_profile,
 			      int data_profile_opt, u64 metadata_profile,
-			      int mixed)
+			      int mixed,
+			      struct block_group_allocation *allocation)
 {
 	u64 num_devices = btrfs_super_num_devices(root->fs_info->super_copy);
 	int ret;
@@ -220,21 +247,21 @@ static int create_raid_groups(struct btrfs_trans_handle *trans,
 
 		ret = create_one_raid_group(trans, root,
 					    BTRFS_BLOCK_GROUP_SYSTEM |
-					    metadata_profile);
+					    metadata_profile, allocation);
 		BUG_ON(ret);
 
 		if (mixed)
 			meta_flags |= BTRFS_BLOCK_GROUP_DATA;
 
 		ret = create_one_raid_group(trans, root, meta_flags |
-					    metadata_profile);
+					    metadata_profile, allocation);
 		BUG_ON(ret);
 
 	}
 	if (!mixed && num_devices > 1 && data_profile) {
 		ret = create_one_raid_group(trans, root,
 					    BTRFS_BLOCK_GROUP_DATA |
-					    data_profile);
+					    data_profile, allocation);
 		BUG_ON(ret);
 	}
 	recow_roots(trans, root);
@@ -920,7 +947,8 @@ static int open_target(char *output_name)
 
 static int create_chunks(struct btrfs_trans_handle *trans,
 			 struct btrfs_root *root, u64 num_of_meta_chunks,
-			 u64 size_of_data)
+			 u64 size_of_data,
+			 struct block_group_allocation *allocation)
 {
 	u64 chunk_start;
 	u64 chunk_size;
@@ -937,6 +965,7 @@ static int create_chunks(struct btrfs_trans_handle *trans,
 		ret = btrfs_make_block_group(trans, root->fs_info->extent_root, 0,
 					     meta_type, BTRFS_FIRST_CHUNK_TREE_OBJECTID,
 					     chunk_start, chunk_size);
+		allocation->metadata += chunk_size;
 		BUG_ON(ret);
 		set_extent_dirty(&root->fs_info->free_space_cache,
 				 chunk_start, chunk_start + chunk_size - 1, 0);
@@ -951,6 +980,7 @@ static int create_chunks(struct btrfs_trans_handle *trans,
 	ret = btrfs_make_block_group(trans, root->fs_info->extent_root, 0,
 				     data_type, BTRFS_FIRST_CHUNK_TREE_OBJECTID,
 				     chunk_start, size_of_data);
+	allocation->data += size_of_data;
 	BUG_ON(ret);
 	set_extent_dirty(&root->fs_info->free_space_cache,
 			 chunk_start, chunk_start + size_of_data - 1, 0);
@@ -1283,6 +1313,7 @@ int main(int ac, char **av)
 	char estr[100];
 	char fs_uuid[BTRFS_UUID_UNPARSED_SIZE] = { 0 };
 	u64 features = DEFAULT_MKFS_FEATURES;
+	struct block_group_allocation allocation = { 0 };
 
 	while(1) {
 		int c;
@@ -1593,7 +1624,7 @@ int main(int ac, char **av)
 	}
 	root->fs_info->alloc_start = alloc_start;
 
-	ret = make_root_dir(root, mixed);
+	ret = make_root_dir(root, mixed, &allocation);
 	if (ret) {
 		fprintf(stderr, "failed to setup the root directory\n");
 		exit(1);
@@ -1649,7 +1680,7 @@ raid_groups:
 	if (!source_dir_set) {
 		ret = create_raid_groups(trans, root, data_profile,
 				 data_profile_opt, metadata_profile,
-				 mixed);
+				 mixed, &allocation);
 		BUG_ON(ret);
 	}
 
@@ -1666,7 +1697,8 @@ raid_groups:
 	if (source_dir_set) {
 		trans = btrfs_start_transaction(root, 1);
 		ret = create_chunks(trans, root,
-				    num_of_meta_chunks, size_of_data);
+				    num_of_meta_chunks, size_of_data,
+				    &allocation);
 		BUG_ON(ret);
 		btrfs_commit_transaction(trans, root);
 
-- 
2.1.3


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

* [PATCH 7/8] Print the summary
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (5 preceding siblings ...)
  2014-12-17 20:14 ` [PATCH 6/8] Track the size of the chunk created Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-17 20:14 ` [PATCH 8/8] Add -v and -q switches in the mkfs.btrfs man page Goffredo Baroncelli
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

This patch prints the summary of the filesystem after the creation.
The main fileds printed are:
- devices list with their uuid, devid, path and size
- raid profile (dup,single,raid0...)
- leafsize/nodesize/sectorsize
- filesystem features (raid56, extref, mixed-bg)
- chunk size and type

If the '-v' switched is passed, the output is more verbose; if the '-q'
switched is passed, only the errors are printed.


Below an example:

#mkfs.btrfs -L btrfs-test -f -M -m raid5 -d raid5 /dev/vd[b-k]"
BTRFS filesystem summary:
  Label:		btrfs-test
  UUID:			14ae8a88-98ac-4f22-8441-79f76ec622f7

  Node size:		4096
  Leaf size:		4096
  Sector size:		4096
  Initial chunks:
    Data+Metadata:	9.01GiB
    System:		18.06MiB
  Metadata profile:	RAID5
  Data profile:		RAID5
  Mixed mode:		YES
  SSD detected:		NO
  Incompat features:	mixed-bg, extref, raid56
  Number of devices:	10
    UUID                                  ID    SIZE    PATH
    ------------------------------------  --  --------- -----------
    df1c7f50-1980-4da2-8bc9-7ee6ffb0b554   1   50.00GiB /dev/vdb
    32c808a0-cd7b-4497-a2c0-1d77a9854af9   2   50.00GiB /dev/vdc
    3159782e-d108-40bc-9e15-090ecac160b4   3   50.00GiB /dev/vdd
    db7eaf0c-beb8-4093-a9d0-b9c25c146305   4   50.00GiB /dev/vde
    c367ca04-1f71-49c0-a331-11fc0b87e9fc   5   50.00GiB /dev/vdf
    e9b73c86-4058-4b3a-90ac-18741a276e70   6   50.00GiB /dev/vdg
    c4298b7a-ad41-4690-bf10-bf748b319413   7   50.00GiB /dev/vdh
    1cf048c8-af8a-4225-b09a-5d12e9b217fa   8    2.00GiB /dev/vdi
    7e157869-768a-4725-bad5-82e6bd05fd17   9    2.00GiB /dev/vdj
    2c9431ac-c7f0-45a5-8529-cef8cf6e4033  10    2.00GiB /dev/vdk

  Total devices size:                         356.01GiB


Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 mkfs.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 87 insertions(+), 12 deletions(-)

diff --git a/mkfs.c b/mkfs.c
index 2d7b2ca..30a79df 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1251,6 +1251,21 @@ static void process_fs_features(u64 flags)
 	}
 }
 
+static void print_fs_features(u64 flags)
+{
+	int i;
+	int first = 1;
+
+	for (i = 0; i < ARRAY_SIZE(mkfs_features); i++) {
+		if (flags & mkfs_features[i].flag) {
+			if (!first)
+				printf(", %s",mkfs_features[i].name);
+			else
+				printf("%s",mkfs_features[i].name);
+			first=0;
+		}
+	}
+}
 
 /*
  * Return NULL if all features were parsed fine, otherwise return the name of
@@ -1271,13 +1286,43 @@ static char* parse_fs_features(char *namelist, u64 *flags)
 	return NULL;
 }
 
+static void list_all_devices(struct btrfs_root *root)
+{
+	struct btrfs_fs_devices *fs_devices;
+	struct btrfs_device *device;
+	int number_of_devices = 0;
+	u64 total_block_count = 0;
+
+	fs_devices = root->fs_info->fs_devices;
+
+	list_for_each_entry(device, &fs_devices->devices, dev_list)
+		number_of_devices++;
+
+	printf("  Number of devices:\t%d\n", number_of_devices);
+	printf("    UUID                                  ID    SIZE    PATH\n");
+	printf("    ------------------------------------  --  --------- -----------\n");
+	list_for_each_entry_reverse(device, &fs_devices->devices, dev_list) {
+		char dev_uuid[BTRFS_UUID_UNPARSED_SIZE];
+
+		uuid_unparse(device->uuid, dev_uuid);
+		printf("    %s %3llu %10s %s\n",
+			dev_uuid, device->devid,
+			pretty_size(device->total_bytes),
+			device->name);
+		total_block_count += device->total_bytes;
+	}
+
+	printf("\n");
+	printf("  Total devices size:                        %10s\n",
+		pretty_size(total_block_count));
+}
+
 int main(int ac, char **av)
 {
 	char *file;
 	struct btrfs_root *root;
 	struct btrfs_trans_handle *trans;
 	char *label = NULL;
-	char *first_file;
 	u64 block_count = 0;
 	u64 dev_block_count = 0;
 	u64 blocks[7];
@@ -1532,9 +1577,11 @@ int main(int ac, char **av)
 		exit(1);
 	}
 
-	/* if we are here that means all devs are good to btrfsify */
-	printf("%s\n", BTRFS_BUILD_VERSION);
-	printf("See http://btrfs.wiki.kernel.org for more information.\n\n");
+	if (verbose) {
+		/* if we are here that means all devs are good to btrfsify */
+		printf("%s\n", BTRFS_BUILD_VERSION);
+		printf("See http://btrfs.wiki.kernel.org for more information.\n\n");
+	}
 
 	dev_cnt--;
 
@@ -1550,7 +1597,6 @@ int main(int ac, char **av)
 				strerror(errno));
 			exit(1);
 		}
-		first_file = file;
 		ret = btrfs_prepare_device(fd, file, zero_end, &dev_block_count,
 					   block_count, &mixed, discard);
 		if (ret) {
@@ -1568,7 +1614,6 @@ int main(int ac, char **av)
 			exit(1);
 		}
 
-		first_file = file;
 		source_dir_size = size_sourcedir(source_dir, sectorsize,
 					     &num_of_meta_chunks, &size_of_data);
 		if(block_count < source_dir_size)
@@ -1606,7 +1651,8 @@ int main(int ac, char **av)
 		features |= BTRFS_FEATURE_INCOMPAT_RAID56;
 	}
 
-	process_fs_features(features);
+	if (verbose)
+		process_fs_features(features);
 
 	ret = make_btrfs(fd, file, label, fs_uuid, blocks, dev_block_count,
 			 nodesize, leafsize,
@@ -1687,11 +1733,6 @@ raid_groups:
 	ret = create_data_reloc_tree(trans, root);
 	BUG_ON(ret);
 
-	printf("fs created label %s on %s\n\tnodesize %u leafsize %u "
-	    "sectorsize %u size %s\n",
-	    label, first_file, nodesize, leafsize, sectorsize,
-	    pretty_size(btrfs_super_total_bytes(root->fs_info->super_copy)));
-
 	btrfs_commit_transaction(trans, root);
 
 	if (source_dir_set) {
@@ -1706,6 +1747,40 @@ raid_groups:
 		BUG_ON(ret);
 	}
 
+	if (!quiet) {
+		printf("BTRFS filesystem summary:\n");
+		printf("  Label:\t\t%s\n", label);
+		printf("  UUID:\t\t\t%s\n", fs_uuid);
+		printf("\n");
+
+		printf("  Node size:\t\t%u\n", nodesize);
+		printf("  Leaf size:\t\t%u\n", leafsize);
+		printf("  Sector size:\t\t%u\n", sectorsize);
+		printf("  Initial chunks:\n");
+		if (allocation.data)
+			printf("    Data:\t\t%s\n",
+				pretty_size(allocation.data));
+		if (allocation.metadata)
+			printf("    Metadata:\t\t%s\n",
+				pretty_size(allocation.metadata));
+		if (allocation.mixed)
+			printf("    Data+Metadata:\t%s\n",
+				pretty_size(allocation.mixed));
+		printf("    System:\t\t%s\n",
+			pretty_size(allocation.system));
+		printf("  Metadata profile:\t%s\n",
+			group_profile_str(metadata_profile));
+		printf("  Data profile:\t\t%s\n",
+			group_profile_str(data_profile));
+		printf("  Mixed mode:\t\t%s\n", mixed ? "YES" : "NO");
+		printf("  SSD detected:\t\t%s\n", ssd ? "YES" : "NO");
+		printf("  Incompat features:\t");
+		print_fs_features(features);
+		printf("\n");
+
+		list_all_devices(root);
+	}
+
 	ret = close_ctree(root);
 	BUG_ON(ret);
 	free(label);
-- 
2.1.3


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

* [PATCH 8/8] Add -v and -q switches in the mkfs.btrfs man page
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (6 preceding siblings ...)
  2014-12-17 20:14 ` [PATCH 7/8] Print the summary Goffredo Baroncelli
@ 2014-12-17 20:14 ` Goffredo Baroncelli
  2014-12-17 22:38 ` [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Martin Steigerwald
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-17 20:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goffredo Baroncelli

Add -v and -q switches to the mkfs.btrfs man page. These information
will be printed by a next patch in the summary.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 Documentation/mkfs.btrfs.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/mkfs.btrfs.txt b/Documentation/mkfs.btrfs.txt
index ba7e42b..67b546a 100644
--- a/Documentation/mkfs.btrfs.txt
+++ b/Documentation/mkfs.btrfs.txt
@@ -21,9 +21,11 @@ $$[-s|--sectorsize <sectorsize>]$$
 $$[-r|--rootdir <rootdir>]$$
 $$[-K|--nodiscard]$$
 $$[-O|--features <feature1>[,<feature2>...]]$$
+$$[-q|--quiet]$$
 $$[-U|--uuid <UUID>]$$
 $$[-h]$$
 $$[-V|--version]$$
+$$[-v|--verbose]$$
 $$<device> [<device>...]$$
 
 DESCRIPTION
@@ -120,6 +122,12 @@ the system.
 -V|--version::
 Print the *mkfs.btrfs* version and exit.
 
+-v|--verbose::
+Increase the verbosity of the command.
+
+-q|--quiet::
+Print only the errors.
+
 -h::
 Print help.
 
-- 
2.1.3


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

* Re: [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (7 preceding siblings ...)
  2014-12-17 20:14 ` [PATCH 8/8] Add -v and -q switches in the mkfs.btrfs man page Goffredo Baroncelli
@ 2014-12-17 22:38 ` Martin Steigerwald
  2014-12-18  2:28 ` Anand Jain
  2015-03-23 23:46 ` David Sterba
  10 siblings, 0 replies; 19+ messages in thread
From: Martin Steigerwald @ 2014-12-17 22:38 UTC (permalink / raw)
  To: Goffredo Baroncelli; +Cc: linux-btrfs

Am Mittwoch, 17. Dezember 2014, 21:14:04 schrieb Goffredo Baroncelli:
> # mkfs.btrfs -L btrfs-test -f -M -m raid5 -d raid5 /dev/vd[b-k]"
> BTRFS filesystem summary:
>   Label:                btrfs-test
>   UUID:                 4409e381-f066-4e7b-af74-b6525fefa08b
> 
>   Node size:            4096
>   Leaf size:            4096
>   Sector size:          4096
>   Initial chunks:
>     Data+Metadata:      9.01GiB
>     System:             18.06MiB
>   Metadata profile:     RAID5
>   Data profile:         RAID5
>   Mixed mode:           YES
>   SSD detected:         NO
>   Incompat features:    mixed-bg, extref, raid56
>   Number of devices:    10
>     UUID                                  ID    SIZE    PATH
>     ------------------------------------  --  --------- -----------
>     907a3722-5d3e-4ee8-9cf1-e0e31c5edea7   1   50.00GiB /dev/vdb
>     2517a387-e060-46d1-9be7-9535802333c7   2   50.00GiB /dev/vdc
>     763dbe5e-8b16-4330-8730-8b60e245056b   3   50.00GiB /dev/vdd
>     180abbc2-4426-4f9c-a711-7735e19536d4   4   50.00GiB /dev/vde
>     666799fd-0413-42ce-bac4-a96e3e855ea2   5   50.00GiB /dev/vdf
>     a6af3e09-8469-4e57-9fa0-9d82e6c8faf1   6   50.00GiB /dev/vdg
>     e2b8a73e-2e37-4eb8-a8cb-71721a96b358   7   50.00GiB /dev/vdh
>     3fa65e67-88f6-48cc-9292-9336220e19a8   8    2.00GiB /dev/vdi
>     5a238ef4-e143-4b84-b698-347a1ceb7aa7   9    2.00GiB /dev/vdj
>     9794c5b4-8a9e-40d0-9774-b672034ef22b  10    2.00GiB /dev/vdk
> 
>   Total devices size:                         356.01GiB

I like it, thanks.

Would be nice to have an output like this also in btrfs command – to query 
existing filesystem.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

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

* Re: [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (8 preceding siblings ...)
  2014-12-17 22:38 ` [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Martin Steigerwald
@ 2014-12-18  2:28 ` Anand Jain
  2015-03-23 23:46 ` David Sterba
  10 siblings, 0 replies; 19+ messages in thread
From: Anand Jain @ 2014-12-18  2:28 UTC (permalink / raw)
  To: Goffredo Baroncelli; +Cc: linux-btrfs, David Sterba


This is nice !

Can I suggest you to take care of 'btrfs fi show' output as well :-)
it needs a similar revamp.

Earlier I tried to add group profile into the show output but that broke 
xfstest cases depending on it. so just a note.

Thanks, Anand



On 18/12/2014 04:14, Goffredo Baroncelli wrote:
> Hi All,
>
> enclosed a patches set to improve the output of mkfs.btrfs command.
>
> Currently I find the output of mkfs.btrfs command quite confusing:
>
>    -- cut -- cut --
> # mkfs.btrfs -f -M -d raid5 -m raid5 /dev/vd[b-k]
>
> Btrfs v3.17
> See http://btrfs.wiki.kernel.org for more information.
>
> Turning ON incompat feature 'mixed-bg': mixed data and metadata block groups
> Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
> Turning ON incompat feature 'raid56': raid56 extended format
> Created a data/metadata chunk of size 8388608
> adding device /dev/vdc id 2
> adding device /dev/vdd id 3
> adding device /dev/vde id 4
> adding device /dev/vdf id 5
> adding device /dev/vdg id 6
> adding device /dev/vdh id 7
> adding device /dev/vdi id 8
> adding device /dev/vdj id 9
> adding device /dev/vdk id 10
> fs created label (null) on /dev/vdb
> 	nodesize 4096 leafsize 4096 sectorsize 4096 size 356.01GiB
>    -- cut -- cut --
>
> After my patches the output becomes:
>    -- cut -- cut --
>
> # mkfs.btrfs -L btrfs-test -f -M -m raid5 -d raid5 /dev/vd[b-k]"
> BTRFS filesystem summary:
>    Label:		btrfs-test
>    UUID:			4409e381-f066-4e7b-af74-b6525fefa08b
>
>    Node size:		4096
>    Leaf size:		4096
>    Sector size:		4096
>    Initial chunks:
>      Data+Metadata:	9.01GiB
>      System:		18.06MiB
>    Metadata profile:	RAID5
>    Data profile:		RAID5
>    Mixed mode:		YES
>    SSD detected:		NO
>    Incompat features:	mixed-bg, extref, raid56
>    Number of devices:	10
>      UUID                                  ID    SIZE    PATH
>      ------------------------------------  --  --------- -----------
>      907a3722-5d3e-4ee8-9cf1-e0e31c5edea7   1   50.00GiB /dev/vdb
>      2517a387-e060-46d1-9be7-9535802333c7   2   50.00GiB /dev/vdc
>      763dbe5e-8b16-4330-8730-8b60e245056b   3   50.00GiB /dev/vdd
>      180abbc2-4426-4f9c-a711-7735e19536d4   4   50.00GiB /dev/vde
>      666799fd-0413-42ce-bac4-a96e3e855ea2   5   50.00GiB /dev/vdf
>      a6af3e09-8469-4e57-9fa0-9d82e6c8faf1   6   50.00GiB /dev/vdg
>      e2b8a73e-2e37-4eb8-a8cb-71721a96b358   7   50.00GiB /dev/vdh
>      3fa65e67-88f6-48cc-9292-9336220e19a8   8    2.00GiB /dev/vdi
>      5a238ef4-e143-4b84-b698-347a1ceb7aa7   9    2.00GiB /dev/vdj
>      9794c5b4-8a9e-40d0-9774-b672034ef22b  10    2.00GiB /dev/vdk
>
>    Total devices size:                         356.01GiB
>
>
>    -- cut -- cut --
> Each information is in its own row. The devices are listed with more
> information (disk uuid, id, size of each devices...)
> Nodesize, Leafsize, Sectorsize are separated by the filesystem size.
>
> The metadata/data profile are displayed (before this information was missed).
> Also the size of the data/metadata/system chunk are displayed.
>
>
> These changes are also available via github
> 	https://github.com/kreijack/btrfs-progs
> branch
> 	mkfs-verbose
>
> Changelog:
> v1: first issue (as RFC)
> v2: replaced "disks" with "devices" (suggested by Duncan)
>      replaced "Feature" with "Incompat features" (suggested by Satoru)
>      updated the comment of the documentation patch (suggested by Duncan)
>      removed a duplicate "-q" in the documentation patch (suggested by Duncan)
>      split the patch #6 in #6 and #7 to simplify the reading and review
>
> BR
> G.Baroncelli
>

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

* Re: [PATCH 1/8] Add -v -q switches to mkfs.btrfs.
  2014-12-17 20:14 ` [PATCH 1/8] Add -v -q switches to mkfs.btrfs Goffredo Baroncelli
@ 2014-12-25  1:19   ` Satoru Takeuchi
  0 siblings, 0 replies; 19+ messages in thread
From: Satoru Takeuchi @ 2014-12-25  1:19 UTC (permalink / raw)
  To: Goffredo Baroncelli, linux-btrfs; +Cc: Goffredo Baroncelli

On 2014/12/18 5:14, Goffredo Baroncelli wrote:
> Add -v -q switches to mkfs.btrfs, to control the verbosity of mkfs.btrfs.
> 
> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

> ---
>   mkfs.c | 16 ++++++++++++++--
>   1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/mkfs.c b/mkfs.c
> index e10e62d..a5f19cc 100644
> --- a/mkfs.c
> +++ b/mkfs.c
> @@ -288,8 +288,10 @@ static void print_usage(void)
>   	fprintf(stderr, "\t -r --rootdir the source directory\n");
>   	fprintf(stderr, "\t -K --nodiscard do not perform whole device TRIM\n");
>   	fprintf(stderr, "\t -O --features comma separated list of filesystem features\n");
> +	fprintf(stderr, "\t -q --quiet enable quiet mode\n");
>   	fprintf(stderr, "\t -U --uuid specify the filesystem UUID\n");
>   	fprintf(stderr, "\t -V --version print the mkfs.btrfs version and exit\n");
> +	fprintf(stderr, "\t -v --verbose enable verbose mode\n");
>   	fprintf(stderr, "%s\n", BTRFS_BUILD_VERSION);
>   	exit(1);
>   }
> @@ -351,6 +353,8 @@ static struct option long_options[] = {
>   	{ "version", 0, NULL, 'V' },
>   	{ "rootdir", 1, NULL, 'r' },
>   	{ "nodiscard", 0, NULL, 'K' },
> +	{ "verbose", 0, NULL, 'v' },
> +	{ "quiet", 0, NULL, 'q' },
>   	{ "features", 1, NULL, 'O' },
>   	{ "uuid", required_argument, NULL, 'U' },
>   	{ NULL, 0, NULL, 0}
> @@ -998,7 +1002,7 @@ out:
>    * This ignores symlinks with unreadable targets and subdirs that can't
>    * be read.  It's a best-effort to give a rough estimate of the size of
>    * a subdir.  It doesn't guarantee that prepopulating btrfs from this
> - * tree won't still run out of space.
> + * tree won't still run out of space.
>    *
>    * The rounding up to 4096 is questionable.  Previous code used du -B 4096.
>    */
> @@ -1266,6 +1270,8 @@ int main(int ac, char **av)
>   	int discard = 1;
>   	int ssd = 0;
>   	int force_overwrite = 0;
> +	int verbose = 0;
> +	int quiet = 0;
>   
>   	char *source_dir = NULL;
>   	int source_dir_set = 0;
> @@ -1280,7 +1286,7 @@ int main(int ac, char **av)
>   
>   	while(1) {
>   		int c;
> -		c = getopt_long(ac, av, "A:b:fl:n:s:m:d:L:O:r:U:VMK",
> +		c = getopt_long(ac, av, "A:b:fl:n:s:m:d:L:O:r:U:VMKqv",
>   				long_options, &option_index);
>   		if (c < 0)
>   			break;
> @@ -1355,6 +1361,12 @@ int main(int ac, char **av)
>   			case 'K':
>   				discard = 0;
>   				break;
> +			case 'v':
> +				verbose = 1;
> +				break;
> +			case 'q':
> +				quiet = 1;
> +				break;
>   			default:
>   				print_usage();
>   		}
> 


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

* Re: [PATCH 2/8] Move group_profile_str() in utils.c
  2014-12-17 20:14 ` [PATCH 2/8] Move group_profile_str() in utils.c Goffredo Baroncelli
@ 2014-12-25  1:20   ` Satoru Takeuchi
  0 siblings, 0 replies; 19+ messages in thread
From: Satoru Takeuchi @ 2014-12-25  1:20 UTC (permalink / raw)
  To: Goffredo Baroncelli, linux-btrfs; +Cc: Goffredo Baroncelli

On 2014/12/18 5:14, Goffredo Baroncelli wrote:
> This is a preparation patch.
> Move the group_profile_str() function from cmds-filesystem.c to utils.c
> to be re-used from other modules (in this case from mkfs.c)
> 
> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

> ---
>   cmds-filesystem.c | 22 ----------------------
>   utils.c           | 22 ++++++++++++++++++++++
>   utils.h           |  2 ++
>   3 files changed, 24 insertions(+), 22 deletions(-)
> 
> diff --git a/cmds-filesystem.c b/cmds-filesystem.c
> index 253f105..d1afeba 100644
> --- a/cmds-filesystem.c
> +++ b/cmds-filesystem.c
> @@ -157,28 +157,6 @@ static char *group_type_str(u64 flag)
>   	}
>   }
>   
> -static char *group_profile_str(u64 flag)
> -{
> -	switch (flag & BTRFS_BLOCK_GROUP_PROFILE_MASK) {
> -	case 0:
> -		return "single";
> -	case BTRFS_BLOCK_GROUP_RAID0:
> -		return "RAID0";
> -	case BTRFS_BLOCK_GROUP_RAID1:
> -		return "RAID1";
> -	case BTRFS_BLOCK_GROUP_RAID5:
> -		return "RAID5";
> -	case BTRFS_BLOCK_GROUP_RAID6:
> -		return "RAID6";
> -	case BTRFS_BLOCK_GROUP_DUP:
> -		return "DUP";
> -	case BTRFS_BLOCK_GROUP_RAID10:
> -		return "RAID10";
> -	default:
> -		return "unknown";
> -	}
> -}
> -
>   static int get_df(int fd, struct btrfs_ioctl_space_args **sargs_ret)
>   {
>   	u64 count = 0;
> diff --git a/utils.c b/utils.c
> index 2a92416..19049bb 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -2450,3 +2450,25 @@ int find_next_key(struct btrfs_path *path, struct btrfs_key *key)
>   	}
>   	return 1;
>   }
> +
> +char *group_profile_str(u64 flag)
> +{
> +	switch (flag & BTRFS_BLOCK_GROUP_PROFILE_MASK) {
> +	case 0:
> +		return "single";
> +	case BTRFS_BLOCK_GROUP_RAID0:
> +		return "RAID0";
> +	case BTRFS_BLOCK_GROUP_RAID1:
> +		return "RAID1";
> +	case BTRFS_BLOCK_GROUP_RAID5:
> +		return "RAID5";
> +	case BTRFS_BLOCK_GROUP_RAID6:
> +		return "RAID6";
> +	case BTRFS_BLOCK_GROUP_DUP:
> +		return "DUP";
> +	case BTRFS_BLOCK_GROUP_RAID10:
> +		return "RAID10";
> +	default:
> +		return "unknown";
> +	}
> +}
> diff --git a/utils.h b/utils.h
> index 289e86b..bb8a449 100644
> --- a/utils.h
> +++ b/utils.h
> @@ -161,4 +161,6 @@ static inline u64 btrfs_min_dev_size(u32 leafsize)
>   
>   int find_next_key(struct btrfs_path *path, struct btrfs_key *key);
>   
> +char *group_profile_str(u64 flag);
> +
>   #endif
> 


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

* Re: [PATCH 3/8] Add verbose option to btrfs_add_to_fsid()
  2014-12-17 20:14 ` [PATCH 3/8] Add verbose option to btrfs_add_to_fsid() Goffredo Baroncelli
@ 2014-12-25  1:28   ` Satoru Takeuchi
  0 siblings, 0 replies; 19+ messages in thread
From: Satoru Takeuchi @ 2014-12-25  1:28 UTC (permalink / raw)
  To: Goffredo Baroncelli, linux-btrfs; +Cc: Goffredo Baroncelli

On 2014/12/18 5:14, Goffredo Baroncelli wrote:
> Add verbose option to btrfs_add_to_fsid() in order to avoid to print
> the information to console when not needed.
> The same information is print in the summary of the mkfs.btrfs command.
> 
> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

> ---
>   mkfs.c  | 3 ++-
>   utils.c | 7 ++++---
>   utils.h | 2 +-
>   3 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/mkfs.c b/mkfs.c
> index a5f19cc..042d12e 100644
> --- a/mkfs.c
> +++ b/mkfs.c
> @@ -1638,7 +1638,8 @@ int main(int ac, char **av)
>   		mixed = old_mixed;
>   
>   		ret = btrfs_add_to_fsid(trans, root, fd, file, dev_block_count,
> -					sectorsize, sectorsize, sectorsize);
> +					sectorsize, sectorsize, sectorsize,
> +					verbose);
>   		BUG_ON(ret);
>   		btrfs_register_one_device(file);
>   	}
> diff --git a/utils.c b/utils.c
> index 19049bb..dcb4f74 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -610,7 +610,7 @@ static int zero_dev_clamped(int fd, off_t start, ssize_t len, u64 dev_size)
>   int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
>   		      struct btrfs_root *root, int fd, char *path,
>   		      u64 block_count, u32 io_width, u32 io_align,
> -		      u32 sectorsize)
> +		      u32 sectorsize, int verbose)
>   {
>   	struct btrfs_super_block *disk_super;
>   	struct btrfs_super_block *super = root->fs_info->super_copy;
> @@ -659,8 +659,9 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
>   
>   	memcpy(disk_super, super, sizeof(*disk_super));
>   
> -	printf("adding device %s id %llu\n", path,
> -	       (unsigned long long)device->devid);
> +	if (verbose)
> +		printf("adding device %s id %llu\n", path,
> +		       (unsigned long long)device->devid);
>   
>   	btrfs_set_super_bytenr(disk_super, BTRFS_SUPER_INFO_OFFSET);
>   	btrfs_set_stack_device_id(dev_item, device->devid);
> diff --git a/utils.h b/utils.h
> index bb8a449..9218199 100644
> --- a/utils.h
> +++ b/utils.h
> @@ -79,7 +79,7 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret,
>   int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
>   		      struct btrfs_root *root, int fd, char *path,
>   		      u64 block_count, u32 io_width, u32 io_align,
> -		      u32 sectorsize);
> +		      u32 sectorsize, int verbose);
>   int btrfs_scan_for_fsid(int run_ioctls);
>   int btrfs_register_one_device(const char *fname);
>   int btrfs_register_all_devices(void);
> 


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

* Re: [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path.
  2014-12-17 20:14 ` [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path Goffredo Baroncelli
@ 2014-12-25  1:29   ` Satoru Takeuchi
  0 siblings, 0 replies; 19+ messages in thread
From: Satoru Takeuchi @ 2014-12-25  1:29 UTC (permalink / raw)
  To: Goffredo Baroncelli, linux-btrfs; +Cc: Goffredo Baroncelli

On 2014/12/18 5:14, Goffredo Baroncelli wrote:
> When creating a new btrfs_device, copy the path to track it.
> This path is then used by mkfs.btrfs to list all devices.
> 
> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

> ---
>   utils.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/utils.c b/utils.c
> index dcb4f74..3f50e4d 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -647,6 +647,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
>   	device->bytes_used = 0;
>   	device->total_ios = 0;
>   	device->dev_root = root->fs_info->dev_root;
> +	device->name = strdup(path);
>   
>   	ret = btrfs_add_device(trans, root, device);
>   	BUG_ON(ret);
> 


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

* Re: [PATCH 5/8] Return the fsid from make_btrfs()
  2014-12-17 20:14 ` [PATCH 5/8] Return the fsid from make_btrfs() Goffredo Baroncelli
@ 2014-12-25  2:44   ` Satoru Takeuchi
  2014-12-25  9:22     ` Goffredo Baroncelli
  0 siblings, 1 reply; 19+ messages in thread
From: Satoru Takeuchi @ 2014-12-25  2:44 UTC (permalink / raw)
  To: Goffredo Baroncelli, linux-btrfs; +Cc: Goffredo Baroncelli

On 2014/12/18 5:14, Goffredo Baroncelli wrote:
> The function make_btrfs() has as argument the fsid of the filesystem.
> If this fsid is empty or null make_btrfs() generates a new fsid. However
> If the buffer is valid (but the string is empty) the generated fsid is
> copied back to the caller.

The code is goods. However, I have a comment to the description.

In this case, describing the purpose of this patch is better.
I consider your purpose is to use fs_uuid after make_btrfs()
when user doesn't passed -U option.

Anyway,

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

Thanks,
Satoru

> 
> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
> ---
>   mkfs.c  | 7 ++++---
>   utils.c | 7 ++++++-
>   2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/mkfs.c b/mkfs.c
> index 042d12e..70c88ea 100644
> --- a/mkfs.c
> +++ b/mkfs.c
> @@ -1281,7 +1281,7 @@ int main(int ac, char **av)
>   	int dev_cnt = 0;
>   	int saved_optind;
>   	char estr[100];
> -	char *fs_uuid = NULL;
> +	char fs_uuid[BTRFS_UUID_UNPARSED_SIZE] = { 0 };
>   	u64 features = DEFAULT_MKFS_FEATURES;
>   
>   	while(1) {
> @@ -1356,7 +1356,8 @@ int main(int ac, char **av)
>   				source_dir_set = 1;
>   				break;
>   			case 'U':
> -				fs_uuid = optarg;
> +				strncpy(fs_uuid,optarg,
> +					BTRFS_UUID_UNPARSED_SIZE - 1);
>   				break;
>   			case 'K':
>   				discard = 0;
> @@ -1387,7 +1388,7 @@ int main(int ac, char **av)
>   		exit(1);
>   	}
>   
> -	if (fs_uuid) {
> +	if (*fs_uuid) {
>   		uuid_t dummy_uuid;
>   
>   		if (uuid_parse(fs_uuid, dummy_uuid) != 0) {
> diff --git a/utils.c b/utils.c
> index 3f50e4d..c7f1b2f 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -203,7 +203,7 @@ int make_btrfs(int fd, const char *device, const char *label, char *fs_uuid,
>   	memset(&super, 0, sizeof(super));
>   
>   	num_bytes = (num_bytes / sectorsize) * sectorsize;
> -	if (fs_uuid) {
> +	if (fs_uuid && *fs_uuid) {
>   		if (uuid_parse(fs_uuid, super.fsid) != 0) {
>   			fprintf(stderr, "could not parse UUID: %s\n", fs_uuid);
>   			ret = -EINVAL;
> @@ -216,6 +216,11 @@ int make_btrfs(int fd, const char *device, const char *label, char *fs_uuid,
>   		}
>   	} else {
>   		uuid_generate(super.fsid);
> +		/*
> +		 * if the fs_uuid is a valid pointer, return the generated uuid
> +		 */
> +		if (fs_uuid)
> +			uuid_unparse(super.fsid, fs_uuid);
>   	}
>   	uuid_generate(super.dev_item.uuid);
>   	uuid_generate(chunk_tree_uuid);
> 


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

* Re: [PATCH 5/8] Return the fsid from make_btrfs()
  2014-12-25  2:44   ` Satoru Takeuchi
@ 2014-12-25  9:22     ` Goffredo Baroncelli
  0 siblings, 0 replies; 19+ messages in thread
From: Goffredo Baroncelli @ 2014-12-25  9:22 UTC (permalink / raw)
  To: Satoru Takeuchi, linux-btrfs; +Cc: Goffredo Baroncelli

On 12/25/2014 03:44 AM, Satoru Takeuchi wrote:
> On 2014/12/18 5:14, Goffredo Baroncelli wrote:
>> The function make_btrfs() has as argument the fsid of the filesystem.
>> If this fsid is empty or null make_btrfs() generates a new fsid. However
>> If the buffer is valid (but the string is empty) the generated fsid is
>> copied back to the caller.
> 
> The code is goods. However, I have a comment to the description.
> 
> In this case, describing the purpose of this patch is better.
> I consider your purpose is to use fs_uuid after make_btrfs()
> when user doesn't passed -U option.
> 
> Anyway,
> 
> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
> 
> Thanks,
> Satoru


Many thanks Satoru,

BR
G.Baroncelli

> 
>>
>> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
>> ---
>>   mkfs.c  | 7 ++++---
>>   utils.c | 7 ++++++-
>>   2 files changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/mkfs.c b/mkfs.c
>> index 042d12e..70c88ea 100644
>> --- a/mkfs.c
>> +++ b/mkfs.c
>> @@ -1281,7 +1281,7 @@ int main(int ac, char **av)
>>   	int dev_cnt = 0;
>>   	int saved_optind;
>>   	char estr[100];
>> -	char *fs_uuid = NULL;
>> +	char fs_uuid[BTRFS_UUID_UNPARSED_SIZE] = { 0 };
>>   	u64 features = DEFAULT_MKFS_FEATURES;
>>   
>>   	while(1) {
>> @@ -1356,7 +1356,8 @@ int main(int ac, char **av)
>>   				source_dir_set = 1;
>>   				break;
>>   			case 'U':
>> -				fs_uuid = optarg;
>> +				strncpy(fs_uuid,optarg,
>> +					BTRFS_UUID_UNPARSED_SIZE - 1);
>>   				break;
>>   			case 'K':
>>   				discard = 0;
>> @@ -1387,7 +1388,7 @@ int main(int ac, char **av)
>>   		exit(1);
>>   	}
>>   
>> -	if (fs_uuid) {
>> +	if (*fs_uuid) {
>>   		uuid_t dummy_uuid;
>>   
>>   		if (uuid_parse(fs_uuid, dummy_uuid) != 0) {
>> diff --git a/utils.c b/utils.c
>> index 3f50e4d..c7f1b2f 100644
>> --- a/utils.c
>> +++ b/utils.c
>> @@ -203,7 +203,7 @@ int make_btrfs(int fd, const char *device, const char *label, char *fs_uuid,
>>   	memset(&super, 0, sizeof(super));
>>   
>>   	num_bytes = (num_bytes / sectorsize) * sectorsize;
>> -	if (fs_uuid) {
>> +	if (fs_uuid && *fs_uuid) {
>>   		if (uuid_parse(fs_uuid, super.fsid) != 0) {
>>   			fprintf(stderr, "could not parse UUID: %s\n", fs_uuid);
>>   			ret = -EINVAL;
>> @@ -216,6 +216,11 @@ int make_btrfs(int fd, const char *device, const char *label, char *fs_uuid,
>>   		}
>>   	} else {
>>   		uuid_generate(super.fsid);
>> +		/*
>> +		 * if the fs_uuid is a valid pointer, return the generated uuid
>> +		 */
>> +		if (fs_uuid)
>> +			uuid_unparse(super.fsid, fs_uuid);
>>   	}
>>   	uuid_generate(super.dev_item.uuid);
>>   	uuid_generate(chunk_tree_uuid);
>>
> 
> 


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

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

* Re: [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command
  2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
                   ` (9 preceding siblings ...)
  2014-12-18  2:28 ` Anand Jain
@ 2015-03-23 23:46 ` David Sterba
  2015-03-25 19:07   ` Goffredo Baroncelli
  10 siblings, 1 reply; 19+ messages in thread
From: David Sterba @ 2015-03-23 23:46 UTC (permalink / raw)
  To: Goffredo Baroncelli; +Cc: linux-btrfs

FYI, I've added the following patches to 3.19 queue

 * btrfs-progs: return the fsid from make_btrfs()
 * btrfs-progs: add strdup in btrfs_add_to_fsid() to track the device path
 * btrfs-progs: add verbose option to btrfs_add_to_fsid()
 * btrfs-progs: add -v and -q switches in the mkfs.btrfs man page
 * btrfs-progs: add -v -q switches to mkfs.btrfs

ie. the patch that adds the the summary is not there yet but I'm planning to
add it as well with some modifications. If that turns out to be too different
from your proposal, I'm going to send it for comments.

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

* Re: [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command
  2015-03-23 23:46 ` David Sterba
@ 2015-03-25 19:07   ` Goffredo Baroncelli
  0 siblings, 0 replies; 19+ messages in thread
From: Goffredo Baroncelli @ 2015-03-25 19:07 UTC (permalink / raw)
  To: dsterba; +Cc: linux-btrfs

On 2015-03-24 00:46, David Sterba wrote:
> FYI, I've added the following patches to 3.19 queue
> 
>  * btrfs-progs: return the fsid from make_btrfs()
>  * btrfs-progs: add strdup in btrfs_add_to_fsid() to track the device path
>  * btrfs-progs: add verbose option to btrfs_add_to_fsid()
>  * btrfs-progs: add -v and -q switches in the mkfs.btrfs man page
>  * btrfs-progs: add -v -q switches to mkfs.btrfs
> 
> ie. the patch that adds the the summary is not there yet but I'm planning to
> add it as well with some modifications. If that turns out to be too different
> from your proposal, I'm going to send it for comments.
> 
Ok, many thanks
Goffredo

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

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

end of thread, other threads:[~2015-03-25 19:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 1/8] Add -v -q switches to mkfs.btrfs Goffredo Baroncelli
2014-12-25  1:19   ` Satoru Takeuchi
2014-12-17 20:14 ` [PATCH 2/8] Move group_profile_str() in utils.c Goffredo Baroncelli
2014-12-25  1:20   ` Satoru Takeuchi
2014-12-17 20:14 ` [PATCH 3/8] Add verbose option to btrfs_add_to_fsid() Goffredo Baroncelli
2014-12-25  1:28   ` Satoru Takeuchi
2014-12-17 20:14 ` [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path Goffredo Baroncelli
2014-12-25  1:29   ` Satoru Takeuchi
2014-12-17 20:14 ` [PATCH 5/8] Return the fsid from make_btrfs() Goffredo Baroncelli
2014-12-25  2:44   ` Satoru Takeuchi
2014-12-25  9:22     ` Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 6/8] Track the size of the chunk created Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 7/8] Print the summary Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 8/8] Add -v and -q switches in the mkfs.btrfs man page Goffredo Baroncelli
2014-12-17 22:38 ` [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Martin Steigerwald
2014-12-18  2:28 ` Anand Jain
2015-03-23 23:46 ` David Sterba
2015-03-25 19:07   ` Goffredo Baroncelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.