* [PATCH] btrfs-progs: corrupt-block: Add support to corrupt extent for skinny metadata
@ 2016-05-26 2:36 Qu Wenruo
2016-06-01 13:57 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2016-05-26 2:36 UTC (permalink / raw)
To: linux-btrfs
For skinny metadata case, btrfs-corrupt-block can't corrupt a metadata
extent due to the type judgment doesn't include BTRFS_METADATA_ITEM_KEY.
Fix it.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
btrfs-corrupt-block.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index 2cc9704..020afab 100644
--- a/btrfs-corrupt-block.c
+++ b/btrfs-corrupt-block.c
@@ -210,6 +210,7 @@ static int corrupt_extent(struct btrfs_trans_handle *trans,
break;
if (key.type != BTRFS_EXTENT_ITEM_KEY &&
+ key.type != BTRFS_METADATA_ITEM_KEY &&
key.type != BTRFS_TREE_BLOCK_REF_KEY &&
key.type != BTRFS_EXTENT_DATA_REF_KEY &&
key.type != BTRFS_EXTENT_REF_V0_KEY &&
--
2.8.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: corrupt-block: Add support to corrupt extent for skinny metadata
2016-05-26 2:36 [PATCH] btrfs-progs: corrupt-block: Add support to corrupt extent for skinny metadata Qu Wenruo
@ 2016-06-01 13:57 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2016-06-01 13:57 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs
On Thu, May 26, 2016 at 10:36:02AM +0800, Qu Wenruo wrote:
> For skinny metadata case, btrfs-corrupt-block can't corrupt a metadata
> extent due to the type judgment doesn't include BTRFS_METADATA_ITEM_KEY.
>
> Fix it.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-01 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 2:36 [PATCH] btrfs-progs: corrupt-block: Add support to corrupt extent for skinny metadata Qu Wenruo
2016-06-01 13:57 ` David Sterba
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.