block-group.c (de8a334f215c5a5c5bb070df4325af824d7eaaf1) block-group.c (cb091225a538005965b7c59c7c33ebe5358a5815)
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/sizes.h>
4#include <linux/list_sort.h>
5#include "misc.h"
6#include "ctree.h"
7#include "block-group.h"
8#include "space-info.h"

--- 1959 unchanged lines hidden (view full) ---

1968
1969 map = em->map_lookup;
1970 data_stripe_length = em->orig_block_len;
1971 io_stripe_size = BTRFS_STRIPE_LEN;
1972 chunk_start = em->start;
1973
1974 /* For RAID5/6 adjust to a full IO stripe length */
1975 if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK)
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/sizes.h>
4#include <linux/list_sort.h>
5#include "misc.h"
6#include "ctree.h"
7#include "block-group.h"
8#include "space-info.h"

--- 1959 unchanged lines hidden (view full) ---

1968
1969 map = em->map_lookup;
1970 data_stripe_length = em->orig_block_len;
1971 io_stripe_size = BTRFS_STRIPE_LEN;
1972 chunk_start = em->start;
1973
1974 /* For RAID5/6 adjust to a full IO stripe length */
1975 if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK)
1976 io_stripe_size = nr_data_stripes(map) << BTRFS_STRIPE_LEN_SHIFT;
1976 io_stripe_size = btrfs_stripe_nr_to_offset(nr_data_stripes(map));
1977
1978 buf = kcalloc(map->num_stripes, sizeof(u64), GFP_NOFS);
1979 if (!buf) {
1980 ret = -ENOMEM;
1981 goto out;
1982 }
1983
1984 for (i = 0; i < map->num_stripes; i++) {

--- 2455 unchanged lines hidden ---
1977
1978 buf = kcalloc(map->num_stripes, sizeof(u64), GFP_NOFS);
1979 if (!buf) {
1980 ret = -ENOMEM;
1981 goto out;
1982 }
1983
1984 for (i = 0; i < map->num_stripes; i++) {

--- 2455 unchanged lines hidden ---