abbbi / nullfsvfs

a virtual black hole file system that behaves like /dev/null
GNU General Public License v3.0
290 stars 12 forks source link

opening files with o_direct fails on kernel versions >= 5.15 #14

Open abbbi opened 2 years ago

abbbi commented 2 years ago

On kernels >= 5.15 module uses ram_aops instead of nullfs_aops structure:

https://github.com/abbbi/nullfsvfs/blob/master/nullfs.c#L342

which does not expose noop direct_io (notably becuase O_DIRECT does not make sense on a FS with memory backend). Newer kenerl versions do not expose simple_readpage etc.. so the only way would be to redefine them, not sure if thats worth the hassle.