pub async fn check_journal_space(&self) -> Result<(), Error> {
        loop {
            let _ = debug_assert_not_too_long!({
                let mut inner = self.inner.lock().unwrap();
                if inner.terminate {
                    // If the flush error is set, this will never make progress, since we can't
                    // extend the journal any more.
                    break Err(anyhow!(FxfsError::JournalFlushError).context("Journal closed"));
                }
                if self.objects.last_end_offset() - inner.super_block.journal_checkpoint.file_offset
                    < RECLAIM_SIZE
                {
                    break Ok(());
                }
                if inner.disable_compactions {
                    break Err(anyhow!(FxfsError::JournalFlushError).context("Journal closed"));
                }
                let event = inner.reclaim_event.get_or_insert_with(|| Event::new());
                event.wait_or_dropped()
            });
        }
    }
/// Waits for there to be sufficient space in the journal.
Waits for there to be sufficient space in the journal.
Waits for there to be sufficient space in the journal .
pub async fn check_journal_space(&self) -> Result<(), Error> {
        loop {
            let _ = debug_assert_not_too_long!({
                let mut inner = self.inner.lock().unwrap();
                if inner.terminate {
                    // If the flush error is set, this will never make progress, since we can't
                    // extend the journal any more.
                    break Err(anyhow!(FxfsError::JournalFlushError).context("Journal closed"));
                }
                if self.objects.last_end_offset() - inner.super_block.journal_checkpoint.file_offset
                    < RECLAIM_SIZE
                {
                    break Ok(());
                }
                if inner.disable_compactions {
                    break Err(anyhow!(FxfsError::JournalFlushError).context("Journal closed"));
                }
                let event = inner.reclaim_event.get_or_insert_with(|| Event::new());
                event.wait_or_dropped()
            });
        }
    }
pub async fn check_journal_space ( & self ) -> Result < ( ) , Error > { loop { let _ = debug_assert_not_too_long ! ( { let mut inner self inner lock ( ) unwrap ( ) if inner terminate { // If the flush error is set, this will never make progress, since we can't // extend the journal any more. break Err ( anyhow ( FxfsError JournalFlushError ) context ( " " ) ) } if self objects last_end_offset ( ) inner super_block journal_checkpoint file_offset RECLAIM_SIZE { break Ok ( ( ) ) } if inner disable_compactions { break Err ( anyhow ( FxfsError JournalFlushError ) context ( " " ) ) } let event inner reclaim_event get_or_insert_with ( Event new ( ) ) event wait_or_dropped ( ) } ) ; } }
Waits for there to be sufficient space in the journal.
Waits for there to be sufficient space in the journal .
&self
&self