Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297854
b: refs/heads/master
c: 94598ba
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Behrens authored and Chris Mason committed Mar 27, 2012
1 parent 26e0ca5 commit 58229f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 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: ea466794084f55d8fcc100711cf17923bf57e962
refs/heads/master: 94598ba8d8ff066115508fb99e593d2de1ca67e1
2 changes: 2 additions & 0 deletions trunk/fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ struct btrfs_ordered_sum;

#define BTRFS_MAGIC "_BHRfS_M"

#define BTRFS_MAX_MIRRORS 2

#define BTRFS_MAX_LEVEL 8

#define BTRFS_COMPAT_EXTENT_TREE_V0
Expand Down
10 changes: 5 additions & 5 deletions trunk/fs/btrfs/reada.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
* than the 2 started one after another.
*/

#define MAX_MIRRORS 2
#define MAX_IN_FLIGHT 6

struct reada_extctl {
Expand All @@ -71,7 +70,7 @@ struct reada_extent {
struct list_head extctl;
struct kref refcnt;
spinlock_t lock;
struct reada_zone *zones[MAX_MIRRORS];
struct reada_zone *zones[BTRFS_MAX_MIRRORS];
int nzones;
struct btrfs_device *scheduled_for;
};
Expand All @@ -84,7 +83,8 @@ struct reada_zone {
spinlock_t lock;
int locked;
struct btrfs_device *device;
struct btrfs_device *devs[MAX_MIRRORS]; /* full list, incl self */
struct btrfs_device *devs[BTRFS_MAX_MIRRORS]; /* full list, incl
* self */
int ndevs;
struct kref refcnt;
};
Expand Down Expand Up @@ -365,9 +365,9 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
if (ret || !bbio || length < blocksize)
goto error;

if (bbio->num_stripes > MAX_MIRRORS) {
if (bbio->num_stripes > BTRFS_MAX_MIRRORS) {
printk(KERN_ERR "btrfs readahead: more than %d copies not "
"supported", MAX_MIRRORS);
"supported", BTRFS_MAX_MIRRORS);
goto error;
}

Expand Down

0 comments on commit 58229f3

Please sign in to comment.