diff options
| author | David S. Miller <davem@davemloft.net> | 2010-04-21 00:50:39 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-04-21 00:50:39 -0700 |
| commit | e04997b13a2c2fc93af970fe95fd29a74db113e8 (patch) | |
| tree | a84ec3368edc3c2568a0d6acdfa0d0e50d8cacf7 /fs/btrfs/volumes.c | |
| parent | 6651ffc8e8bdd5fb4b7d1867c6cfebb4f309512c (diff) | |
| parent | 05ce7bfe547c9fa967d9cab6c37867a9cb6fb3fa (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/btrfs/volumes.c')
| -rw-r--r-- | fs/btrfs/volumes.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index aa7dc36dac78..8db7b14bbae8 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2250,6 +2250,12 @@ again: if (!looped) calc_size = max_t(u64, min_stripe_size, calc_size); + /* + * we're about to do_div by the stripe_len so lets make sure + * we end up with something bigger than a stripe + */ + calc_size = max_t(u64, calc_size, stripe_len * 4); + do_div(calc_size, stripe_len); calc_size *= stripe_len; |
