Re: [PATCH 06/15] btrfs: use raid_attr table in calc_stripe_length for nparity

2019-05-17 Thread Hans van Kranenburg
On 5/17/19 2:54 PM, David Sterba wrote: > On Fri, May 17, 2019 at 12:06:05PM +0200, Hans van Kranenburg wrote: >>> - default: >>> + if (nparity) >>> + data_stripes = num_stripes - nparity; >>> + else >>> data_stripes = num_stripes / ncopies; >>> - break; >>> -

Re: [PATCH 06/15] btrfs: use raid_attr table in calc_stripe_length for nparity

2019-05-17 Thread David Sterba
On Fri, May 17, 2019 at 12:06:05PM +0200, Hans van Kranenburg wrote: > > - default: > > + if (nparity) > > + data_stripes = num_stripes - nparity; > > + else > > data_stripes = num_stripes / ncopies; > > - break; > > - } > > A few lines earlier in that file

Re: [PATCH 06/15] btrfs: use raid_attr table in calc_stripe_length for nparity

2019-05-17 Thread Hans van Kranenburg
Hi, Great cleanup series! On 5/17/19 11:43 AM, David Sterba wrote: > The table is already used for ncopies, replace open coding of stripes > with the raid_attr value. > > Signed-off-by: David Sterba > --- > fs/btrfs/volumes.c | 15 +-- > 1 file changed, 5 insertions(+), 10 deletion

[PATCH 06/15] btrfs: use raid_attr table in calc_stripe_length for nparity

2019-05-17 Thread David Sterba
The table is already used for ncopies, replace open coding of stripes with the raid_attr value. Signed-off-by: David Sterba --- fs/btrfs/volumes.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 995a15a816f2..743e