Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128918
b: refs/heads/master
c: 9473f16
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 4e3fab0 commit 944a31f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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: f3f9931e3d0836509cfccdf473b34e34543a3272
refs/heads/master: 9473f16c75606fe6b2e5000525fe9766114505f3
8 changes: 7 additions & 1 deletion trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,15 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode,
atomic_inc(&fs_info->nr_async_submits);
btrfs_queue_worker(&fs_info->workers, &async->work);

wait_event_timeout(fs_info->async_submit_wait,
if (atomic_read(&fs_info->nr_async_submits) > limit) {
wait_event_timeout(fs_info->async_submit_wait,
(atomic_read(&fs_info->nr_async_submits) < limit),
HZ/10);

wait_event_timeout(fs_info->async_submit_wait,
(atomic_read(&fs_info->nr_async_bios) < limit),
HZ/10);
}
return 0;
}

Expand Down
6 changes: 0 additions & 6 deletions trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,6 @@ int schedule_bio(struct btrfs_root *root, struct btrfs_device *device,
int rw, struct bio *bio)
{
int should_queue = 1;
unsigned long limit;

/* don't bother with additional async steps for reads, right now */
if (!(rw & (1 << BIO_RW))) {
Expand Down Expand Up @@ -2182,11 +2181,6 @@ int schedule_bio(struct btrfs_root *root, struct btrfs_device *device,
if (should_queue)
btrfs_queue_worker(&root->fs_info->submit_workers,
&device->work);

limit = btrfs_async_submit_limit(root->fs_info);
wait_event_timeout(root->fs_info->async_submit_wait,
(atomic_read(&root->fs_info->nr_async_bios) < limit),
HZ/10);
return 0;
}

Expand Down

0 comments on commit 944a31f

Please sign in to comment.