diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-01-17 12:01:41 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:59 -0400 |
commit | 04005cc7a1feef94237204566ccac38571af7991 (patch) | |
tree | 802852c78d489439dfe0a15d8f045a755dc3e621 /fs/btrfs/disk-io.c | |
parent | fb4bc1e0565a842d704846005ac0ec739e608ede (diff) |
Btrfs: Use blk_congestion_wait on older kernels
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index cd29922d4073..731a534f81f5 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -919,8 +919,13 @@ void btrfs_throttle(struct btrfs_root *root) | |||
919 | struct backing_dev_info *bdi; | 919 | struct backing_dev_info *bdi; |
920 | 920 | ||
921 | bdi = root->fs_info->sb->s_bdev->bd_inode->i_mapping->backing_dev_info; | 921 | bdi = root->fs_info->sb->s_bdev->bd_inode->i_mapping->backing_dev_info; |
922 | if (root->fs_info->throttles && bdi_write_congested(bdi)) | 922 | if (root->fs_info->throttles && bdi_write_congested(bdi)) { |
923 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) | ||
923 | congestion_wait(WRITE, HZ/20); | 924 | congestion_wait(WRITE, HZ/20); |
925 | #else | ||
926 | blk_congestion_wait(WRITE, HZ/20); | ||
927 | #endif | ||
928 | } | ||
924 | } | 929 | } |
925 | 930 | ||
926 | void btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr) | 931 | void btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr) |