public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nao Nishijima <nao.nishijima.xt@hitachi.com>
To: Karel Zak <kzak@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	James.Bottomley@HansenPartnership.com, kay.sievers@vrfy.org,
	jcm@redhat.com, greg@kroah.com,
	dle-develop@lists.sourceforge.net,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	yrl.pp-manager.tt@hitachi.com, dgilbert@interlog.com,
	stefanr@s5r6.in-berlin.de, hare@suse.de
Subject: Re: [RFC PATCH 0/4] Persistent device name using alias name
Date: Sat, 16 Jul 2011 20:40:27 +0900	[thread overview]
Message-ID: <4E2178AB.1080007@hitachi.com> (raw)
In-Reply-To: <20110715124806.GH3486@nb.net.home>

Hi, Karel

Thank you for your comments.

(2011/07/15 21:48), Karel Zak wrote:
> On Fri, Jul 15, 2011 at 03:55:02PM +0900, Nao Nishijima wrote:
>>>  If there is not /dev/foo and /sys/block/foo then the patch introduces
>>>  a REGRESSION. 
>>>  
>>>  The names from /proc/partitions are used in many applications
>>>  (libblkid, fdisk, ...) for many many years. The applications will not
>>>  work as expected.
>>>
>>
>> I think that it is not a regression when users do not set an alias name.
>> Of course, I am going to modify all these utils so that users can use
>> alias names.
>>
>> The purpose of alias names is to unify the name of device which users
>> operate and see. Therefore, I think that users would like to get an
>> alias name from it, because currently they get a device name form it.
>>
>> However, for who wants to use alias name only for dmesg, I have an
>> enhancement idea that users can choose alias names or device names in
>> procfs by sysctl (default is device names).
> 
>>From my point of view
> 
>     dmesg | grep <alias>
> 
> seems a little bit problematic, because for example initial messages
> for the device will be invisible. In the log will be messages with
> original canonical names and another (later) messages with aliases, you
> can also change the alias, etc. Seems like a mess. The log should be
> consistent...
> 
> I think it would be better to use always only canonical names in the
> kernel log and translate to something more user-friendly in userspace.
> For example if you add some meta-information to the kernel log then we
> can improve dmesg(1) to translate the canonical names to aliases.
> 
>  printk(KERN_INFO "this is info about %{device}s", device);
> 
>  <5>[105221.774534]{device=sda} this is info about sda
> 
> or whatever... (this is a nice topic with many colors for the bike
> shed:-)
> 
>> I would like to hear your opinion about this.
> 
> If you want to modify all the userspace utils then you don't have to
> modify /proc/partitions :-)
> 
> You can keep the standard names in /proc/partitions (so the file will
> be compatible with /sys and /dev) and you can modify all the utils to
> translate the canonical device names to aliases. The result will be
> the same, except "cat /proc/partitions" -- but I think that instead of
> "cat" you can use "lsblk".
> 

"lsblk" is great. (Sorry, I didn't know this command until now)

I think it would be good that users can get alias name from BOTH of
"lsblk" and "/proc/partitions", because users expect to see same name in
kernel output and command output as they can see now.

In kernel message, I think that "alias name" is necessary. Because those
logs are output when kernel crashes, it outputs kernel message to serial
console. In that case, it's hard to convert canonical device name to
alias name.

> If you add only the attribute (alias name) to the /sys then you don't
> have to care if all the utils are already modified.
> 
> Anyway, I still agree with Kay and Greg -- the proper solution
> is to improve printk() and dmesg(1). The aliases could be implemented 
> in userspace by udev /dev/disk/by-alias/<cool_name> symlinks.
> 

Best regards,

-- 
Nao NISHIJIMA
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., YOKOHAMA Research  Laboratory
Email: nao.nishijima.xt@hitachi.com

      reply	other threads:[~2011-07-16 11:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08  8:45 [RFC PATCH 0/4] Persistent device name using alias name Nao Nishijima
2011-07-08  8:46 ` [RFC PATCH 1/4] block: add a new attribute "alias name" in gendisk structure Nao Nishijima
2011-07-08  8:46 ` [RFC PATCH 2/4] sd: modify printk for alias_name Nao Nishijima
2011-07-09  5:42   ` [PATCH] scsi: Make functions out of logging macros Joe Perches
2011-07-09 13:32     ` Nao Nishijima
2011-07-08  8:46 ` [RFC PATCH 3/4] fs: modify disk_name() for alias name Nao Nishijima
2011-07-08  8:46 ` [RFC PATCH 4/4] sd: cleanup " Nao Nishijima
2011-07-08 14:54 ` [RFC PATCH 0/4] Persistent device name using " Greg KH
2011-07-08 15:41   ` Kay Sievers
2011-07-08 15:47     ` Greg KH
2011-07-08 15:54       ` James Bottomley
2011-07-08 16:04         ` Greg KH
2011-07-08 16:17           ` James Bottomley
2011-07-08 16:32             ` Greg KH
2011-07-08 16:15         ` Kay Sievers
2011-07-08 16:38           ` Kay Sievers
2011-07-11 11:47             ` Hannes Reinecke
2011-07-09  6:11           ` Masami Hiramatsu
2011-08-03 17:16             ` Borislav Petkov
2011-08-10  2:01               ` Masami Hiramatsu
2011-07-08 19:45 ` Karel Zak
2011-07-08 19:58   ` Greg KH
2011-07-15  6:55   ` Nao Nishijima
2011-07-15 12:48     ` Karel Zak
2011-07-16 11:40       ` Nao Nishijima [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E2178AB.1080007@hitachi.com \
    --to=nao.nishijima.xt@hitachi.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dgilbert@interlog.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=greg@kroah.com \
    --cc=hare@suse.de \
    --cc=jcm@redhat.com \
    --cc=kay.sievers@vrfy.org \
    --cc=kzak@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox