possible composefs /etc improvements

未关闭
#2,627 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
linux, rust

调研方向

The issue identifies the composefs backend, /etc deployment handling, and the three-way merge, but names no source files or tests. Start by locating the composefs deployment path and reading how it copies and merges /etc; then assess whether an overlayfs or reflink approach is viable. Done means a chosen approach is implemented and verified to preserve the existing merge behavior while avoiding unnecessary file copies.

由索引模型根据 Issue 内容生成。

描述

Currently with the composefs backend populating /etc for a deployment is basically:

  • mount the erofs for the new image
  • cp -a /etc into /sysroot/state/deploy/*/etc
  • does the 3-way merge in place, and then bind mounts the deployment /etc directly into the final system

At the very least instead of copying all of the files out of the image on each deployment, we should be able to reflink each from the object store and not duplicate the data.

Going a bit further, we could do something like:

  • /sysroot/state/deploy/*/etc instead just becomes an overlayfs upperdir
  • we mount the erofs from the image and use its /etc as a lowerdir with above
  • perform the 3-way merge on the overlay

No copying (except for internal overlay ops), and I think this also allows us to optimize the 3-way merge? Since we can just look at the upperdir on the previous deployment to know exactly which files have been modified and do the copy (reflink?) directly from those files.

Something like that. I haven't looked into proving this out, but wanted to write it down before I forget.

主要语言
Rust
星标
2.3k
派生
230
平均合并
3 天 19 小时
30 天内合并 PR
37

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bootc-dev/bootc 的其他 Issue

查看 bootc-dev/bootc 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。