X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fraid%2Fraid1.h;h=50965d9680b698744fdd623c455766a2c1310221;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=96abcad3a3073da6af5ca524a8e8a3eee4191544;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h index 96abcad3a..50965d968 100644 --- a/include/linux/raid/raid1.h +++ b/include/linux/raid/raid1.h @@ -10,6 +10,20 @@ struct mirror_info { sector_t head_position; }; +/* + * memory pools need a pointer to the mddev, so they can force an unplug + * when memory is tight, and a count of the number of drives that the + * pool was allocated for, so they know how much to allocate and free. + * mddev->raid_disks cannot be used, as it can change while a pool is active + * These two datums are stored in a kmalloced struct. + */ + +struct pool_info { + mddev_t *mddev; + int raid_disks; +}; + + typedef struct r1bio_s r1bio_t; struct r1_private_data_s { @@ -31,6 +45,8 @@ struct r1_private_data_s { wait_queue_head_t wait_idle; wait_queue_head_t wait_resume; + struct pool_info *poolinfo; + mempool_t *r1bio_pool; mempool_t *r1buf_pool; };