]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: Clear the device->running_pending flag before bailing on congestion
authorChris Mason <chris.mason@oracle.com>
Fri, 16 Jan 2009 16:58:19 +0000 (11:58 -0500)
committerChris Mason <chris.mason@oracle.com>
Fri, 16 Jan 2009 16:58:19 +0000 (11:58 -0500)
commita04cf42bd8e93f616aac59792484ae786a27c2c0
tree64287747fdbb1641052d8ec146c8997c3797bc48
parent3a66ec6fe448c6b3d5eaf3577447d9d3b84a9c69
Btrfs: Clear the device->running_pending flag before bailing on congestion

Btrfs maintains a queue of async bio submissions so the checksumming
threads don't have to wait on get_request_wait.  In order to avoid
extra wakeups, this code has a running_pending flag that is used
to tell new submissions they don't need to wake the thread.

When the threads notice congestion on a single device, they
may decide to requeue the job and move on to other devices.  This
makes sure the running_pending flag is cleared before the
job is requeued.

It should help avoid IO stalls by making sure the task is woken up
when new submissions come in.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/volumes.c