]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: tune btrfs unplug functions for a small number of devices
authorChris Mason <chris.mason@oracle.com>
Mon, 10 Nov 2008 18:08:31 +0000 (13:08 -0500)
committerChris Mason <chris.mason@oracle.com>
Mon, 10 Nov 2008 18:08:31 +0000 (13:08 -0500)
commit0acbca76e775793f8803126bcf8d6c0eaffe57f4
tree16320929e2220a7859d187bf4eda3810d2886bf2
parentf27763cbf4870579cf428d818b3b41445d39d0b7
Btrfs: tune btrfs unplug functions for a small number of devices

When btrfs unplugs, it tries to find the correct device to unplug
via search through the extent_map tree.  This avoids unplugging
a device that doesn't need it, but is a waste of time for filesystems
with a small number of devices.

This patch checks the total number of devices before doing the
search.

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