I am developing a filesystem module for linux kernel.
In my implementation, sector size = block size = page size = 4KB
In the address space operations, I would like to do something which involves the sector number. Basically, give a struct page* page
, I want to find the sector_t block
whose data page
holds.
I asked chatGPT for help. It gave me 3 solutions: page_to_pfn
, page_to_sector
, page_to_phys
. However, I am not able to find the header files where they are declared. Nor am I able to find documentation for them.