macOS Time Machine AFP monitoring: backup_time update on file modification

- Added afp_monitor.rs module to track AFP_AfpInfo backup_time
- Open struct now has 'modified' flag to track file modifications
- write.rs sets modified=true on successful write
- close.rs calls AfpMonitor::update_backup_time() on modified files
- create.rs calls AfpMonitor::init_afp_info() on new file creation
- AFP_AfpInfo stored as xattr com.apple.aapl.AfpInfo
- backup_time updated to current epoch time on modification

Also includes:
- LZ4 compression using lz4_flex crate
- Case sensitivity conditional on backend capabilities
- LDAP cfg feature gate fix
- RAID rebuild reconstruction implementation
- DOS attributes xattr persistence
- Snapshot disk persistence

Tests: 201 smb-server, 452 markbase-core (653 total)
This commit is contained in:
Warren
2026-06-24 00:46:33 +08:00
parent 5300b672cb
commit 57fd6a475f
33 changed files with 1211 additions and 253 deletions

View File

@@ -140,6 +140,15 @@ pub trait VfsFile: Send {
}
Ok(())
}
/// Read all bytes (convenience, seeks to end first to get size)
fn read_all(&mut self) -> Result<Vec<u8>, VfsError> {
let size = self.seek(std::io::SeekFrom::End(0))?;
self.seek(std::io::SeekFrom::Start(0))?;
let mut buf = vec![0u8; size as usize];
self.read_exact(&mut buf)?;
Ok(buf)
}
}
/// VFS 后端 trait所有文件系统操作