Skip to content

Commit

Permalink
Merge pull request #24338 from mheon/quota_on_volume_root
Browse files Browse the repository at this point in the history
Set quota on volume root directory, not _data
  • Loading branch information
openshift-merge-bot[bot] authored Oct 22, 2024
2 parents beb3562 + 23ab7b8 commit 678943d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libpod/runtime_volume_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ func (r *Runtime) newVolume(ctx context.Context, noCreatePluginVolume bool, opti
Inodes: volume.config.Inodes,
Size: volume.config.Size,
}
if err := q.SetQuota(fullVolPath, quota); err != nil {
// Must use volPathRoot not fullVolPath, as we need the
// base path for the volume - without the `_data`
// subdirectory - so the quota ID assignment logic works
// properly.
if err := q.SetQuota(volPathRoot, quota); err != nil {
return nil, fmt.Errorf("failed to set size quota size=%d inodes=%d for volume directory %q: %w", volume.config.Size, volume.config.Inodes, fullVolPath, err)
}
}
Expand Down

1 comment on commit 678943d

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.