aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util.h
AgeCommit message (Collapse)AuthorLines
2024-12-18Allow to have page aligned writesBernd Schubert-0/+2
Read/writes IOs should be page aligned as fuse server might need to copy data to another buffer otherwise in order to fulfill network or device storage requirements. Simple reproducer is example/passthrough* and opening a file with O_DIRECT - without this change writing to that file failed with -EINVAL if the underlying file system was using ext4 (for passthrough_hp the 'passthrough' feature has to be disabled). The mis-alignment from fuse kernel is not ideal, but we can handle it by allocation one page more than needed and then using a buffer that is set up to compensate for kernel misalignment. This also only set se->buf_reallocable to true when called by a libfuse internal caller - we do not know what external callers are doing with the buffer - update to commit 0e0f43b79b9b
2024-10-11Add libfuse util strtol wrapperJoanne Koong-0/+1
Add a wrapper around strtol for more rigorous error checking and convert uses of atoi and strtol to use this instead.