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

Identifies the exFAT directory a lookup, scan or link operates in. More...

#include <ra8_fs_fat_types_internal.h>

Data Fields

uint32_t cluster
 First cluster of the directory.
uint32_t contig_end
 One past the run's last cluster; 0 => FAT-chained.
uint32_t self_cluster
 Parent cluster holding this dir's File entry; 0 => root.
uint32_t self_index
 File-entry index within self_cluster.

Detailed Description

Identifies the exFAT directory a lookup, scan or link operates in.

The exFAT counterpart of dir_loc_t, and the thing that turns this driver's flat root-only namespace into a tree: every scan used to start at m->root_cluster at exactly one call site each, and each of those now starts at one of these instead. The root needs no special case – it is the directory whose first cluster is m->root_cluster and whose run is FAT-chained.

self_cluster / self_index locate the directory's OWN File-entry set inside its parent, captured while priv_exfat_resolve_parent descends into it. Growing a subdirectory has to rewrite that set's Stream entry – DataLength and the NoFatChain flag both change – so a directory that may need to grow carries the coordinates of the metadata that describes its allocation (#677). The volume ROOT has no such set (its extent is the boot sector's FAT chain), so it leaves self_cluster 0, which priv_exfat_grow_dir reads as "no entry set to patch -- just extend the FAT chain".

Invariant
cluster is a real heap cluster (>= k_cluster_first_data).
contig_end is 0 (FAT-chained) or > cluster (contiguous run).
self_cluster is 0 (the root, or a location never captured) or a heap cluster holding this directory's File entry.
See also
priv_exfat_dir_root()
priv_exfat_dir_from_set()
Since
0.1.0

Definition at line 721 of file ra8_fs_fat_types_internal.h.

Field Documentation

◆ cluster

◆ contig_end

uint32_t exfat_dir_t::contig_end

◆ self_cluster

uint32_t exfat_dir_t::self_cluster

Parent cluster holding this dir's File entry; 0 => root.

Definition at line 724 of file ra8_fs_fat_types_internal.h.

Referenced by internal_exfat_dir_relen(), internal_exfat_enter(), priv_exfat_dir_root(), and priv_exfat_grow_dir().

◆ self_index

uint32_t exfat_dir_t::self_index

File-entry index within self_cluster.

Definition at line 725 of file ra8_fs_fat_types_internal.h.

Referenced by internal_exfat_dir_relen(), internal_exfat_enter(), and priv_exfat_dir_root().


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