vmm: memory_manager: Add SEEK_DATA-based extent iterator

Adds next_data_extent: a streaming helper that returns the next
populated extent within a window of a file descriptor using
lseek(SEEK_DATA) / lseek(SEEK_HOLE). Used by subsequent commits to walk
the snapshot file extent-by-extent without collecting the full extent
list.

Returns an error on fds or filesystems without SEEK_HOLE support so the
caller can fall back to a dense write path.

Assisted-by: Claude:Opus-4.7
Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-04-29 19:26:27 +01:00
parent 739ea8c9fc
commit bf3279f094
3 changed files with 126 additions and 1 deletions
+3
View File
@@ -103,5 +103,8 @@ vmm-sys-util = { workspace = true, features = ["with-serde"] }
zbus = { version = "5.14.0", optional = true }
zerocopy = { workspace = true, features = ["alloc", "derive"] }
[dev-dependencies]
tempfile = "3"
[lints]
workspace = true