rdos wrote:
1. Both of them support only 4k blocks, so it seems safe to refuse to work with discs that cannot handle 4k blocks.
Many NVMe SSDs support 512-byte blocks, and some of them are factory-formatted with 512-byte blocks.
rdos wrote:
2. Both of them support two interrupts on MSI. I think this can be used to assign the I/O queue to the second interrupt.
Most NVMe drives support more than two interrupts, but that may only be through MSI-X. NVMe is meant to be used with one set of I/O queues per logical CPU to avoid IPC.
rdos wrote:
3. Both of them support more than one 4k page for the admin submit and complete queues. Thus, allocating one 4k page per admin queue seems reasonable.
That should be more than enough for the admin queues.
rdos wrote:
I would suspect namespaces and all the rest only have a single entry, and this is something that probably can be relied on too.
Support for multiple namespaces is rare, but they do exist.
rdos wrote:
Another issue I have is sector size. The controller only seems to handle 4k requests, and FAT has 512 byte sectors. How do Windows format FAT on NVMe? Will it write 512 bytes per sector in the boot record?
...I'll have to dig up a 4k-sectored disk and get back to you on that.