mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
bcache: partition support: add 16 minors per bcacheN device
Signed-off-by: Eric Wheeler <[email protected]> Tested-by: Wido den Hollander <[email protected]>
This commit is contained in:
parent
be628be095
commit
b8c0d911ac
1 changed files with 4 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ static wait_queue_head_t unregister_wait;
|
|||
struct workqueue_struct *bcache_wq;
|
||||
|
||||
#define BTREE_MAX_PAGES (256 * 1024 / PAGE_SIZE)
|
||||
#define BCACHE_MINORS 16 /* partition support */
|
||||
|
||||
/* Superblock */
|
||||
|
||||
|
|
@ -783,8 +784,10 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size,
|
|||
if (minor < 0)
|
||||
return minor;
|
||||
|
||||
minor *= BCACHE_MINORS;
|
||||
|
||||
if (!(d->bio_split = bioset_create(4, offsetof(struct bbio, bio))) ||
|
||||
!(d->disk = alloc_disk(1))) {
|
||||
!(d->disk = alloc_disk(BCACHE_MINORS))) {
|
||||
ida_simple_remove(&bcache_minor, minor);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue