FEMU
FEMU copied to clipboard
fix page size
Size of a page is 4096 bytes, which is 8 * 512 bytes, not 4096 * 512 bytes(which is 2MB).
@huaicheng
Hello James23rc, Thanks for your valid point out. I acknowledged your commit.
However, I have little worries about hardcoding the numbers such as /4096, /8. (I know /4096 things are we did, but still) So I'm considering not to take your commit, at the moment. Please see the reason below.
Size of the page in SSD is also a configurable parameter(Scalability) and hardcoding such as ( lba / 8 ) hinders understanding the code.(Code visibility)
Using macro something like this is better, this is just an example
#define _4KB 4096
#define LBA_TO_LPN (SSD_PAGE_SIZE / HOST_LBA_SIZE)
Again, appreciate for your commit, we will reflect your point soon :)