mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
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:
parent
9bd10d2698
commit
5598c279da
@ -38,6 +38,10 @@ var (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
cephEntityClientPrefix = "client."
|
cephEntityClientPrefix = "client."
|
||||||
|
|
||||||
|
// modeAllRWX can be used for setting permissions to Read-Write-eXecute
|
||||||
|
// for User, Group and Other.
|
||||||
|
modeAllRWX = 0777
|
||||||
)
|
)
|
||||||
|
|
||||||
// Subvolume holds subvolume information.
|
// Subvolume holds subvolume information.
|
||||||
@ -157,7 +161,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, volID volumeID
|
|||||||
|
|
||||||
opts := fsAdmin.SubVolumeOptions{
|
opts := fsAdmin.SubVolumeOptions{
|
||||||
Size: fsAdmin.ByteCount(bytesQuota),
|
Size: fsAdmin.ByteCount(bytesQuota),
|
||||||
Mode: 0777,
|
Mode: modeAllRWX,
|
||||||
}
|
}
|
||||||
if volOptions.Pool != "" {
|
if volOptions.Pool != "" {
|
||||||
opts.PoolLayout = volOptions.Pool
|
opts.PoolLayout = volOptions.Pool
|
||||||
|
Loading…
Reference in New Issue
Block a user