pub trait DirEntryOps:
Send
+ Sync
+ 'static {
// Provided method
fn revalidate(&self, _: &CurrentTask, _: &DirEntry) -> Result<bool, Errno> { ... }
}Provided Methods§
Sourcefn revalidate(&self, _: &CurrentTask, _: &DirEntry) -> Result<bool, Errno>
fn revalidate(&self, _: &CurrentTask, _: &DirEntry) -> Result<bool, Errno>
Revalidate the DirEntry, if needed.
Most filesystems don’t need to do any revalidations because they are “local” and all changes to nodes go through the kernel. However some filesystems allow changes to happen through other means (e.g. NFS, FUSE) and these filesystems need a way to let the kernel know it may need to refresh its cached metadata. This method provides that hook for such filesystems.
For more details, see:
- https://www.halolinux.us/kernel-reference/the-dentry-cache.html
- https://www.kernel.org/doc/html/latest/filesystems/path-lookup.html#revalidation-and-automounts
- https://lwn.net/Articles/649115/
- https://www.infradead.org/~mchehab/kernel_docs/filesystems/path-walking.html
Returns Ok(valid) where valid indicates if the DirEntry is still valid,
or an error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".