Skip to content

[REFACTOR]: consolidate filesystem ops into internal pkg #4245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apostasie
Copy link
Contributor

@apostasie apostasie commented May 14, 2025

This suggests that we consolidate low-level filesystem related operations into one package (currently pepperred over under lockutil and store).

This includes path validation, atomic writes, locks.

Also suggesting that said package should be made internal. This is not nerdctl API, but merely low-level primitives, and generally speaking the nerdctl API is just too big, exposing too much irrelevant stuff.

This refactor is in preparation for future PRs that will focus on:

  • enhancing locks to be more flexible and allow locking of files AND dirs, and also allow for RO locks
  • enhancements to atomic writefile to support in-place writing (current rename approach does change inode), with a rollback / disaster recovery mechanism
  • consistently use atomic writes to ensure better resilience and data consistency
    (they will be broken out of [FUTURE] [EXP] filesystem package #4240 as well in small chuncks)

This PR here sticks with purely refactoring.

@apostasie apostasie force-pushed the 2025-05-fs-b1 branch 2 times, most recently from 4cf9955 to cec5c9e Compare May 14, 2025 16:49
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
@apostasie apostasie changed the title [REFACTOR]: consolidate filesystem ops into internal pkg [WIP] [REFACTOR]: consolidate filesystem ops into internal pkg May 14, 2025
@apostasie apostasie changed the title [WIP] [REFACTOR]: consolidate filesystem ops into internal pkg [REFACTOR]: consolidate filesystem ops into internal pkg May 14, 2025
@apostasie apostasie marked this pull request as ready for review May 14, 2025 18:04
@AkihiroSuda AkihiroSuda added this to the v2.1.2 milestone May 15, 2025
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.

2 participants