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 84f9bed commit b799699
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 @@ -231,11 +231,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 @@ -253,11 +253,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 b799699

Please sign in to comment.