libfuse: fuse_file_info Struct Reference

libfuse

Data Fields
fuse_file_info Struct Reference

`#include <fuse_common.h>`

## Data Fields
int | flags
unsigned int | writepage: 1
unsigned int | direct_io: 1
unsigned int | keep_cache: 1
unsigned int | flush: 1
unsigned int | nonseekable: 1
unsigned int | cache_readdir: 1
unsigned int | noflush: 1
unsigned int | padding: 24
uint64_t | fh
uint64_t | lock_owner
uint32_t | poll_events

## Detailed Description

Information about an open file.

File Handles are created by the open, opendir, and create methods and closed by the release and releasedir methods. Multiple file handles may be concurrently open for the same file. Generally, a client will create one file handle per file descriptor, though in some cases multiple file descriptors can share a single file handle.

Definition at line 44 of file fuse_common.h.

## Field Documentation

## ◆ cache_readdir

unsigned int fuse_file_info::cache_readdir

Can be filled in by opendir. It signals the kernel to enable caching of entries returned by readdir(). Has no effect when set in other contexts (in particular it does nothing when set by open()).

Definition at line 84 of file fuse_common.h.

## ◆ direct_io

unsigned int fuse_file_info::direct_io

Can be filled in by open, to use direct I/O on this file.

Definition at line 57 of file fuse_common.h.

## ◆ fh

uint64_t fuse_file_info::fh

File handle id. May be filled in by filesystem in create, open, and opendir(). Available in most other file operations on the same file handle.

Definition at line 97 of file fuse_common.h.

## ◆ flags

int fuse_file_info::flags

Open flags. Available in open() and release()

Definition at line 46 of file fuse_common.h.

## ◆ flush

unsigned int fuse_file_info::flush

Indicates a flush operation. Set in flush operation, also maybe set in highlevel lock operation and lowlevel release operation.

Definition at line 69 of file fuse_common.h.

## ◆ keep_cache

unsigned int fuse_file_info::keep_cache

Can be filled in by open. It signals the kernel that any currently cached file data (ie., data that the filesystem provided the last time the file was open) need not be invalidated. Has no effect when set in other contexts (in particular it does nothing when set by opendir()).

Definition at line 64 of file fuse_common.h.

## ◆ lock_owner

uint64_t fuse_file_info::lock_owner

Lock owner id. Available in locking operations and flush

Definition at line 100 of file fuse_common.h.

## ◆ noflush

unsigned int fuse_file_info::noflush

Can be filled in by open, to indicate that flush is not needed on close.

Definition at line 88 of file fuse_common.h.

## ◆ nonseekable

unsigned int fuse_file_info::nonseekable

Can be filled in by open, to indicate that the file is not seekable.

Definition at line 73 of file fuse_common.h.

## ◆ padding

unsigned int fuse_file_info::padding

Padding. Reserved for future use

Definition at line 91 of file fuse_common.h.

## ◆ poll_events

uint32_t fuse_file_info::poll_events

Requested poll events. Available in ->poll. Only set on kernels which support it. If unsupported, this field is set to zero.

Definition at line 104 of file fuse_common.h.

## ◆ writepage

unsigned int fuse_file_info::writepage

In case of a write operation indicates if this was caused by a delayed write from the page cache. If so, then the context's pid, uid, and gid fields will not be valid, and the fh value may not match the fh value that would have been sent with the corresponding individual write requests if write caching had been disabled.

Definition at line 54 of file fuse_common.h.

The documentation for this struct was generated from the following file:

- fuse-3.13.0/include/fuse_common.h