Raid56 readahead can not work in current code, reada_find_extent()
will show warning of bbio->num_stripes > BTRFS_MAX_MIRRORS, because
raid56 have parity strip, which makes more bbio->num_stripes.
The reason why we haven't see above error is because another bug
in __btrfs_map_block(), which make raid56 readahead do nothing.
Before we will fix bug in __btrfs_map_block(), we need to disable
raid56 temporary, to avoid above warning.
Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
---
fs/btrfs/reada.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 619f929..7bbd656 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -363,6 +363,11 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
if (ret || !bbio || length < blocksize)
goto error;
+ if (bbio->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK) {
+ /* Current code can not support RAID56 yet */
+ goto error;
+ }
+
if (bbio->num_stripes > BTRFS_MAX_MIRRORS) {
btrfs_err(root->fs_info,
"readahead: more than %d copies not supported",
--
1.8.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html