From 00d6971dbd12fcdab6c79ca76f85b307b491e759 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 2 Nov 2023 13:06:17 +0100 Subject: [PATCH] util: rearrange struct to fix lint re-arrange the struct members to fix below lint issue ``` struct of size 336 bytes could be of size 328 bytes ``` Signed-off-by: Madhu Rajanna --- internal/util/util.go | 47 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/internal/util/util.go b/internal/util/util.go index 66ba49e71..bd7937f82 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -93,34 +93,20 @@ type Config struct { PluginPath string // location of cephcsi plugin StagingPath string // location of cephcsi staging path DomainLabels string // list of domain labels to read from the node - // metrics related flags MetricsPath string // path of prometheus endpoint where metrics will be available MetricsIP string // TCP port for liveness/ metrics requests + // CSI-Addons endpoint + CSIAddonsEndpoint string + + // Cluster name + ClusterName string + // mount option related flags KernelMountOptions string // Comma separated string of mount options accepted by cephfs kernel mounter FuseMountOptions string // Comma separated string of mount options accepted by ceph-fuse mounter - PidLimit int // PID limit to configure through cgroups") - MetricsPort int // TCP port for liveness/grpc metrics requests - PollTime time.Duration // time interval in seconds between each poll - PoolTimeout time.Duration // probe timeout in seconds - - EnableProfiling bool // flag to enable profiling - IsControllerServer bool // if set to true start provisioner server - IsNodeServer bool // if set to true start node server - Version bool // cephcsi version - - // SkipForceFlatten is set to false if the kernel supports mounting of - // rbd image or the image chain has the deep-flatten feature. - SkipForceFlatten bool - - // cephfs related flags - ForceKernelCephFS bool // force to use the ceph kernel client even if the kernel is < 4.17 - - SetMetadata bool // set metadata on the volume - // RbdHardMaxCloneDepth is the hard limit for maximum number of nested volume clones that are taken before a flatten // occurs RbdHardMaxCloneDepth uint @@ -139,11 +125,24 @@ type Config struct { // reached cephcsi will start flattening the older rbd images. MinSnapshotsOnImage uint - // CSI-Addons endpoint - CSIAddonsEndpoint string + PidLimit int // PID limit to configure through cgroups") + MetricsPort int // TCP port for liveness/grpc metrics requests + PollTime time.Duration // time interval in seconds between each poll + PoolTimeout time.Duration // probe timeout in seconds - // Cluster name - ClusterName string + EnableProfiling bool // flag to enable profiling + IsControllerServer bool // if set to true start provisioner server + IsNodeServer bool // if set to true start node server + Version bool // cephcsi version + + // SkipForceFlatten is set to false if the kernel supports mounting of + // rbd image or the image chain has the deep-flatten feature. + SkipForceFlatten bool + + // cephfs related flags + ForceKernelCephFS bool // force to use the ceph kernel client even if the kernel is < 4.17 + + SetMetadata bool // set metadata on the volume // Read affinity related options EnableReadAffinity bool // enable OSD read affinity.