]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: volumes: Cleanup stripe size calculation
authorQu Wenruo <wqu@suse.com>
Wed, 31 Jan 2018 06:16:34 +0000 (14:16 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 Nov 2019 15:57:32 +0000 (15:57 +0000)
commit52a4c5d2b5f792c869c0394c83d932614c64f83f
treee450760f5daa98230134553e330c82c2ff0ce2cf
parent4eeed526d58a3d35e91289e2397a6c9d4800afde
btrfs: volumes: Cleanup stripe size calculation

commit 793ff2c88c6397b3531c08cc4f920619b56a9def upstream.

Cleanup the following things:
1) open coded SZ_16M round up
2) use min() to replace open-coded size comparison
3) code style

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Gu Jinxiang <gujx@cn.fujitsu.com>
[ reformat comment ]
Signed-off-by: David Sterba <dsterba@suse.com>
[bwh: Backported to 3.16 as dependency of commit baf92114c7
 "btrfs: alloc_chunk: fix more DUP stripe size handling":
 - Add #include <linux/sizes.h> for definition of SZ_16M]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
fs/btrfs/volumes.c