libfuse
Data Fields
fuse_conn_info Struct Reference

#include <fuse_common.h>

Data Fields

uint32_t proto_major
 
uint32_t proto_minor
 
uint32_t max_write
 
uint32_t max_read
 
uint32_t max_readahead
 
uint32_t capable
 
uint32_t want
 
uint32_t max_background
 
uint32_t congestion_threshold
 
uint32_t time_gran
 
uint32_t no_interrupt: 1
 
uint64_t capable_ext
 
uint64_t want_ext
 
uint32_t reserved [16]
 

Detailed Description

Connection information, passed to the ->init() method

Some of the elements are read-write, these can be changed to indicate the value requested by the filesystem. The requested value must usually be smaller than the indicated value.

Note: The capable and want fields are limited to 32 bits for ABI compatibility. For full 64-bit capability support, use the capable_ext and want_ext fields instead.

Definition at line 546 of file fuse_common.h.

Field Documentation

◆ capable

uint32_t fuse_conn_info::capable

Capability flags that the kernel supports (read-only)

Deprecated left over for ABI compatibility, use capable_ext

Definition at line 586 of file fuse_common.h.

◆ capable_ext

uint64_t fuse_conn_info::capable_ext

Extended capability flags that the kernel supports (read-only) This field provides full 64-bit capability support.

Definition at line 694 of file fuse_common.h.

◆ congestion_threshold

uint32_t fuse_conn_info::congestion_threshold

Kernel congestion threshold parameter. If the number of pending background requests exceeds this number, the FUSE kernel module will mark the filesystem as "congested". This instructs the kernel to expect that queued requests will take some time to complete, and to adjust its algorithms accordingly (e.g. by putting a waiting thread to sleep instead of using a busy-loop).

Definition at line 638 of file fuse_common.h.

◆ max_background

uint32_t fuse_conn_info::max_background

Maximum number of pending "background" requests. A background request is any type of request for which the total number is not limited by other means. As of kernel 4.8, only two types of requests fall into this category:

  1. Read-ahead requests
  2. Asynchronous direct I/O requests

Read-ahead requests are generated (if max_readahead is non-zero) by the kernel to preemptively fill its caches when it anticipates that userspace will soon read more data.

Asynchronous direct I/O requests are generated if FUSE_CAP_ASYNC_DIO is enabled and userspace submits a large direct I/O request. In this case the kernel will internally split it up into multiple smaller requests and submit them to the filesystem concurrently.

Note that the following requests are not background requests: writeback requests (limited by the kernel's flusher algorithm), regular (i.e., synchronous and buffered) userspace read/write requests (limited to one per thread), asynchronous read requests (Linux's io_submit(2) call actually blocks, so these are also limited to one per thread).

Definition at line 628 of file fuse_common.h.

◆ max_read

uint32_t fuse_conn_info::max_read

Maximum size of read requests. A value of zero indicates no limit. However, even if the filesystem does not specify a limit, the maximum size of read requests will still be limited by the kernel.

NOTE: For the time being, the maximum size of read requests must be set both here and passed to fuse_session_new() using the -o max_read=<n> mount option. At some point in the future, specifying the mount option will no longer be necessary.

Definition at line 574 of file fuse_common.h.

◆ max_readahead

uint32_t fuse_conn_info::max_readahead

Maximum readahead

Definition at line 579 of file fuse_common.h.

◆ max_write

uint32_t fuse_conn_info::max_write

Maximum size of the write buffer

Definition at line 560 of file fuse_common.h.

◆ no_interrupt

uint32_t fuse_conn_info::no_interrupt

Disable FUSE_INTERRUPT requests.

Enable no_interrupt option to: 1) Avoid unnecessary locking operations and list operations, 2) Return ENOSYS for the reply of FUSE_INTERRUPT request to inform the kernel not to send the FUSE_INTERRUPT request.

Definition at line 685 of file fuse_common.h.

◆ proto_major

uint32_t fuse_conn_info::proto_major

Major version of the protocol (read-only)

Definition at line 550 of file fuse_common.h.

◆ proto_minor

uint32_t fuse_conn_info::proto_minor

Minor version of the protocol (read-only)

Definition at line 555 of file fuse_common.h.

◆ reserved

uint32_t fuse_conn_info::reserved[16]

For future use.

Definition at line 709 of file fuse_common.h.

◆ time_gran

uint32_t fuse_conn_info::time_gran

When FUSE_CAP_WRITEBACK_CACHE is enabled, the kernel is responsible for updating mtime and ctime when write requests are received. The updated values are passed to the filesystem with setattr() requests. However, if the filesystem does not support the full resolution of the kernel timestamps (nanoseconds), the mtime and ctime values used by kernel and filesystem will differ (and result in an apparent change of times after a cache flush).

To prevent this problem, this variable can be used to inform the kernel about the timestamp granularity supported by the file-system. The value should be power of 10. The default is 1, i.e. full nano-second resolution. Filesystems supporting only second resolution should set this to 1000000000.

Definition at line 655 of file fuse_common.h.

◆ want

uint32_t fuse_conn_info::want

Capability flags that the filesystem wants to enable.

libfuse attempts to initialize this field with reasonable default values before calling the init() handler.

Deprecated left over for ABI compatibility. Use want_ext with the helper functions fuse_set_feature_flag() / fuse_unset_feature_flag()

Definition at line 598 of file fuse_common.h.

◆ want_ext

uint64_t fuse_conn_info::want_ext

Extended capability flags that the filesystem wants to enable. This field provides full 64-bit capability support.

Don't set this field directly, but use the helper functions fuse_set_feature_flag() / fuse_unset_feature_flag()

Definition at line 704 of file fuse_common.h.


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