Skip to content

use native page size instead of hardcoded 4096 block size#11

Open
souvik1997 wants to merge 1 commit intomultikernel:mainfrom
amlalabs:issue_10_native_page_size
Open

use native page size instead of hardcoded 4096 block size#11
souvik1997 wants to merge 1 commit intomultikernel:mainfrom
amlalabs:issue_10_native_page_size

Conversation

@souvik1997
Copy link
Contributor

Replace all hardcoded DAXFS_BLOCK_SIZE (4096) references with the native page size queried at mkfs time via sysconf(_SC_PAGESIZE) and validated at mount time against PAGE_SIZE. This enables daxfs to work correctly on architectures with non-4K pages (e.g. 16K on Apple Silicon).

Key changes:

  • mkdaxfs: detect native page size at runtime, store in superblock
  • mount: validate superblock block_size matches kernel PAGE_SIZE
  • overlay/pcache/validate: use info->block_size instead of DAXFS_BLOCK_SIZE
  • daxfs_format.h: bump version to 8, flexible-array for ovl_data_entry
  • tests: use runtime page size instead of hardcoded 4096

Fixes: #10

Replace all hardcoded DAXFS_BLOCK_SIZE (4096) references with the native
page size queried at mkfs time via sysconf(_SC_PAGESIZE) and validated at
mount time against PAGE_SIZE. This enables daxfs to work correctly on
architectures with non-4K pages (e.g. 16K on Apple Silicon).

Key changes:
- mkdaxfs: detect native page size at runtime, store in superblock
- mount: validate superblock block_size matches kernel PAGE_SIZE
- overlay/pcache/validate: use info->block_size instead of DAXFS_BLOCK_SIZE
- daxfs_format.h: bump version to 8, flexible-array for ovl_data_entry
- tests: use runtime page size instead of hardcoded 4096
@congwang-mk
Copy link
Contributor

If I understand it correctly, we also have to replace all the PAGE_SIZE with ->block_size in file.c ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

daxfs should be compatible with non-4K page sizes

2 participants