forked from TrueCloudLab/frostfs-node
[#1770] fstree: Depth parameter int
-> uint64
Negative values have no sense. On the other hand it differs from the blobovnicza's configuration and prevents unification. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
4aa4694152
commit
5c69e19016
3 changed files with 7 additions and 7 deletions
|
@ -26,14 +26,14 @@ func (x *Config) Type() string {
|
|||
//
|
||||
// Returns DepthDefault if the value is out of
|
||||
// [1:fstree.MaxDepth] range.
|
||||
func (x *Config) Depth() int {
|
||||
d := config.IntSafe(
|
||||
func (x *Config) Depth() uint64 {
|
||||
d := config.UintSafe(
|
||||
(*config.Config)(x),
|
||||
"depth",
|
||||
)
|
||||
|
||||
if d >= 1 && d <= fstree.MaxDepth {
|
||||
return int(d)
|
||||
return d
|
||||
}
|
||||
|
||||
return DepthDefault
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue