From: Greg KH <gregkh@linuxfoundation.org>
To: Michael Marineau <michael.marineau@coreos.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 9p: send uevent after adding/removing mount_tag attribute
Date: Sat, 10 Aug 2013 22:12:23 -0700 [thread overview]
Message-ID: <20130811051223.GA17146@kroah.com> (raw)
In-Reply-To: <1376196825-19793-1-git-send-email-michael.marineau@coreos.com>
On Sun, Aug 11, 2013 at 12:53:45AM -0400, Michael Marineau wrote:
> This driver adds an attribute to the existing virtio device so a CHANGE
> event is required in order udev rules to make use of it. The ADD event
> happens before this driver is probed and unlike a more typical driver
> like a block device there isn't a higher level device to watch for.
>
> Signed-off-by: Michael Marineau <michael.marineau@coreos.com>
> ---
> net/9p/trans_virtio.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
> index e1c26b1..990afab 100644
> --- a/net/9p/trans_virtio.c
> +++ b/net/9p/trans_virtio.c
> @@ -577,6 +577,10 @@ static int p9_virtio_probe(struct virtio_device *vdev)
> mutex_lock(&virtio_9p_lock);
> list_add_tail(&chan->chan_list, &virtio_chan_list);
> mutex_unlock(&virtio_9p_lock);
> +
> + /* Let udev rules use the new mount_tag attribute. */
> + kobject_uevent(&(vdev->dev.kobj), KOBJ_CHANGE);
Ick, this is due to the sysfs file being added to the device after udev
was told the device was present.
I'm working on cleaning all of this up, to keep stuff like this from
happening in the first place, by creating all of the needed files before
userspace is told about the object, but it's a long slog, and will take
a year or so to get it all right, the first pieces of this are going to
be showing up in 3.12 or .13 at the earliest.
For now, I have no objection to this patch at all, especially as it
solves the problem for you.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
prev parent reply other threads:[~2013-08-11 5:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-11 4:53 [PATCH] 9p: send uevent after adding/removing mount_tag attribute Michael Marineau
2013-08-11 5:12 ` Greg KH [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=20130811051223.GA17146@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.marineau@coreos.com \
--cc=v9fs-developer@lists.sourceforge.net \
/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