From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: udev virtio by-path naming Date: Mon, 20 Feb 2017 17:00:41 +0100 Message-ID: <20170220170041.68c9bf4f.cornelia.huck@de.ibm.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Viktor Mihajlovski Cc: systemd-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On Mon, 20 Feb 2017 15:34:49 +0100 Viktor Mihajlovski wrote: > Hi, > > with systemd > v229 all virtio block devices will receive persistent > device names in the format /dev/disk-by/virtio-pci-, the > last component being the udev built-in path_id. > > This naming introduces some issues. > > First and obvious, there are virtio implementations not based > on PCI, like virtio-ccw (currently only on s390) and virtio-mmio > (for which I can't speak). This results in persistent names like > /dev/disk-by/virtio-pci-0.0.0001, where the bus id is a CCW id. > One seemingly obvious remedy would be to make the path_id return > virtio-ccw- or more generally virtio--, > both easily done with small patches to systemd-udev. > > But then, I find this naming scheme somewhat weird. > A virtio disk shows up as a regular PCI function on the PCI > bus side by side with other (non-virtio) devices. The naming otoh > suggests that virtio-pci is a subsystem of its own, which is simply > incorrect from a by-path perspective. >From the ccw perspective, this is quite similar: The virtio proxy device shows up on the ccw bus, just like e.g. a dasd device shows up on the ccw bus. > > Using just the plain PCI path id is actually sufficient to identify > a virtio disk by its path. This would be in line with virtio > network interface path names which use the plain PCI naming. Same for ccw: The id on the ccw bus (devno) is already unique and persistent. > > One could argue about back-level compatibility, but virtio by-path > naming has changed multiple times. We have seen virtio-pci-virtio > (not predictable), pci- and virtio-pci- already. It > might be a good time now to settle on a common approach for all > virtio types. > > For the reasons above, I'd vote for -, which > would work for PCI and CCW, not sure about ARM MMIO though. > Opinions? I'm not sure whether there is any reason to make virtio special, although this depends upon what virtio-mmio looks like in the Linux device model (any arm folks here?) In the end, I'd be happy with any naming scheme that does not include 'pci' for non-pci devices.