Files
visor/pkg/sentry/fsimpl/fuse/dev_state.go
T
Lucas ManningandgVisor bot 718b286615 Allow multiple FUSE filesystems to share a connection.
Before this change FUSE connections were shared 1:1 with FUSE filesystems, which
is incorrect behavior. A FUSE FD should have a 1:1 relationship with a FUSE
connection, and any number of FUSE filesystems can use the same connection.

PiperOrigin-RevId: 445988328
2022-05-02 11:41:42 -07:00

24 lines
788 B
Go

// Copyright 2022 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package fuse
func (fd *DeviceFD) saveFullQueueCh() int {
return cap(fd.fullQueueCh)
}
func (fd *DeviceFD) loadFullQueueCh(capacity int) {
fd.fullQueueCh = make(chan struct{}, capacity)
}