Skip to main content

is_block_backed

Function is_block_backed 

Source
pub(crate) fn is_block_backed(st_dev: u64, fs_magic: u32) -> bool
Expand description

Whether a filesystem with the given st_dev and statfs magic is backed by a block device.

The kernel gives filesystems without one (virtiofs, NFS, tmpfs, overlayfs, …) an anonymous device number, whose major is 0. btrfs and ZFS get anonymous device numbers too (btrfs one per subvolume) even though they sit on block devices, so those are recognized by their magic.