Commit 0695d8b1 authored by David Sterba's avatar David Sterba Committed by Greg Kroah-Hartman

btrfs: store and load values of stripes_min/stripes_max in balance status item

commit ed0df618 upstream.

The balance status item contains currently known filter values, but the
stripes filter was unintentionally not among them. This would mean, that
interrupted and automatically restarted balance does not apply the
stripe filters.

Fixes: dee32d0aSigned-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 80f7d283
...@@ -2210,6 +2210,8 @@ btrfs_disk_balance_args_to_cpu(struct btrfs_balance_args *cpu, ...@@ -2210,6 +2210,8 @@ btrfs_disk_balance_args_to_cpu(struct btrfs_balance_args *cpu,
cpu->target = le64_to_cpu(disk->target); cpu->target = le64_to_cpu(disk->target);
cpu->flags = le64_to_cpu(disk->flags); cpu->flags = le64_to_cpu(disk->flags);
cpu->limit = le64_to_cpu(disk->limit); cpu->limit = le64_to_cpu(disk->limit);
cpu->stripes_min = le32_to_cpu(disk->stripes_min);
cpu->stripes_max = le32_to_cpu(disk->stripes_max);
} }
static inline void static inline void
...@@ -2228,6 +2230,8 @@ btrfs_cpu_balance_args_to_disk(struct btrfs_disk_balance_args *disk, ...@@ -2228,6 +2230,8 @@ btrfs_cpu_balance_args_to_disk(struct btrfs_disk_balance_args *disk,
disk->target = cpu_to_le64(cpu->target); disk->target = cpu_to_le64(cpu->target);
disk->flags = cpu_to_le64(cpu->flags); disk->flags = cpu_to_le64(cpu->flags);
disk->limit = cpu_to_le64(cpu->limit); disk->limit = cpu_to_le64(cpu->limit);
disk->stripes_min = cpu_to_le32(cpu->stripes_min);
disk->stripes_max = cpu_to_le32(cpu->stripes_max);
} }
/* struct btrfs_super_block */ /* struct btrfs_super_block */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment