diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 06:56:17 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:08 -0400 |
commit | 3e1a7ff8a0a7b948f2684930166954f9e8e776fe (patch) | |
tree | 0a8642f5cdbc6ddfdd66dc7241c915e57b3cb7ff /fs | |
parent | 689d6fac40b41c7bf154f362deaf442548e4dc81 (diff) |
block: allow disk to have extended device number
Now that disk and partition handlings are mostly unified, it's easy to
allow disk to have extended device number. This patch makes
add_disk() use extended device number if disk->minors is zero. Both
sd and ide-disk are updated to use this.
* sd_format_disk_name() is implemented which can generically determine
the drive name. This removes disk number restriction stemming from
limited device names.
* If sd index goes over SD_MAX_DISKS (which can be increased now BTW),
sd simply doesn't initialize minors letting block layer choose
extended device number.
* If CONFIG_DEBUG_EXT_DEVT is set, both sd and ide-disk always set
minors to 0 and use extended device numbers.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/partitions/check.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 772b2ed8d239..0e411603fdf5 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -593,6 +593,7 @@ void del_gendisk(struct gendisk *disk) | |||
593 | disk_part_iter_exit(&piter); | 593 | disk_part_iter_exit(&piter); |
594 | 594 | ||
595 | invalidate_partition(disk, 0); | 595 | invalidate_partition(disk, 0); |
596 | blk_free_devt(disk_to_dev(disk)->devt); | ||
596 | set_capacity(disk, 0); | 597 | set_capacity(disk, 0); |
597 | disk->flags &= ~GENHD_FL_UP; | 598 | disk->flags &= ~GENHD_FL_UP; |
598 | unlink_gendisk(disk); | 599 | unlink_gendisk(disk); |