Documentation ¶
Overview ¶
Package openfiletable maintains a table of currently opened files, identified by the device number + inode number pair. This table is used by fusefrontend to centrally store the current file ID and to lock files against concurrent writes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountOpenFiles ¶ added in v1.7.1
func CountOpenFiles() int
CountOpenFiles returns how many entries are currently in the table in a threadsafe manner.
func Unregister ¶
Unregister decrements the reference count for "qi" and deletes the entry from the open file table if the reference count reaches 0.
func WriteOpCount ¶
func WriteOpCount() uint64
WriteOpCount returns the write lock counter value. This value is incremented each time writeLock.Lock() on a file table entry is called.
Types ¶
type Entry ¶
type Entry struct { // ContentLock protects on-disk content from concurrent writes. Every writer // must take this lock before modifying the file content. ContentLock countingMutex // ID is the file ID in the file header. ID []byte // IDLock must be taken before reading or writing the ID field in this struct, // unless you have an exclusive lock on ContentLock. IDLock sync.Mutex // contains filtered or unexported fields }
Entry is an entry in the open file table
Click to show internal directories.
Click to hide internal directories.