On Wed, Apr 30, 2008 at 03:05:03AM -0600, Matthew Wilcox wrote:
> @@ -2385,12 +2379,13 @@ restart:
>
> iclog = log->l_iclog;
> if (! (iclog->ic_state == XLOG_STATE_ACTIVE)) {
> - log->l_flushcnt++;
> + DEFINE_WAIT(wait);
> + prepare_to_wait(&log->l_flush_wq, &wait, TASK_UNINTERRUPTIBLE);
> spin_unlock(&log->l_icloglock);
> xlog_trace_iclog(iclog, XLOG_TRACE_SLEEP_FLUSH);
> XFS_STATS_INC(xs_log_noiclogs);
> - /* Ensure that log writes happen */
> - psema(&log->l_flushsema, PINOD);
> + /* Wait for log writes to have flushed */
> + schedule();
> goto restart;
> }
> ASSERT(iclog->ic_state == XLOG_STATE_ACTIVE);
Christoph points out that this is missing a call to finish_wait() after
schedule() and he's absolutely right. It only matters if the task was
woken up by something other than being on this wait queue, so my testing
didn't notice it missing.
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
|