Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Btrfs: consistent usage of types in balance_args

The btrfs_balance_args are only used for the balance ioctl, so use __u
instead of __le here for consistency. The __le usage was introduced in
bc3094673f22d and dee32d0ac3719 and was probably a result of
copy/pasting when the code was written.

The usage of __le did not break anything, but it's unnecessary. Also,
this change makes the code less confusing for the careful reader.

Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Hans van Kranenburg and committed by
David Sterba
261cc2cc 4d339d01

+5 -5
+5 -5
include/uapi/linux/btrfs.h
··· 291 291 struct btrfs_balance_args { 292 292 __u64 profiles; 293 293 union { 294 - __le64 usage; 294 + __u64 usage; 295 295 struct { 296 - __le32 usage_min; 297 - __le32 usage_max; 296 + __u32 usage_min; 297 + __u32 usage_max; 298 298 }; 299 299 }; 300 300 __u64 devid; ··· 324 324 * Process chunks that cross stripes_min..stripes_max devices, 325 325 * BTRFS_BALANCE_ARGS_STRIPES_RANGE 326 326 */ 327 - __le32 stripes_min; 328 - __le32 stripes_max; 327 + __u32 stripes_min; 328 + __u32 stripes_max; 329 329 330 330 __u64 unused[6]; 331 331 } __attribute__ ((__packed__));