Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129011
b: refs/heads/master
c: 240d5d4
h: refs/heads/master
i:
  129009: 7c62ac6
  129007: 0e3d2fb
v: v3
  • Loading branch information
Chris Mason committed Nov 10, 2008
1 parent 51e22e9 commit 4c71f98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b47eda8690a10f4fc01eb7b795078fa3fa57149f
refs/heads/master: 240d5d482b69415b92ffce4b8dfca10799c9890b
10 changes: 10 additions & 0 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,16 @@ void btrfs_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
return;

inode = mapping->host;

/*
* don't do the expensive searching for a small number of
* devices
*/
if (BTRFS_I(inode)->root->fs_info->fs_devices->open_devices <= 2) {
__unplug_io_fn(bdi, page);
return;
}

offset = page_offset(page);

em_tree = &BTRFS_I(inode)->extent_tree;
Expand Down

0 comments on commit 4c71f98

Please sign in to comment.