Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140324
b: refs/heads/master
c: bedf762
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Apr 3, 2009
1 parent 147ccf2 commit a027818
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b765ead57da62cccf7fa21e00e6eed65e9df62b0
refs/heads/master: bedf762ba3a4b70295661fa70c29c1f18fe0f351
14 changes: 13 additions & 1 deletion trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static noinline int run_scheduled_bios(struct btrfs_device *device)
unsigned long limit;
unsigned long last_waited = 0;

bdi = device->bdev->bd_inode->i_mapping->backing_dev_info;
bdi = blk_get_backing_dev_info(device->bdev);
fs_info = device->dev_root->fs_info;
limit = btrfs_async_submit_limit(fs_info);
limit = limit * 2 / 3;
Expand Down Expand Up @@ -258,6 +258,18 @@ static noinline int run_scheduled_bios(struct btrfs_device *device)
if (device->pending_bios)
goto loop_lock;
spin_unlock(&device->io_lock);

/*
* IO has already been through a long path to get here. Checksumming,
* async helper threads, perhaps compression. We've done a pretty
* good job of collecting a batch of IO and should just unplug
* the device right away.
*
* This will help anyone who is waiting on the IO, they might have
* already unplugged, but managed to do so before the bio they
* cared about found its way down here.
*/
blk_run_backing_dev(bdi, NULL);
done:
return 0;
}
Expand Down

0 comments on commit a027818

Please sign in to comment.