Skip to content

Conversation

@Vitus213
Copy link
Contributor

No description provided.

@Vitus213 Vitus213 added the enhancement New feature or request label Aug 19, 2025
@sparkzky sparkzky marked this pull request as draft August 19, 2025 13:48
@Vitus213 Vitus213 marked this pull request as ready for review November 2, 2025 16:41
Copilot AI review requested due to automatic review settings November 2, 2025 16:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the Rust toolchain from nightly-2024-11-05 to nightly-2025-08-10 and introduces a loop device driver implementation for DragonOS.

Key changes include:

  • Toolchain version update across all Makefiles and configuration files
  • New loop device driver with complete device management infrastructure
  • Integration of loop devices into the DevFS and block device management systems

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
user/apps/*/Makefile Updated Rust toolchain version from nightly-2024-11-05 to nightly-2025-08-10
tools/nix-dev-shell/flake.nix Updated Rust toolchain version in Nix dev shell configuration
tools/Makefile Updated cargo toolchain version for check command
build-scripts/Makefile Updated cargo toolchain version for build and check commands
kernel/src/driver/base/block/loop_device.rs New file implementing loop device driver with control device, manager, and device structures
kernel/src/driver/base/block/mod.rs Added loop_device module and removed blank line
kernel/src/driver/base/block/manager.rs Implemented unregister functionality for block devices
kernel/src/driver/base/block/gendisk/mod.rs Added read/write support, dynamic metadata, and ioctl forwarding to underlying loop devices
kernel/src/driver/base/device/device_number.rs Added LOOP_MAJOR constant (7) for loop devices
kernel/src/filesystem/vfs/file.rs Added Loop variant to FilePrivateData enum with typo in comment
kernel/src/filesystem/devfs/mod.rs Added special handling for loop-control and loop* devices in registration and removal
user/apps/c_unitest/test_loop.c New test file for loop device functionality
config/app-blocklist.toml Blocked NovaShell app with typo in toolchain version
Comments suppressed due to low confidence (1)

kernel/src/driver/base/block/loop_device.rs:1

  • Inconsistent indentation: line 47 has incorrect spacing (3 spaces instead of 4) compared to line 46.
use crate::{

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Vitus213 Vitus213 self-assigned this Nov 9, 2025
@Vitus213 Vitus213 requested a review from fslongjin November 9, 2025 09:06
Copilot finished reviewing on behalf of Vitus213 November 12, 2025 14:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

let dname = gendisk.dname()?;
devfs_unregister(dname.as_ref(), gendisk)?;
}
Ok(())
Copy link
Member

Choose a reason for hiding this comment

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

image 这里要让真实的磁盘设备之类的,执行资源释放的操作,而不是简单的在这里删除元数据的记录。 不然的话会有资源泄漏。这里需要一个回调机制。

Copy link
Member

Choose a reason for hiding this comment

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

base目录是放置那种通用组件,比如gendisk之类的。
loop设备应当单独开个目录。在driver/block下面

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