From: David Vrabel <david.vrabel@citrix.com>
To: "Olaf Hering" <olaf@aepfle.de>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
"Juergen Gross" <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org, Jeff Mahoney <jeffm@suse.com>
Subject: Re: [PATCH] xen-blkfront: export backend vdev name via sysfs
Date: Thu, 9 Jun 2016 17:47:36 +0100 [thread overview]
Message-ID: <57599DA8.4020808@citrix.com> (raw)
In-Reply-To: <20160609164322.11552-1-olaf@aepfle.de>
On 09/06/16 17:43, Olaf Hering wrote:
> From: Jeff Mahoney <jeffm@suse.com>
>
> This patch creates a sysfs group to export blkfront attribute via sysfs.
> For now, we just export the backend device name.
>
> This helps with migrating existing domU installation from a xenlinux
> based kernel to a pvops based kernel. The old blkfront driver did
> respect the vdev=hd|sd|xvd setting in domU.cfg, while the pvops blkfront
> driver enforce xvd as kernel device name.
>
> If for some reason the domU uses kernel devices names in configuration
> files like fstab, menu.lst, grub.cfg etc. the system may not startup
> properly after upgrading from a dist version with xenlinux based kernel
> to a newer one with pvops based kernel. With the new sysfs attribute
> /sys/block/*/blkfront/backend_dev udev can create a symlink /dev/hda to
> /dev/xvda using rules as shown below.
>
> The value of "vdev" is cached to avoid the load caused by constant
> rereading from the sysfs file.
>
> This might be added to systemd/rules/60-persistent-storage.rules:
> KERNEL=="xvd*[!0-9]", ATTRS{blkfront/backend_dev}=="hd[a-d]", SYMLINK+="$attr{blkfront/backend_dev}"
> KERNEL=="xvd*[0-9]", ATTRS{blkfront/backend_dev}=="hd[a-d]", SYMLINK+="$attr{blkfront/backend_dev}%n"
Why don't you get the udev rule to read the xenstore key directly instead?
David
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-09 16:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 16:43 [PATCH] xen-blkfront: export backend vdev name via sysfs Olaf Hering
2016-06-09 16:47 ` Olaf Hering
2016-06-09 16:47 ` David Vrabel [this message]
2016-06-09 16:58 ` Olaf Hering
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=57599DA8.4020808@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jeffm@suse.com \
--cc=jgross@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=olaf@aepfle.de \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).