Merge tag 'for-6.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[sfrench/cifs-2.6.git] / fs / btrfs / volumes.c
index 5a5a8d488a7bcd042175ca7499bea3a3c7d84ff4..b9ef6f54635ca5c45c3266e02e1ea7f745775c24 100644 (file)
@@ -5109,7 +5109,7 @@ static void init_alloc_chunk_ctl_policy_regular(
        ASSERT(space_info);
 
        ctl->max_chunk_size = READ_ONCE(space_info->chunk_size);
-       ctl->max_stripe_size = ctl->max_chunk_size;
+       ctl->max_stripe_size = min_t(u64, ctl->max_chunk_size, SZ_1G);
 
        if (ctl->type & BTRFS_BLOCK_GROUP_SYSTEM)
                ctl->devs_max = min_t(int, ctl->devs_max, BTRFS_MAX_DEVS_SYS_CHUNK);