Message ID | 1464230162-7657-1-git-send-email-quwenruo@cn.fujitsu.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
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. -- 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-info.html
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 &&
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(+)