Re: [PATCH] Remove l_flushsema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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."
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux