Skip to content
Commit a72c5e5e authored by Nao Nishijima's avatar Nao Nishijima Committed by James Bottomley
Browse files

[SCSI] genhd: add a new attribute "alias" in gendisk



This patch allows the user to set an "alias" of the disk via sysfs interface.

This patch only adds a new attribute "alias" in gendisk structure.
To show the alias instead of the device name in kernel messages,
we need to revise printk messages and use alias_name() in them.

Example:
(current) printk("disk name is %s\n", disk->disk_name);
(new)     printk("disk name is %s\n", alias_name(disk));

Users can use alphabets, numbers, '-' and '_' in "alias" attribute. A disk can
have an "alias" which length is up to 255 bytes. This attribute is write-once.

Suggested-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Suggested-by: default avatarJon Masters <jcm@redhat.com>
Signed-off-by: default avatarNao Nishijima <nao.nishijima.xt@hitachi.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 76e4e12f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment