[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: NJames Bottomley <James.Bottomley@HansenPartnership.com> Suggested-by: NJon Masters <jcm@redhat.com> Signed-off-by: NNao Nishijima <nao.nishijima.xt@hitachi.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
Showing
想要评论请 注册 或 登录