LLFIO
v2.00
|
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() |
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.
uint64_t llfio_v2_xxx::statfs_t::f_bavail {_allbits1_64} |
free blocks avail to non-superuser (Windows, POSIX)
uint64_t llfio_v2_xxx::statfs_t::f_bfree {_allbits1_64} |
free blocks in filesystem (Windows, POSIX)
uint64_t llfio_v2_xxx::statfs_t::f_blocks {_allbits1_64} |
total data blocks in filesystem (Windows, POSIX)
uint64_t llfio_v2_xxx::statfs_t::f_bsize {_allbits1_64} |
fundamental filesystem block size (Windows, POSIX)
uint64_t llfio_v2_xxx::statfs_t::f_ffree {_allbits1_64} |
free nodes avail to non-superuser (POSIX)
uint64_t llfio_v2_xxx::statfs_t::f_files {_allbits1_64} |
total file nodes in filesystem (POSIX)
struct llfio_v2_xxx::statfs_t::f_flags_t llfio_v2_xxx::statfs_t::f_flags |
copy of mount exported flags (Windows, POSIX)
uint64_t llfio_v2_xxx::statfs_t::f_fsid[2] {_allbits1_64, _allbits1_64} |
filesystem id (Windows, POSIX)
std::string llfio_v2_xxx::statfs_t::f_fstypename |
filesystem type name (Windows, POSIX)
float llfio_v2_xxx::statfs_t::f_iosbusytime {_allbits1_float} |
percentage of time spent doing i/o (1.0 = 100%) (Windows, Linux)
uint32_t llfio_v2_xxx::statfs_t::f_iosinprogress {_allbits1_32} |
i/o's currently in progress (i.e. queue depth) (Windows, Linux)
uint64_t llfio_v2_xxx::statfs_t::f_iosize {_allbits1_64} |
optimal transfer block size (Windows, POSIX)
std::string llfio_v2_xxx::statfs_t::f_mntfromname |
mounted filesystem (Windows, POSIX)
filesystem::path llfio_v2_xxx::statfs_t::f_mntonname |
directory on which mounted (Windows, POSIX)
uint32_t llfio_v2_xxx::statfs_t::f_namemax {_allbits1_32} |
maximum filename length (Windows, POSIX)
int16_t llfio_v2_xxx::statfs_t::f_owner {-1} |
user that mounted the filesystem (BSD, OS X)