You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overlay data keys pack the page offset into 20 bits (include/daxfs_format.h:168):
#defineDAXFS_OVL_MAX_PGOFF 0xFFFFDULL
so a writable file is capped at 0xFFFFE << PAGE_SHIFT, about 4 GiB with 4 KiB pages and 64 GiB with 64 KiB pages. daxfs_overlay_alloc_page() and friends (daxfs/overlay.c:538, :565, :639) enforce it by returning NULL, which daxfs_write_iter() turns into:
returntotal ? total : -ENOSPC;
Two problems:
Wrong errno. The filesystem is not out of space, the file hit its maximum size. That is -EFBIG, and it should raise SIGXFSZ the way generic_write_check_limits() does. -ENOSPC sends anyone debugging it to look at pool capacity, which is fine.
Undocumented. The limit is not in the README and there is no way to discover it short of hitting it. s_maxbytes is MAX_LFS_FILESIZE (daxfs: Fix superblock and inode geometry reported to the VFS #14), deliberately, because a read-only base image has no such cap and the model weight files daxfs targets are routinely larger. So the VFS will not catch it either.
Worth noting the limit is page-size dependent, which makes it awkward for a filesystem shared between hosts with different page sizes.
Suggested: return -EFBIG from the overlay write paths, and document the ceiling in the README next to the mkdaxfs options.
Overlay data keys pack the page offset into 20 bits (
include/daxfs_format.h:168):so a writable file is capped at
0xFFFFE << PAGE_SHIFT, about 4 GiB with 4 KiB pages and 64 GiB with 64 KiB pages.daxfs_overlay_alloc_page()and friends (daxfs/overlay.c:538,:565,:639) enforce it by returning NULL, whichdaxfs_write_iter()turns into:Two problems:
-EFBIG, and it should raiseSIGXFSZthe waygeneric_write_check_limits()does.-ENOSPCsends anyone debugging it to look at pool capacity, which is fine.s_maxbytesisMAX_LFS_FILESIZE(daxfs: Fix superblock and inode geometry reported to the VFS #14), deliberately, because a read-only base image has no such cap and the model weight files daxfs targets are routinely larger. So the VFS will not catch it either.Worth noting the limit is page-size dependent, which makes it awkward for a filesystem shared between hosts with different page sizes.
Suggested: return
-EFBIGfrom the overlay write paths, and document the ceiling in the README next to the mkdaxfs options.Found during the review in #14.