On implementing vnop_mmap
, vnop_strategy
and other related VNOPs
as suggested in https://developer.apple.com/forums/thread/756358 my vnop_strategy
routine ends up zero-extending files.
I don't understand why my filesystem behaves as described above.
Perusing the source code of both the relevant parts of Darwin/XNU
and SMBClient
did not clarify things for me.
A nudge in the right direction would be greatly appreciated.
The technical details of the issue are given in the plain text file attached, as some text was found to be sensitive. Unsure what exactly it was.
Looking at your specific example:
49152 / 16384 (16k) = 3
34288 / 16384 (16k) = ~2.09
Have you looked closely at exactly what inputs you received and what you then wrote back out? The simplest explanation here would be that your wrote back out the "full" pages you received from the kernel (which would have been zero filled) instead of only writing out the logical data of the file.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware