// DynamicLargeObjectMove moves a dynamic large object from srcContainer, srcObjectName to dstContainer, dstObjectName
487542
func (c *Connection) DynamicLargeObjectMove(srcContainer string, srcObjectName string, dstContainer string, dstObjectName string) error {
	info, headers, err := c.Object(dstContainer, srcObjectName)
	if err != nil {
		return err
	}

	segmentContainer, segmentPath := parseFullPath(headers["X-Object-Manifest"])
	if err := c.createDLOManifest(dstContainer, dstObjectName, segmentContainer+"/"+segmentPath, info.ContentType); err != nil {
		return err
	}

	if err := c.ObjectDelete(srcContainer, srcObjectName); err != nil {
		return err
	}

	return nil
}
940580
func (sc *SpriteContainer) OnTouchMove(x, y float32) {
	sc.emitTouchEvent(x, y, touchMove)
}
665237
func (b *BlockSplitterSimple) SetMaxDirEntriesByBlockSize(
	codec kbfscodec.Codec) error {
	dirEnv := os.Getenv("KEYBASE_BSPLIT_MAX_DIR_ENTRIES")
	if len(dirEnv) > 0 {
		// Don't override the environment variable.
		return nil
	}

	block := NewDirBlock().(*DirBlock)
	bigName := strings.Repeat("a", MaxNameBytesDefault)
	// Make "typical" DirEntry, though the max dir entry is a bit
	// bigger than this (can contain a variable-length symlink path,
	// for example).
	de := DirEntry{
		BlockInfo: BlockInfo{
			BlockPointer: BlockPointer{
				DirectType: DirectBlock,
			},
		},
		EntryInfo: EntryInfo{
			PrevRevisions: PrevRevisions{
				{Revision: 0, Count: 0},
				{Revision: 1, Count: 1},
				{Revision: 2, Count: 2},
				{Revision: 3, Count: 3},
				{Revision: 4, Count: 4},
			},
		},
	}
	block.Children[bigName] = de
	encodedBlock, err := codec.Encode(block)
	if err != nil {
		return err
	}
	oneEntrySize := int64(len(encodedBlock))
	b.maxDirEntriesPerBlock = int(b.maxSize / oneEntrySize)
	if b.maxDirEntriesPerBlock == 0 {
		b.maxDirEntriesPerBlock = 1
	}
	return nil
}
1174321
func (window *Window) Wmove(y, x int) {
	C.wmove(window.cwin, C.int(y), C.int(x))
}
718441
func (tx *Tx) LargeObjects() (*LargeObjects, error) {
	if tx.conn.fp == nil {
		tx.conn.fp = newFastpath(tx.conn)
	}
	if _, exists := tx.conn.fp.fns["lo_open"]; !exists {
		res, err := tx.Query(largeObjectFns)
		if err != nil {
			return nil, err
		}
		if err := tx.conn.fp.addFunctions(res); err != nil {
			return nil, err
		}
	}

	lo := &LargeObjects{fp: tx.conn.fp}
	_, lo.Has64 = lo.fp.fns["lo_lseek64"]

	return lo, nil
}
1038031
func (c *Client) ResizeVolume(p *ResizeVolumeParameter) (*Volume, error) {
	obj, err := c.Request("resizeVolume", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Volume), err
}
20877
func (v *LargeDeltas) MarshalLogObject(enc zapcore.ObjectEncoder) (err error) {
	if v == nil {
		return nil
	}
	if v.B1 != nil {
		err = multierr.Append(err, enc.AddObject("b1", v.B1))
	}
	if v.B10 != nil {
		err = multierr.Append(err, enc.AddObject("b10", v.B10))
	}
	if v.B100 != nil {
		err = multierr.Append(err, enc.AddObject("b100", v.B100))
	}
	if v.CheckTrue != nil {
		enc.AddBool("check_true", *v.CheckTrue)
	}
	if v.B1000 != nil {
		err = multierr.Append(err, enc.AddObject("b1000", v.B1000))
	}
	if v.CheckFalse != nil {
		enc.AddBool("check_false", *v.CheckFalse)
	}
	if v.Vertwo2000 != nil {
		err = multierr.Append(err, enc.AddObject("vertwo2000", v.Vertwo2000))
	}
	if v.ASet2500 != nil {
		err = multierr.Append(err, enc.AddArray("a_set2500", (_Set_String_Zapper)(v.ASet2500)))
	}
	if v.Vertwo3000 != nil {
		err = multierr.Append(err, enc.AddObject("vertwo3000", v.Vertwo3000))
	}
	if v.BigNumbers != nil {
		err = multierr.Append(err, enc.AddArray("big_numbers", (_List_I32_Zapper)(v.BigNumbers)))
	}
	return err
}
293662
func (b *Builder) closeCompactArrayOrObject(tos ValueLength, isArray bool, index indexVector) bool {
	// use compact notation
	nrItems := len(index)
	nrItemsLen := getVariableValueLength(ValueLength(nrItems))
	vpackAssert(nrItemsLen > 0)

	byteSize := b.buf.Len() - (tos + 8) + nrItemsLen
	vpackAssert(byteSize > 0)

	byteSizeLen := getVariableValueLength(byteSize)
	byteSize += byteSizeLen
	if getVariableValueLength(byteSize) != byteSizeLen {
		byteSize++
		byteSizeLen++
	}

	if byteSizeLen < 9 {
		// can only use compact notation if total byte length is at most 8 bytes long
		if isArray {
			b.buf[tos] = 0x13
		} else {
			b.buf[tos] = 0x14
		}

		valuesLen := b.buf.Len() - (tos + 9) // Amount of bytes taken up by array/object values.
		if valuesLen > 0 && byteSizeLen < 8 {
			// We have array/object values and our byteSize needs less than the pre-allocated 8 bytes.
			// So we move the array/object values back.
			checkOverflow(valuesLen)
			src := b.buf[tos+9:]
			copy(b.buf[tos+1+byteSizeLen:], src[:valuesLen])
		}
		// Shrink buffer, removing unused space allocated for byteSize.
		b.buf.Shrink(uint(8 - byteSizeLen))

		// store byte length
		vpackAssert(byteSize > 0)
		storeVariableValueLength(b.buf, tos+1, byteSize, false)

		// store nrItems
		b.buf.Grow(uint(nrItemsLen))
		storeVariableValueLength(b.buf, tos+byteSize-1, ValueLength(len(index)), true)

		b.stack.Pop()
		return true
	}
	return false
}
855467
func (o *LargeObject) Truncate(size int64) (err error) {
	if o.lo.Has64 {
		_, err = o.lo.fp.CallFn("lo_truncate64", []fpArg{fpIntArg(o.fd), fpInt64Arg(size)})
	} else {
		_, err = o.lo.fp.CallFn("lo_truncate", []fpArg{fpIntArg(o.fd), fpIntArg(int32(size))})
	}
	return
}
686085
func NewMoveBatchArg(Entries []*RelocationPath) *MoveBatchArg {
	s := new(MoveBatchArg)
	s.Entries = Entries
	s.Autorename = false
	s.AllowOwnershipTransfer = false
	return s
}
869533
func (a *SetDeviceMetricsOverrideArgs) SetDontSetVisibleSize(dontSetVisibleSize bool) *SetDeviceMetricsOverrideArgs {
	a.DontSetVisibleSize = &dontSetVisibleSize
	return a
}
99417
func NewVolumeResizeMap(kubeClient clientset.Interface) VolumeResizeMap {
	resizeMap := &volumeResizeMap{}
	resizeMap.pvcrs = make(map[types.UniquePVCName]*PVCWithResizeRequest)
	resizeMap.kubeClient = kubeClient
	return resizeMap
}
477941
func (c *Connection) DynamicLargeObjectCreate(opts *LargeObjectOpts) (LargeObjectFile, error) {
	opts.Flags = os.O_TRUNC | os.O_CREATE
	return c.DynamicLargeObjectCreateFile(opts)
}
520259
func NewObjectCache(dp datapath.Datapath, nodeCfg *datapath.LocalNodeConfiguration) *objectCache {
	return newObjectCache(dp, nodeCfg, option.Config.StateDir)
}
950146
func (c *Connection) LargeObjectDelete(container string, objectName string) error {
	_, headers, err := c.Object(container, objectName)
	if err != nil {
		return err
	}

	var objects [][]string
	if headers.IsLargeObject() {
		segmentContainer, segments, err := c.getAllSegments(container, objectName, headers)
		if err != nil {
			return err
		}
		for _, obj := range segments {
			objects = append(objects, []string{segmentContainer, obj.Name})
		}
	}
	objects = append(objects, []string{container, objectName})

	info, err := c.cachedQueryInfo()
	if err == nil && info.SupportsBulkDelete() && len(objects) > 0 {
		filenames := make([]string, len(objects))
		for i, obj := range objects {
			filenames[i] = obj[0] + "/" + obj[1]
		}
		_, err = c.doBulkDelete(filenames)
		// Don't fail on ObjectNotFound because eventual consistency
		// makes this situation normal.
		if err != nil && err != Forbidden && err != ObjectNotFound {
			return err
		}
	} else {
		for _, obj := range objects {
			if err := c.ObjectDelete(obj[0], obj[1]); err != nil {
				return err
			}
		}
	}

	return nil
}
1338263
func (_class VMClass) SetMemoryDynamicRange(sessionID SessionRef, self VMRef, min int, max int) (_err error) {
	_method := "VM.set_memory_dynamic_range"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVMRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_minArg, _err := convertIntToXen(fmt.Sprintf("%s(%s)", _method, "min"), min)
	if _err != nil {
		return
	}
	_maxArg, _err := convertIntToXen(fmt.Sprintf("%s(%s)", _method, "max"), max)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg, _minArg, _maxArg)
	return
}
1080805
func ShallowSizeOf(obj interface{}) int64 {
	if obj == nil {
		return 0
	}
	clz := reflect.TypeOf(obj)
	if clz.Kind() == reflect.Slice {
		return shallowSizeOfArray(obj)
	}
	return ShallowSizeOfInstance(clz)
}