daxfs implements neither ->fallocate nor ->direct_IO, so fallocate() returns -EOPNOTSUPP and O_DIRECT opens fail.
Neither is likely to matter much for a memory filesystem, but the combination has a practical consequence worth recording: benchmarking daxfs with fio requires --fallocate=none --direct=0, and preallocating a file is only possible by writing it. Combined with #17, where a truncate-extended range used to read short, laying out a test file with truncate did not work either.
->fallocate is the one with a real use case: preallocating overlay pages up front would let a writer reserve pool capacity and fail early with -ENOSPC, rather than discovering the pool is exhausted mid-write and taking a short write. That maps cleanly onto daxfs_write_prealloc(), which already batch-allocates pages for a range.
->direct_IO is arguably meaningless here, since reads already bypass the page cache. Probably worth an explicit note rather than an implementation.
Found during the review in #15.
daxfs implements neither
->fallocatenor->direct_IO, sofallocate()returns-EOPNOTSUPPandO_DIRECTopens fail.Neither is likely to matter much for a memory filesystem, but the combination has a practical consequence worth recording: benchmarking daxfs with fio requires
--fallocate=none --direct=0, and preallocating a file is only possible by writing it. Combined with #17, where a truncate-extended range used to read short, laying out a test file withtruncatedid not work either.->fallocateis the one with a real use case: preallocating overlay pages up front would let a writer reserve pool capacity and fail early with-ENOSPC, rather than discovering the pool is exhausted mid-write and taking a short write. That maps cleanly ontodaxfs_write_prealloc(), which already batch-allocates pages for a range.->direct_IOis arguably meaningless here, since reads already bypass the page cache. Probably worth an explicit note rather than an implementation.Found during the review in #15.