MCPcopy
hub / github.com/cubefs/cubefs / Create_ll

Method Create_ll

sdk/meta/api.go:113–131  ·  view source on GitHub ↗
(parentID uint64, name string, mode, uid, gid uint32, target []byte, fullPath string, ignoreExist bool)

Source from the content-addressed store, hash-verified

111}
112
113func (mw *MetaWrapper) Create_ll(parentID uint64, name string, mode, uid, gid uint32, target []byte, fullPath string, ignoreExist bool) (*proto.InodeInfo, error) {
114 // if mw.EnableTransaction {
115 var txMask proto.TxOpMask
116 if proto.IsRegular(mode) {
117 txMask = proto.TxOpMaskCreate
118 } else if proto.IsDir(mode) {
119 txMask = proto.TxOpMaskMkdir
120 } else if proto.IsSymlink(mode) {
121 txMask = proto.TxOpMaskSymlink
122 } else {
123 txMask = proto.TxOpMaskMknod
124 }
125 txType := proto.TxMaskToType(txMask)
126 if mw.enableTx(txMask) && txType != proto.TxTypeUndefined {
127 return mw.txCreate_ll(parentID, name, mode, uid, gid, target, txType, fullPath, ignoreExist)
128 } else {
129 return mw.create_ll(parentID, name, mode, uid, gid, target, fullPath, ignoreExist)
130 }
131}
132
133func (mw *MetaWrapper) txCreate_ll(parentID uint64, name string, mode, uid, gid uint32, target []byte, txType uint32,
134 fullPath string, ignoreExist bool,

Callers 14

createMethod · 0.80
mkdirMethod · 0.80
SymLinkMethod · 0.80
cfs_symlinkFunction · 0.80
createMethod · 0.80
mkdirMethod · 0.80
CreateMethod · 0.80
MkdirMethod · 0.80
MknodMethod · 0.80
SymlinkMethod · 0.80
SetXAttrMethod · 0.80

Calls 7

enableTxMethod · 0.95
txCreate_llMethod · 0.95
create_llMethod · 0.95
IsRegularFunction · 0.92
IsDirFunction · 0.92
IsSymlinkFunction · 0.92
TxMaskToTypeFunction · 0.92

Tested by

no test coverage detected