Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mason/btrfs-unstable

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: do some plugging in the submit_bio threads
  • Loading branch information
Linus Torvalds committed Apr 26, 2011
2 parents f727a93 + 211588a commit cb49f57
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ static noinline int run_scheduled_bios(struct btrfs_device *device)
unsigned long limit;
unsigned long last_waited = 0;
int force_reg = 0;
struct blk_plug plug;

/*
* this function runs all the bios we've collected for
* a particular device. We don't want to wander off to
* another device without first sending all of these down.
* So, setup a plug here and finish it off before we return
*/
blk_start_plug(&plug);

bdi = blk_get_backing_dev_info(device->bdev);
fs_info = device->dev_root->fs_info;
Expand Down Expand Up @@ -294,6 +303,7 @@ static noinline int run_scheduled_bios(struct btrfs_device *device)
spin_unlock(&device->io_lock);

done:
blk_finish_plug(&plug);
return 0;
}

Expand Down

0 comments on commit cb49f57

Please sign in to comment.