git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/master'
[pandora-kernel.git]
/
drivers
/
md
/
raid0.c
diff --git
a/drivers/md/raid0.c
b/drivers/md/raid0.c
index
914c04d
..
1836106
100644
(file)
--- a/
drivers/md/raid0.c
+++ b/
drivers/md/raid0.c
@@
-241,18
+241,20
@@
static int create_strip_zones (mddev_t *mddev)
/**
* raid0_mergeable_bvec -- tell bio layer if a two requests can be merged
* @q: request queue
/**
* raid0_mergeable_bvec -- tell bio layer if a two requests can be merged
* @q: request queue
- * @b
io: the buffer head that's been built up so far
+ * @b
vm: properties of new bio
* @biovec: the request that could be merged to it.
*
* Return amount of bytes we can accept at this offset
*/
* @biovec: the request that could be merged to it.
*
* Return amount of bytes we can accept at this offset
*/
-static int raid0_mergeable_bvec(struct request_queue *q, struct bio *bio, struct bio_vec *biovec)
+static int raid0_mergeable_bvec(struct request_queue *q,
+ struct bvec_merge_data *bvm,
+ struct bio_vec *biovec)
{
mddev_t *mddev = q->queuedata;
{
mddev_t *mddev = q->queuedata;
- sector_t sector = b
io->bi_sector + get_start_sect(bio
->bi_bdev);
+ sector_t sector = b
vm->bi_sector + get_start_sect(bvm
->bi_bdev);
int max;
unsigned int chunk_sectors = mddev->chunk_size >> 9;
int max;
unsigned int chunk_sectors = mddev->chunk_size >> 9;
- unsigned int bio_sectors = b
io
->bi_size >> 9;
+ unsigned int bio_sectors = b
vm
->bi_size >> 9;
max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9;
if (max < 0) max = 0; /* bio_add cannot handle a negative return */
max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9;
if (max < 0) max = 0; /* bio_add cannot handle a negative return */
@@
-293,16
+295,16
@@
static int raid0_run (mddev_t *mddev)
goto out_free_conf;
/* calculate array device size */
goto out_free_conf;
/* calculate array device size */
- mddev->array_s
ize
= 0;
+ mddev->array_s
ectors
= 0;
rdev_for_each(rdev, tmp, mddev)
rdev_for_each(rdev, tmp, mddev)
- mddev->array_s
ize += rdev->size
;
+ mddev->array_s
ectors += rdev->size * 2
;
printk("raid0 : md_size is %llu blocks.\n",
printk("raid0 : md_size is %llu blocks.\n",
- (unsigned long long)mddev->array_s
ize
);
+ (unsigned long long)mddev->array_s
ectors / 2
);
printk("raid0 : conf->hash_spacing is %llu blocks.\n",
(unsigned long long)conf->hash_spacing);
{
printk("raid0 : conf->hash_spacing is %llu blocks.\n",
(unsigned long long)conf->hash_spacing);
{
- sector_t s = mddev->array_s
ize
;
+ sector_t s = mddev->array_s
ectors / 2
;
sector_t space = conf->hash_spacing;
int round;
conf->preshift = 0;
sector_t space = conf->hash_spacing;
int round;
conf->preshift = 0;