lcpfs 2026.1.102

LCP File System - A ZFS-inspired copy-on-write filesystem for Rust
//! Machine learning features.
//!
//! Provides content classification, content-aware processing,
//! GF solver/algorithms, and ML-based prefetching.
//!
//! ## ARC Integration
//!
//! The `arc_adapter` module connects ML prefetching to the ARC cache:
//!
//! ```rust,ignore
//! use lcpfs::ml::arc_adapter;
//! use lcpfs::storage::dva::Dva;
//!
//! // Record reads to train the ML model and trigger prefetches
//! let dva = Dva::new(0, offset, size);
//! let prefetches_issued = arc_adapter::record_read(dva, size, Some(file_id));
//!
//! // Check prefetch effectiveness
//! let hit_rate = arc_adapter::get_hit_rate();
//! println!("Prefetch hit rate: {:.1}%", hit_rate * 100.0);
//!
//! // Get detailed statistics
//! let stats = arc_adapter::get_stats();
//! ```

/// ARC/L2ARC integration for ML prefetching.
pub mod arc_adapter;
/// File type classification.
pub mod classify;
/// Content-aware processing (compression, tiering).
pub mod content_aware;
/// Galois field arithmetic algorithms.
pub mod gfalgo;
/// Galois field solver for erasure coding.
pub mod gfsolver;
/// ML-based prefetch prediction.
pub mod mlprefetch;

pub use arc_adapter::{
    AdapterStats, PrefetchRequest, PrefetchResult, clear_all_file_engines, clear_file_engine,
    clear_pending, expire_old, get_hit_rate as prefetch_hit_rate, get_stats as prefetch_stats,
    is_enabled as prefetch_enabled, pending_count, record_read as prefetch_record_read,
    record_write as prefetch_record_write, set_enabled as set_prefetch_enabled,
};
pub use classify::*;
pub use content_aware::*;
pub use gfalgo::*;
pub use gfsolver::*;
pub use mlprefetch::*;