mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cephfs: add read affinity mount option
This commit makes use of crush location labels from node labels to supply `crush_location` and `read_from_replica=localize` options during mount. Using these options, cephfs will be able to redirect reads to the closest OSD, improving performance. Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -71,11 +71,10 @@ func NewNodeServer(
|
||||
t string,
|
||||
nodeLabels, topology, crushLocationMap map[string]string,
|
||||
) (*rbd.NodeServer, error) {
|
||||
cliReadAffinityMapOptions := util.ConstructReadAffinityMapOption(crushLocationMap)
|
||||
ns := rbd.NodeServer{
|
||||
DefaultNodeServer: csicommon.NewDefaultNodeServer(d, t, topology),
|
||||
VolumeLocks: util.NewVolumeLocks(),
|
||||
NodeLabels: nodeLabels,
|
||||
CLIReadAffinityMapOptions: util.ConstructReadAffinityMapOption(crushLocationMap),
|
||||
DefaultNodeServer: csicommon.NewDefaultNodeServer(d, t, cliReadAffinityMapOptions, topology, nodeLabels),
|
||||
VolumeLocks: util.NewVolumeLocks(),
|
||||
}
|
||||
|
||||
return &ns, nil
|
||||
|
Reference in New Issue
Block a user