cleanup: no magic number for RWX permissions

golang-ci complains that 0777 is a magic number, so make it a constant
with a clear description.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-10-01 09:18:58 +02:00 committed by mergify[bot]
parent 9bd10d2698
commit 5598c279da

View File

@ -38,6 +38,10 @@ var (
const (
cephEntityClientPrefix = "client."
// modeAllRWX can be used for setting permissions to Read-Write-eXecute
// for User, Group and Other.
modeAllRWX = 0777
)
// Subvolume holds subvolume information.
@ -157,7 +161,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, volID volumeID
opts := fsAdmin.SubVolumeOptions{
Size: fsAdmin.ByteCount(bytesQuota),
Mode: 0777,
Mode: modeAllRWX,
}
if volOptions.Pool != "" {
opts.PoolLayout = volOptions.Pool