summaryrefslogtreecommitdiff
path: root/kernel/freezer.c
diff options
context:
space:
mode:
authorRen Mingxin <renmx@cn.fujitsu.com>2012-04-10 15:28:05 +0800
committerMichael S. Tsirkin <mst@redhat.com>2012-04-12 10:37:05 +0300
commitc0aa3e0916d7e531e69b02e426f7162dfb1c6c0f (patch)
tree08968a635c4d43fb16c071cbcdbe25b302b85924 /kernel/freezer.c
parent5e7045b010bdb56abbfe5714e8debf03a024c016 (diff)
virtio_blk: helper function to format disk names
The current virtio block's naming algorithm just supports 18278 (26^3 + 26^2 + 26) disks. If there are more virtio blocks, there will be disks with the same name. Based on commit 3e1a7ff8a0a7b948f2684930166954f9e8e776fe, add a function "virtblk_name_format()" for virtio block to support mass of disks naming. Notes: - Our naming scheme is ugly. We are stuck with it for virtio but don't use it for any new driver: new drivers should name their devices PREFIX%d where the sequence number can be allocated by ida - sd_format_disk_name has exactly the same logic. Moving it to a central place was deferred over worries that this will make people keep using the legacy naming in new drivers. We kept code idential in case someone wants to deduplicate later. Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com> Acked-by: Asias He <asias@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'kernel/freezer.c')
0 files changed, 0 insertions, 0 deletions