xfs: check for more work before sleeping in xfssyncd
authorDave Chinner <david@fromorbit.com>
Thu, 4 Mar 2010 01:46:23 +0000 (01:46 +0000)
committerAlex Elder <aelder@sgi.com>
Fri, 5 Mar 2010 17:01:45 +0000 (11:01 -0600)
commit20f6b2c785cf187445f126321638ab8ba7aa7494
treebf8ba702047ae78cffeac6fd97852bde3741621b
parent694189328a7e566cb84bd3205503a42b60e87882
xfs: check for more work before sleeping in xfssyncd

xfssyncd processes a queue of work by detaching the queue and
then iterating over all the work items. It then sleeps for a
time period or until new work comes in. If new work is queued
while xfssyncd is actively processing the detached work queue,
it will not process that new work until after a sleep timeout
or the next work event queued wakes it.

Fix this by checking the work queue again before going to sleep.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_sync.c