I came a long way with modifying tarfs. I managed to fool the system to read a file form another drive while the system was thinking I was reading the tar file. This would have been a good basis for the PRFS. However, I kept reading that it is not a good idea to read files from another file system in a kernel module, Also, it was rather difficult to get e.g. a list of the files and their properties.
So once again, a change of plans…
I will use the FAT32 file system and will modify it to my own file system: FATPRFS. I copied the source of the FAT system from Raspberry Pi OS. Since it was part of a larger build, I had to modify the Makefile and give the file system a new name: fatprfs. The module also exports some variables to the kernel. Since it is the same names as the official FAT source, I had to change these names too.
My micro-USB OTG adapter has not arrived yet (to mount an USB memory stick) so with Gparted (offline on another PC with Linux on Virtual Box) I made a FAT32 partition on the SD card by resizing (reducing) the ext4 partition and adding the FAT32 partition. Now I can test mounting FAT32 partitions
After some trial-and-error experimenting I got it working. I have now an fatprfs file partition! OK, it is still a normal FAT32 partition, but now I can start implementing the prfs-part in the kernel module.