mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(master): update bcache report info. #22845037
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
This commit is contained in:
parent
02c720959b
commit
e3abe5fc97
@ -34,7 +34,6 @@ import (
|
||||
"github.com/cubefs/cubefs/proto"
|
||||
"github.com/cubefs/cubefs/sdk/data/blobstore"
|
||||
"github.com/cubefs/cubefs/sdk/data/stream"
|
||||
"github.com/cubefs/cubefs/sdk/master"
|
||||
"github.com/cubefs/cubefs/sdk/meta"
|
||||
"github.com/cubefs/cubefs/util"
|
||||
"github.com/cubefs/cubefs/util/auditlog"
|
||||
@ -132,8 +131,6 @@ func NewSuper(opt *proto.MountOptions) (s *Super, err error) {
|
||||
return nil, errors.Trace(err, "NewMetaWrapper failed!"+err.Error())
|
||||
}
|
||||
|
||||
master.BcacheOnlyForNotSSD = opt.EnableBcache && opt.BcacheOnlyForNotSSD
|
||||
|
||||
s.SetTransaction(opt.EnableTransaction, opt.TxTimeout, opt.TxConflictRetryNum, opt.TxConflictRetryInterval)
|
||||
s.mw.EnableQuota = opt.EnableQuota
|
||||
|
||||
|
||||
@ -742,6 +742,7 @@ func mount(opt *proto.MountOptions) (fsConn *fuse.Conn, super *cfs.Super, err er
|
||||
}
|
||||
}
|
||||
|
||||
master.BcacheOnlyForNotSSD = opt.EnableBcache && opt.BcacheOnlyForNotSSD
|
||||
super, err = cfs.NewSuper(opt)
|
||||
if err != nil {
|
||||
log.LogError(errors.Stack(err))
|
||||
|
||||
@ -46,12 +46,6 @@ func (cm *ClientMgr) PutItem(ip, host, vol, version, role, enableBcache string)
|
||||
role = defaultRole
|
||||
}
|
||||
|
||||
if enableBcache == "1" {
|
||||
enableBcache = "true"
|
||||
} else {
|
||||
enableBcache = "false"
|
||||
}
|
||||
|
||||
key := fmt.Sprintf("_%s_%s_%s_%s_%s_enableBcache-%s", vol, version, role, ip, host, enableBcache)
|
||||
|
||||
if len(cm.clients) > maxClientCnt {
|
||||
|
||||
@ -1436,7 +1436,7 @@ func (i *Inode) RestoreExts2NextLayer(mpId uint64, delExtentsOrigin []proto.Exte
|
||||
log.LogInfof("action[RestoreMultiSnapExts] mpId [%v] curVer [%v] delExtents size [%v] hist len [%v]", mpId, curVer, len(delExtentsOrigin), i.getLayerLen())
|
||||
// no version left.all old versions be deleted
|
||||
if i.isEmptyVerList() {
|
||||
log.LogWarnf("action[RestoreMultiSnapExts] mpId [%v] inode[%v] restore have no old version left", mpId, i.Inode)
|
||||
log.LogInfof("action[RestoreMultiSnapExts] mpId [%v] inode[%v] restore have no old version left", mpId, i.Inode)
|
||||
return delExtentsOrigin, nil
|
||||
}
|
||||
lastSeq := i.multiSnap.multiVersions[idx].getVer()
|
||||
|
||||
@ -384,12 +384,12 @@ var GApiInfo map[string]string = map[string]string{
|
||||
}
|
||||
|
||||
const (
|
||||
MetaFollowerReadKey = "metaFollowerRead"
|
||||
LeaderRetryTimeoutKey = "leaderRetryTimeout"
|
||||
VolEnableDirectRead = "directRead"
|
||||
HostKey = "host"
|
||||
ClientVerKey = "clientVer"
|
||||
RoleKey = "role"
|
||||
MetaFollowerReadKey = "metaFollowerRead"
|
||||
LeaderRetryTimeoutKey = "leaderRetryTimeout"
|
||||
VolEnableDirectRead = "directRead"
|
||||
HostKey = "host"
|
||||
ClientVerKey = "clientVer"
|
||||
RoleKey = "role"
|
||||
BcacheOnlyForNotSSDKey = "enableBcacheNotSSD"
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user