Octocontrabass wrote:
Additionally, Part 2 does not "recommend" the filesystem, it requires the filesystem.
Despite of this "requirement", I can read and write an SD card with raw data. I had absolutely no problems using my own, totally custom file system either. Works like a charm, and I'm still using the same 4 or 5 years old cards without any signs of shortened life time.
Octocontrabass wrote:
It goes on to require exactly one partition, formatted to use the full capacity of the card.
The same, I never had problems using more partitions on an SD card. Raspbian also has more partitions (some of which are not FAT at all) without any problems, which questions this so called "requirement". To paraphrase Euclid, never believe something just because someone said so (and if I may add, specially don't believe when that someone is financially interested to say that something).
Octocontrabass wrote:
that means the card may examine filesystem structures
Okay, now I see what confused you.
The card does not examine file system structures. It only checks the written data size, and expects the higher level (FS and block) driver to tell whether the next sector to be written is a directory entry, allocation data, bitmap etc. That's what the CMD20 is for, see section 4.13.2.8 Speed Class Control:
Quote:
Speed Class Control (SCC) in argument controls several functions which assist the card supporting and meeting Class performance.
And also section 4.13.2.5 CI (Continuous Information) Update
Quote:
CI (Continuous Information) is a new structure used to manage exFAT file fragments. It is newly defined in the Part2 File System Specification Version 3.00. CI may be updated during Speed Class recording. Creating a CI is optional for the host.
...
CI is always written by a 512-byte single block write (either CMD24 or CMD25) and preceded by CMD20 Update CI command.
In other words, the card doesn't care if the data written is a FAT directory entry for example, it only cares about if it's flagged as one. Surely you can flag a directory entry write for ext4 too.
But let's take a step back. What would happen if you don't tell the card what kind of sector are you about to write? The answer is in section 4.13.2.6 Distinction of Data Type:
Quote:
To satisfy Class performance, an SDXC card needs to distinguish between each type of data in order to treat them properly. For example, a directory entry and CI can be distinguished by their data size (always written as 512B), so the card can store them in separate areas from the stream data.
Simply put, if no CMD20 issued, then single sector writes will be assigned a real sector address from a different pool than multiple writes. That's all.
But if despite all of this using exclusively the limited FAT file system makes you happy, then do so. I'll keep using partitions and better file systems on the SD card without probs in the meantime
Let's close this discussion with this conclusion.
Have a nice day,
bzt