[PATCH 3/5] xfs: convert ENOSPC inode flushing to use new syncd workqueue

Christoph Hellwig hch at infradead.org
Thu Mar 3 09:34:10 CST 2011


I still don't see any point in having the ENOSPC flushing moved to a
different context.

Just add a mutex and flush inline, e.g.

void
xfs_flush_inodes(
	struct xfs_inode	*ip)
{
	struct xfs_mount	*mp = ip->i_mount;

	if (!mutex_trylock(&xfs_syncd_lock))
		return;		/* someone else is flushing right now */
	xfs_sync_data(mp, SYNC_TRYLOCK);
	xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT);
	xfs_log_force(mp, XFS_LOG_SYNC);
	mutex_unlock(&xfs_syncd_lock);
}




More information about the xfs mailing list