/openbmc/linux/fs/btrfs/ |
H A D | misc.h | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | block-rsv.h | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | block-rsv.c | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | space-info.c | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | sysfs.c | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | free-space-cache.c | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | block-group.c | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | transaction.c | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|
H A D | volumes.c | 428c8e03 Wed Oct 26 16:25:14 CDT 2022 David Sterba <dsterba@suse.com> btrfs: simplify percent calculation helpers, rename div_factor
The div_factor* helpers calculate fraction or percentage fraction. The name is a bit confusing, we use it only for percentage calculations and there are two helpers.
There's a helper mult_frac that's for general fractions, that tries to be accurate but we multiply and divide by small numbers so we can use the div_u64 helper.
Rename the div_factor* helpers and use 1..100 percentage range, also drop the case checking for percentage == 100, it's never hit.
The conversions:
* div_factor calculates tenths and the numbers need to be adjusted * div_factor_fine is direct replacement
Signed-off-by: David Sterba <dsterba@suse.com>
|