FATFS porting on STM32F103 SPI Flash
FATFS is a bad choice to use directly on a flash chip without any intermediate translation layer, as writing the FAT will overwrite the same sector again and again, causing these cells to wear out quickly.


You cannot reliably determine whether a certain block has been erased. If it reads back as only ones, the chance is fairly high that this is an empty, usable block, but it could also be a block that was in the process of being erased when the power went out, so some of the bits might be unstable. A flash file system should be aware of this, and explicitly mark blocks it has successfully erased with a specific marker.
The only way to be sure is to either perform an erase immediately before, or to have a note somewhere that a certain block has been erased.
You will erase the entire block, which contains 8 sectors. If any of these sectors already contains data, it will be erased as well, which you want to avoid.


As said, FAT is not suitable for use in this way.