Bump reva, for 'graceful_shutdown_timeout' setting

This commit is contained in:
Ralf Haferkamp
2023-07-18 16:08:43 +02:00
parent 87a1bf7e26
commit b480fc09b0
7 changed files with 98 additions and 58 deletions
@@ -49,6 +49,16 @@ func (md Attributes) SetInt64(key string, val int64) {
md[key] = []byte(strconv.FormatInt(val, 10))
}
// UInt64 reads an uint64 value
func (md Attributes) UInt64(key string) (uint64, error) {
return strconv.ParseUint(string(md[key]), 10, 64)
}
// SetInt64 sets an uint64 value
func (md Attributes) SetUInt64(key string, val uint64) {
md[key] = []byte(strconv.FormatUint(val, 10))
}
// SetXattrs sets multiple extended attributes on the write-through cache/node
func (n *Node) SetXattrsWithContext(ctx context.Context, attribs map[string][]byte, acquireLock bool) (err error) {
if n.xattrsCache != nil {
@@ -122,6 +122,9 @@ func (fs *Decomposedfs) CreateStorageSpace(ctx context.Context, req *provider.Cr
metadata.SetString(prefixes.NameAttr, req.Name)
metadata.SetString(prefixes.SpaceNameAttr, req.Name)
// This space is empty so set initial treesize to 0
metadata.SetUInt64(prefixes.TreesizeAttr, 0)
if req.Type != "" {
metadata.SetString(prefixes.SpaceTypeAttr, req.Type)
}