Add SMB Share Snapshots (Phase 1-4): FSCTL_SRV_SNAPSHOT_* handlers
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

Features:
- SnapshotManager: Share snapshot management
- SnapshotEntry/SnapshotState: Snapshot metadata structures
- FSCTL_SRV_SNAPSHOT_CREATE/READ/WRITE/DELETE handlers
- GMT token format support (@GMT-YYYY.MM.DD-HH.MM.SS)
- 7 unit tests for all operations

Files:
- vendor/smb-server/src/snapshot.rs (245 lines)
- vendor/smb-server/src/handlers/ioctl.rs (+88 lines)
- vendor/smb-server/src/proto/messages/ioctl.rs (+8 lines enum)
- vendor/smb-server/src/server.rs (+2 lines)
- vendor/smb-server/src/ntstatus.rs (+1 line)
- vendor/smb-server/src/lib.rs (+1 line)

Tests: 7 passed (smb-server), 309 passed (markbase-core)
This commit is contained in:
Warren
2026-06-21 12:38:15 +08:00
parent 204186e34b
commit a28b7f0929
6 changed files with 483 additions and 2 deletions
+3
View File
@@ -202,6 +202,8 @@ pub struct ServerState {
pub lease_manager: Arc<crate::oplock::LeaseManager>,
/// Global byte-range lock manager (Phase 7).
pub lock_manager: Arc<crate::oplock::LockManager>,
/// Global snapshot manager for SMB Share Snapshots.
pub snapshot_manager: Arc<crate::snapshot::SnapshotManager>,
}
impl ServerState {
@@ -217,6 +219,7 @@ impl ServerState {
oplock_manager: Arc::new(crate::oplock::OplockManager::new()),
lease_manager: Arc::new(crate::oplock::LeaseManager::new()),
lock_manager: Arc::new(crate::oplock::LockManager::new()),
snapshot_manager: Arc::new(crate::snapshot::SnapshotManager::new()),
}
}