Map type BPF_MAP_TYPE_INODE_STORAGE
This map type stores data keyed on a inode. The user can only create, update or delete entries for existing inodes. When a inode is deleted, the entry for that task is automatically removed.
Userspace can read or update values for any inode, granted they have a file descriptor for that file or directory.
Attributes
The key_size
must always be 4
indicating the key is a 32-bit unsigned integer. The value_size
of the map may be any size within the limits of the kernel. max_entries
must be 0
, as the number of entries is determined by the number of sockets on the system.
This map type also requires the usage of BTF key and value types.
Syscall commands
The following syscall commands work with this map type:
Helper functions
The following helper functions work with this map type:
Flags
The following flags are supported by this map type.
BPF_F_NO_PREALLOC
This flag indicates that values for the map are not pre-allocated on creation of the map. This flag is required for the BPF_MAP_TYPE_INODE_STORAGE
map.