Skip to content

Commit

Permalink
enable quota before trying to read qgroups value
Browse files Browse the repository at this point in the history
fixes #937
  • Loading branch information
zaibon committed Sep 14, 2020
1 parent 2264806 commit 566927e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/storage/filesystem/btrfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ func (p *btrfsPool) Mount() (string, error) {
return "", err
}

if err := p.maintenance(); err != nil {
return "", err
if err := p.utils.QGroupEnable(ctx, mnt); err != nil {
return "", fmt.Errorf("failed to enable qgroup: %w", err)
}

return mnt, p.utils.QGroupEnable(ctx, mnt)
return mnt, p.maintenance()
}

// MountWithoutScan mounts the pool in it's default mount location under /mnt/name
Expand All @@ -252,11 +252,11 @@ func (p *btrfsPool) MountWithoutScan() (string, error) {
return "", err
}

if err := p.maintenance(); err != nil {
return "", err
if err := p.utils.QGroupEnable(ctx, mnt); err != nil {
return "", fmt.Errorf("failed to enable qgroup: %w", err)
}

return mnt, p.utils.QGroupEnable(ctx, mnt)
return mnt, p.maintenance()
}

func (p *btrfsPool) UnMount() error {
Expand Down

0 comments on commit 566927e

Please sign in to comment.