linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] btrfs-progs: Turning ON incompat isn't an error
@ 2013-12-02  6:11 Anand Jain
  2013-12-02  6:11 ` [PATCH 2/3] btrfs-progs: fix backref after init-csum-tree Anand Jain
  2013-12-02  6:11 ` [PATCH 3/3] btrfs-progs: qgroup destroy says create failed Anand Jain
  0 siblings, 2 replies; 4+ messages in thread
From: Anand Jain @ 2013-12-02  6:11 UTC (permalink / raw)
  To: linux-btrfs

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

diff --git a/mkfs.c b/mkfs.c
index de1beed..0843600 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1196,8 +1196,7 @@ static void process_fs_features(u64 flags)
 
 	for (i = 0; i < ARRAY_SIZE(mkfs_features); i++) {
 		if (flags & mkfs_features[i].flag) {
-			fprintf(stderr,
-				"Turning ON incompat feature '%s': %s\n",
+			printf("Turning ON incompat feature '%s': %s\n",
 				mkfs_features[i].name,
 				mkfs_features[i].desc);
 		}
-- 
1.7.1


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

* [PATCH 2/3] btrfs-progs: fix backref after init-csum-tree
  2013-12-02  6:11 [PATCH 1/3] btrfs-progs: Turning ON incompat isn't an error Anand Jain
@ 2013-12-02  6:11 ` Anand Jain
  2013-12-02  6:12   ` Anand Jain
  2013-12-02  6:11 ` [PATCH 3/3] btrfs-progs: qgroup destroy says create failed Anand Jain
  1 sibling, 1 reply; 4+ messages in thread
From: Anand Jain @ 2013-12-02  6:11 UTC (permalink / raw)
  To: linux-btrfs

btrfsck reports backref error after running init-csum-tree

btrfsck --init-csum-tree /dev/sdc
btrfsck /dev/sdc
::
ref mismatch on [29474816 16384] extent item 1, found 0
Backref 29474816 root 7 not referenced back 0x1101d30
Incorrect global backref count on 29474816 found 1 wanted 0
backpointer mismatch on [29474816 16384]
owner ref check failed [29474816 16384]
Errors found in extent allocation tree or chunk allocation
::

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

diff --git a/cmds-check.c b/cmds-check.c
index afad8a1..6a8d351 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -6161,6 +6161,7 @@ int cmd_check(int argc, char **argv)
 		} else if (option_index == 2) {
 			printf("Creating a new CRC tree\n");
 			init_csum_tree = 1;
+			repair = 1;
 			ctree_flags |= OPEN_CTREE_WRITES;
 		} else if (option_index == 3) {
 			init_extent_tree = 1;
@@ -6234,6 +6235,11 @@ int cmd_check(int argc, char **argv)
 		ret = btrfs_commit_transaction(trans, info->csum_root);
 		if (ret)
 			exit(1);
+
+		ret = check_chunks_and_extents(root);
+		if (ret)
+			fprintf(stderr,
+				"Errors found in extent allocation tree or chunk allocation\n");
 		goto out;
 	}
 	ret = check_chunks_and_extents(root);
-- 
1.7.1


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

* [PATCH 3/3] btrfs-progs: qgroup destroy says create failed
  2013-12-02  6:11 [PATCH 1/3] btrfs-progs: Turning ON incompat isn't an error Anand Jain
  2013-12-02  6:11 ` [PATCH 2/3] btrfs-progs: fix backref after init-csum-tree Anand Jain
@ 2013-12-02  6:11 ` Anand Jain
  1 sibling, 0 replies; 4+ messages in thread
From: Anand Jain @ 2013-12-02  6:11 UTC (permalink / raw)
  To: linux-btrfs

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

diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 5a393bd..957fbc9 100644
--- a/cmds-qgroup.c
+++ b/cmds-qgroup.c
@@ -99,8 +99,8 @@ static int qgroup_create(int create, int argc, char **argv)
 	e = errno;
 	close_file_or_dir(fd, dirstream);
 	if (ret < 0) {
-		fprintf(stderr, "ERROR: unable to create quota group: %s\n",
-			strerror(e));
+		fprintf(stderr, "ERROR: unable to %s quota group: %s\n",
+			create ? "create":"destroy", strerror(e));
 		return 1;
 	}
 	return 0;
-- 
1.7.1


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

* Re: [PATCH 2/3] btrfs-progs: fix backref after init-csum-tree
  2013-12-02  6:11 ` [PATCH 2/3] btrfs-progs: fix backref after init-csum-tree Anand Jain
@ 2013-12-02  6:12   ` Anand Jain
  0 siblings, 0 replies; 4+ messages in thread
From: Anand Jain @ 2013-12-02  6:12 UTC (permalink / raw)
  To: linux-btrfs



  Further this needs your review. How should be a complete use case
  of this init-csum-tree feature. mainly how do we expect this work
  in the real scenario. what problem does this solve.

Thanks, Anand


On 12/02/13 02:11 PM, Anand Jain wrote:
> btrfsck reports backref error after running init-csum-tree
>
> btrfsck --init-csum-tree /dev/sdc
> btrfsck /dev/sdc
> ::
> ref mismatch on [29474816 16384] extent item 1, found 0
> Backref 29474816 root 7 not referenced back 0x1101d30
> Incorrect global backref count on 29474816 found 1 wanted 0
> backpointer mismatch on [29474816 16384]
> owner ref check failed [29474816 16384]
> Errors found in extent allocation tree or chunk allocation
> ::
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>   cmds-check.c |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/cmds-check.c b/cmds-check.c
> index afad8a1..6a8d351 100644
> --- a/cmds-check.c
> +++ b/cmds-check.c
> @@ -6161,6 +6161,7 @@ int cmd_check(int argc, char **argv)
>   		} else if (option_index == 2) {
>   			printf("Creating a new CRC tree\n");
>   			init_csum_tree = 1;
> +			repair = 1;
>   			ctree_flags |= OPEN_CTREE_WRITES;
>   		} else if (option_index == 3) {
>   			init_extent_tree = 1;
> @@ -6234,6 +6235,11 @@ int cmd_check(int argc, char **argv)
>   		ret = btrfs_commit_transaction(trans, info->csum_root);
>   		if (ret)
>   			exit(1);
> +
> +		ret = check_chunks_and_extents(root);
> +		if (ret)
> +			fprintf(stderr,
> +				"Errors found in extent allocation tree or chunk allocation\n");
>   		goto out;
>   	}
>   	ret = check_chunks_and_extents(root);
>

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

end of thread, other threads:[~2013-12-02  6:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02  6:11 [PATCH 1/3] btrfs-progs: Turning ON incompat isn't an error Anand Jain
2013-12-02  6:11 ` [PATCH 2/3] btrfs-progs: fix backref after init-csum-tree Anand Jain
2013-12-02  6:12   ` Anand Jain
2013-12-02  6:11 ` [PATCH 3/3] btrfs-progs: qgroup destroy says create failed 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).