Skip to content

feat(mountstats): 新增proc挂载导出接口实现#1832

Merged
fslongjin merged 22 commits into
DragonOS-Community:masterfrom
xboHodx:feat/mountstats
Jun 2, 2026
Merged

feat(mountstats): 新增proc挂载导出接口实现#1832
fslongjin merged 22 commits into
DragonOS-Community:masterfrom
xboHodx:feat/mountstats

Conversation

@xboHodx

@xboHodx xboHodx commented Apr 3, 2026

Copy link
Copy Markdown
Contributor
  • 实现/proc/[pid]/mounts、/proc/[pid]/mountinfo、/proc/[pid]/mountstats接口
  • 新增mount_view模块统一处理挂载视图渲染逻辑
  • 支持按目标进程视角导出挂载信息
  • 文档添加procfs相关章节

xboHodx added 3 commits March 20, 2026 16:10
…ng and validation

- Deleted init_skill.py as it was redundant.
- Updated package_skill.py to exclude unnecessary files and directories during packaging.
- Enhanced quick_validate.py to include compatibility field validation and improved error messages.
- Added run_eval.py to evaluate skill descriptions against queries and output results in JSON format.
- Introduced run_loop.py to facilitate an iterative evaluation and improvement process for skill descriptions.
- Created utils.py for shared utility functions, including SKILL.md parsing.

Signed-off-by: xboHodx <xbohodx2024@gmail.com>
- 实现/proc/[pid]/mounts、/proc/[pid]/mountinfo、/proc/[pid]/mountstats接口
- 新增mount_view模块统一处理挂载视图渲染逻辑
- 支持按目标进程视角导出挂载信息
- 文档添加procfs相关章节

Signed-off-by: xboHodx <xbohodx2024@gmail.com>
@github-actions github-actions Bot added the ambiguous The title of PR/issue doesn't match the format label Apr 3, 2026
@xboHodx xboHodx changed the title Feat/mountstats 新增proc挂载导出接口实现 feat(mountstats): 新增proc挂载导出接口实现 Apr 3, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed ambiguous The title of PR/issue doesn't match the format labels Apr 3, 2026
Signed-off-by: xboHodx <xbohodx2024@gmail.com>
@fslongjin

Copy link
Copy Markdown
Member

skill creator应该不要提交到dragonos吧?
然后就是为什么这个diff这么大

… packaging and validation"

This reverts commit 250dc9b.
@xboHodx

xboHodx commented Apr 4, 2026

Copy link
Copy Markdown
Contributor Author

skill creator应该不要提交到dragonos吧? 然后就是为什么这个diff这么大

这是 #1823 的skill,不小心交上去了。现在撤下来应该没问题了。

…tats

Signed-off-by: xboHodx <xbohodx2024@gmail.com>
@fslongjin

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a6e4c94bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread kernel/src/filesystem/procfs/mount_view.rs Outdated
xboHodx and others added 6 commits May 21, 2026 18:49
Signed-off-by: xboHodx <xbohodx2024@gmail.com>
Integrate ProcPidTarget-based procfs (DragonOS-Community#1893) with mount_view mountstats
support. Resolve conflicts by keeping mount rendering in mount_view while
adopting master's pid namespace target resolution and FileOps open API.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Updated `/proc/mounts`, `/proc/[pid]/mounts`, and related files to improve rendering and caching behavior.
- Refactored mount entry collection and rendering functions for better clarity and performance.
- Adjusted permissions in `MountStatsFileOps` to allow read access for group users.
- Introduced new test suite `proc_mount_exports` to validate mount information consistency across different procfs entries.
- Added entries to `.gitignore` for markdown files and cursor files.
Comment thread kernel/src/filesystem/vfs/mount/mod.rs Outdated
Comment thread kernel/src/filesystem/vfs/mount/mod.rs
Comment thread kernel/src/filesystem/procfs/mount_view.rs Outdated
@fslongjin

Copy link
Copy Markdown
Member

@codex 从架构、linux语义等角度审查代码。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f733b8b568

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread kernel/src/filesystem/procfs/pid/mountstats.rs Outdated
Signed-off-by: longjin <longjin@dragonos.org>
xboHodx and others added 2 commits June 1, 2026 14:37
- Removed the deprecated `mount_view` and `mounts` files, centralizing mount-related functionality into a new `mount` module.
- Updated references in the `procfs` root and other related files to utilize the new structure.
- Introduced new helper functions for rendering and collecting mount information, improving code organization and maintainability.
- Added symlink support for `/proc/mounts` pointing to `self/mounts`.

This refactor enhances clarity and performance in handling mount information within the proc filesystem.
Keep procfs/mount module layout and symlink /proc/mounts; integrate
remote docs, TCP bind fix, and extended proc_mount_exports tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
xboHodx added 4 commits June 1, 2026 14:53
…ts documentation

- Deleted the `mount_exports_review_plan.md` file as it is no longer needed.
- Revised the `mounts.md` documentation to clarify the procfs mount export interfaces, including detailed descriptions of `/proc/mounts`, `/proc/[pid]/mounts`, `/proc/[pid]/mountinfo`, and `/proc/[pid]/mountstats`.
- Enhanced the structure and readability of the documentation, ensuring it aligns with the current implementation and usage scenarios.

This update improves the clarity of the procfs mount interfaces and removes outdated content.
- Updated the inode mode handling in `pid_mount.rs` to ensure that `/proc/[pid]/mountstats` is owner-readable only, while other mount-related files remain world-readable.
- This change aligns with Linux's permissions model for procfs mount information, enhancing security and consistency.

This update improves the clarity of permission settings for procfs mount files.
Comment thread config/app-blocklist.toml
@fslongjin

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ac113427f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread kernel/src/filesystem/procfs/mount/inode/pid_mount.rs
Comment thread kernel/src/filesystem/procfs/mount/format/mountstats_line.rs
@xboHodx xboHodx requested a review from fslongjin June 2, 2026 06:14
Signed-off-by: longjin <longjin@dragonos.org>
@fslongjin fslongjin merged commit 45172e5 into DragonOS-Community:master Jun 2, 2026
30 of 31 checks passed
fslongjin added a commit that referenced this pull request Jun 4, 2026
These rules were accidentally introduced in commit f733b8b (PR #1832).
Ignoring all *.md files prevents tracking README, documentation, and
other essential markdown files in the repository.

Signed-off-by: longjin <longjin@dragonos.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants