ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
fat_alloc_state_t Struct Reference

One mounted volume's answer to "where is the free space". More...

Collaboration diagram for fat_alloc_state_t:

Data Fields

const ra8_fs_mount_towner
 Mount this slot describes; NULL = free.
uint32_t next_free
 Cluster the next scan starts at.
uint32_t free_count
 Free clusters, or k_fs_free_unknown.
uint32_t fsinfo_lba
 FSInfo sector, or k_fs_fsinfo_absent.
uint64_t bitmap_lba
 exFAT bitmap LBA, or unknown.
uint8_t dirty
 1 = FSInfo needs a writeback.

Detailed Description

One mounted volume's answer to "where is the free space".

Bound by priv_alloc_state_bind and released by priv_alloc_state_release, so it always describes the volume currently at owner and never a previous tenant of the same mount slot.

Invariant
owner == nullptr exactly when the slot is free.
next_free >= k_cluster_first_data in a bound slot.
fsinfo_lba == k_fs_fsinfo_absent unless the volume carries a fully validated FSInfo sector.
See also
priv_alloc_state_bind()
Since
0.1.0

Definition at line 71 of file ra8_fs_fat_alloc.c.

Field Documentation

◆ bitmap_lba

uint64_t fat_alloc_state_t::bitmap_lba

exFAT bitmap LBA, or unknown.

Definition at line 76 of file ra8_fs_fat_alloc.c.

Referenced by priv_alloc_state_bind(), and priv_exfat_bitmap_lba().

◆ dirty

uint8_t fat_alloc_state_t::dirty

1 = FSInfo needs a writeback.

Definition at line 77 of file ra8_fs_fat_alloc.c.

Referenced by priv_alloc_state_bind(), priv_free_count_gave(), priv_free_count_took(), and priv_fsinfo_flush().

◆ free_count

◆ fsinfo_lba

uint32_t fat_alloc_state_t::fsinfo_lba

FSInfo sector, or k_fs_fsinfo_absent.

Definition at line 75 of file ra8_fs_fat_alloc.c.

Referenced by priv_alloc_state_bind(), priv_fsinfo_flush(), and priv_fsinfo_seed().

◆ next_free

uint32_t fat_alloc_state_t::next_free

◆ owner

const ra8_fs_mount_t* fat_alloc_state_t::owner

Mount this slot describes; NULL = free.

Definition at line 72 of file ra8_fs_fat_alloc.c.

Referenced by priv_alloc_state_bind().


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