diff options
Diffstat (limited to 'fs/btrfs/reada.c')
-rw-r--r-- | fs/btrfs/reada.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index 2373b39a132b..dc5d33146fdb 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c | |||
@@ -54,7 +54,6 @@ | |||
54 | * than the 2 started one after another. | 54 | * than the 2 started one after another. |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #define MAX_MIRRORS 2 | ||
58 | #define MAX_IN_FLIGHT 6 | 57 | #define MAX_IN_FLIGHT 6 |
59 | 58 | ||
60 | struct reada_extctl { | 59 | struct reada_extctl { |
@@ -71,7 +70,7 @@ struct reada_extent { | |||
71 | struct list_head extctl; | 70 | struct list_head extctl; |
72 | struct kref refcnt; | 71 | struct kref refcnt; |
73 | spinlock_t lock; | 72 | spinlock_t lock; |
74 | struct reada_zone *zones[MAX_MIRRORS]; | 73 | struct reada_zone *zones[BTRFS_MAX_MIRRORS]; |
75 | int nzones; | 74 | int nzones; |
76 | struct btrfs_device *scheduled_for; | 75 | struct btrfs_device *scheduled_for; |
77 | }; | 76 | }; |
@@ -84,7 +83,8 @@ struct reada_zone { | |||
84 | spinlock_t lock; | 83 | spinlock_t lock; |
85 | int locked; | 84 | int locked; |
86 | struct btrfs_device *device; | 85 | struct btrfs_device *device; |
87 | struct btrfs_device *devs[MAX_MIRRORS]; /* full list, incl self */ | 86 | struct btrfs_device *devs[BTRFS_MAX_MIRRORS]; /* full list, incl |
87 | * self */ | ||
88 | int ndevs; | 88 | int ndevs; |
89 | struct kref refcnt; | 89 | struct kref refcnt; |
90 | }; | 90 | }; |
@@ -305,7 +305,7 @@ again: | |||
305 | 305 | ||
306 | spin_lock(&fs_info->reada_lock); | 306 | spin_lock(&fs_info->reada_lock); |
307 | ret = radix_tree_insert(&dev->reada_zones, | 307 | ret = radix_tree_insert(&dev->reada_zones, |
308 | (unsigned long)zone->end >> PAGE_CACHE_SHIFT, | 308 | (unsigned long)(zone->end >> PAGE_CACHE_SHIFT), |
309 | zone); | 309 | zone); |
310 | spin_unlock(&fs_info->reada_lock); | 310 | spin_unlock(&fs_info->reada_lock); |
311 | 311 | ||
@@ -365,9 +365,9 @@ again: | |||
365 | if (ret || !bbio || length < blocksize) | 365 | if (ret || !bbio || length < blocksize) |
366 | goto error; | 366 | goto error; |
367 | 367 | ||
368 | if (bbio->num_stripes > MAX_MIRRORS) { | 368 | if (bbio->num_stripes > BTRFS_MAX_MIRRORS) { |
369 | printk(KERN_ERR "btrfs readahead: more than %d copies not " | 369 | printk(KERN_ERR "btrfs readahead: more than %d copies not " |
370 | "supported", MAX_MIRRORS); | 370 | "supported", BTRFS_MAX_MIRRORS); |
371 | goto error; | 371 | goto error; |
372 | } | 372 | } |
373 | 373 | ||