(&self)
| 237 | } |
| 238 | |
| 239 | pub fn flush(&self) -> io::Result<()> { |
| 240 | let mut inner = self.inner.write().unwrap(); |
| 241 | inner.sync_caches()?; |
| 242 | let mut unref = mem::take(&mut inner.unref_clusters); |
| 243 | inner.avail_clusters.append(&mut unref); |
| 244 | Ok(()) |
| 245 | } |
| 246 | |
| 247 | /// Flushes dirty metadata caches and clears the dirty bit for |
| 248 | /// clean shutdown. |