LLFIO  v2.00
llfio_v2_xxx::statfs_t Struct Reference

Metadata about a filing system. Unsupported entries are all bits set. More...

#include "statfs.hpp"

Classes

struct  f_flags_t
 

Public Types

enum  bitfield__want : unsigned {
  flags = 1 << 0 , bsize = 1 << 1 , iosize = 1 << 2 , blocks = 1 << 3 ,
  bfree = 1 << 4 , bavail = 1 << 5 , files = 1 << 6 , ffree = 1 << 7 ,
  namemax = 1 << 8 , owner = 1 << 9 , fsid = 1 << 10 , fstypename = 1 << 11 ,
  mntfromname = 1 << 12 , mntonname = 1 << 13 , iosinprogress = 1 << 14 , iosbusytime = 1 << 15 ,
  all = static_cast<unsigned>(-1)
}
 Used to indicate what metadata should be filled in.
 

Public Member Functions

 statfs_t ()
 Constructs a default initialised instance (all bits set)
 
result< size_t > fill (const handle &h, want wanted=want::all) noexcept
 Fills in the structure with metadata, returning number of items filled in.
 

Public Attributes

struct llfio_v2_xxx::statfs_t::f_flags_t f_flags
 
uint64_t f_bsize {_allbits1_64}
 
uint64_t f_iosize {_allbits1_64}
 
uint64_t f_blocks {_allbits1_64}
 
uint64_t f_bfree {_allbits1_64}
 
uint64_t f_bavail {_allbits1_64}
 
uint64_t f_files {_allbits1_64}
 
uint64_t f_ffree {_allbits1_64}
 
uint32_t f_namemax {_allbits1_32}
 
int16_t f_owner {-1}
 
uint64_t f_fsid [2] {_allbits1_64, _allbits1_64}
 
std::string f_fstypename
 
std::string f_mntfromname
 
filesystem::path f_mntonname
 
uint32_t f_iosinprogress {_allbits1_32}
 
float f_iosbusytime {_allbits1_float}
 

Static Public Attributes

static constexpr uint32_t _allbits1_32 = ~0U
 
static constexpr uint64_t _allbits1_64 = ~0ULL
 
static constexpr float _allbits1_float = detail::constexpr_float_allbits_set_nan()
 

Detailed Description

Metadata about a filing system. Unsupported entries are all bits set.

Note also that for some fields, a soft failure to read the requested value manifests as all bits set. For example, f_iosinprogress might not be computable if the filing system for your handle reports a dev_t from fstat() which does not match anything in the system's disk hardware i/o stats. As this can be completely benign (e.g. your handle is a socket), this is treated as a soft failure.

Note for f_iosinprogress and f_iosbusytime that support is not implemented yet outside Microsoft Windows and Linux. Note also that for Linux, filing systems spanning multiple hardware devices have undefined outcomes, whereas on Windows you are given the average of the values for all underlying hardware devices. Code donations improving the support for these items on Mac OS, FreeBSD and Linux would be welcomed.

Member Data Documentation

◆ f_bavail

uint64_t llfio_v2_xxx::statfs_t::f_bavail {_allbits1_64}

free blocks avail to non-superuser (Windows, POSIX)

◆ f_bfree

uint64_t llfio_v2_xxx::statfs_t::f_bfree {_allbits1_64}

free blocks in filesystem (Windows, POSIX)

◆ f_blocks

uint64_t llfio_v2_xxx::statfs_t::f_blocks {_allbits1_64}

total data blocks in filesystem (Windows, POSIX)

◆ f_bsize

uint64_t llfio_v2_xxx::statfs_t::f_bsize {_allbits1_64}

fundamental filesystem block size (Windows, POSIX)

◆ f_ffree

uint64_t llfio_v2_xxx::statfs_t::f_ffree {_allbits1_64}

free nodes avail to non-superuser (POSIX)

◆ f_files

uint64_t llfio_v2_xxx::statfs_t::f_files {_allbits1_64}

total file nodes in filesystem (POSIX)

◆ f_flags

struct llfio_v2_xxx::statfs_t::f_flags_t llfio_v2_xxx::statfs_t::f_flags

copy of mount exported flags (Windows, POSIX)

◆ f_fsid

uint64_t llfio_v2_xxx::statfs_t::f_fsid[2] {_allbits1_64, _allbits1_64}

filesystem id (Windows, POSIX)

◆ f_fstypename

std::string llfio_v2_xxx::statfs_t::f_fstypename

filesystem type name (Windows, POSIX)

◆ f_iosbusytime

float llfio_v2_xxx::statfs_t::f_iosbusytime {_allbits1_float}

percentage of time spent doing i/o (1.0 = 100%) (Windows, Linux)

◆ f_iosinprogress

uint32_t llfio_v2_xxx::statfs_t::f_iosinprogress {_allbits1_32}

i/o's currently in progress (i.e. queue depth) (Windows, Linux)

◆ f_iosize

uint64_t llfio_v2_xxx::statfs_t::f_iosize {_allbits1_64}

optimal transfer block size (Windows, POSIX)

◆ f_mntfromname

std::string llfio_v2_xxx::statfs_t::f_mntfromname

mounted filesystem (Windows, POSIX)

◆ f_mntonname

filesystem::path llfio_v2_xxx::statfs_t::f_mntonname

directory on which mounted (Windows, POSIX)

◆ f_namemax

uint32_t llfio_v2_xxx::statfs_t::f_namemax {_allbits1_32}

maximum filename length (Windows, POSIX)

◆ f_owner

int16_t llfio_v2_xxx::statfs_t::f_owner {-1}

user that mounted the filesystem (BSD, OS X)


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