From: Ian Kent <raven@themaw.net>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
"David S. Miller" <davem@davemloft.net>,
Miklos Szeredi <miklos@szeredi.hu>,
Chris Mason <chris.mason@oracle.com>,
Alasdair G Kergon <agk@redhat.com>,
Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Subject: Re: add devname module aliases to allow module on-demand auto-loading
Date: Fri, 21 May 2010 19:11:57 +0800 [thread overview]
Message-ID: <1274440317.2291.1.camel@localhost> (raw)
In-Reply-To: <1274371640.302.5.camel@yio.site>
On Thu, 2010-05-20 at 18:07 +0200, Kay Sievers wrote:
> From: Kay Sievers <kay.sievers@vrfy.org>
> Subject: add devname module aliases to allow module on-demand auto-loading
>
> This adds:
> alias: devname:<name>
> to some common kernel modules, which will allow the on-demand loading
> of the kernel module when the device node is accessed.
>
snip ...
> --- a/fs/autofs4/dev-ioctl.c
> +++ b/fs/autofs4/dev-ioctl.c
> @@ -736,11 +736,14 @@ static const struct file_operations _dev
> };
>
> static struct miscdevice _autofs_dev_ioctl_misc = {
> - .minor = MISC_DYNAMIC_MINOR,
> + .minor = AUTOFS_MINOR,
> .name = AUTOFS_DEVICE_NAME,
> .fops = &_dev_ioctl_fops
> };
>
> +MODULE_ALIAS_MISCDEV(BTRFS_MINOR);
Is this a typo or am I missing something?
Shouldn't it be:
+MODULE_ALIAS_MISCDEV(AUTOFS_MINOR);
> +MODULE_ALIAS("devname:autofs");
> +
> /* Register/deregister misc character device */
> int autofs_dev_ioctl_init(void)
> {
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -832,11 +832,14 @@ static const struct file_operations btrf
> };
>
> static struct miscdevice btrfs_misc = {
> - .minor = MISC_DYNAMIC_MINOR,
> + .minor = BTRFS_MINOR,
> .name = "btrfs-control",
> .fops = &btrfs_ctl_fops
> };
>
> +MODULE_ALIAS_MISCDEV(BTRFS_MINOR);
> +MODULE_ALIAS("devname:btrfs-control");
> +
> static int btrfs_interface_init(void)
> {
> return misc_register(&btrfs_misc);
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -18,6 +18,7 @@
> #include <linux/slab.h>
>
> MODULE_ALIAS_MISCDEV(FUSE_MINOR);
> +MODULE_ALIAS("devname:fuse");
>
> static struct kmem_cache *fuse_req_cachep;
>
> --- a/include/linux/miscdevice.h
> +++ b/include/linux/miscdevice.h
> @@ -31,6 +31,9 @@
> #define FUSE_MINOR 229
> #define KVM_MINOR 232
> #define VHOST_NET_MINOR 233
> +#define BTRFS_MINOR 234
> +#define MAPPER_CTRL_MINOR 235
> +#define AUTOFS_MINOR 236
> #define MISC_DYNAMIC_MINOR 255
>
> struct device;
>
>
next prev parent reply other threads:[~2010-05-21 11:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 16:07 add devname module aliases to allow module on-demand auto-loading Kay Sievers
2010-05-21 11:11 ` Ian Kent [this message]
2010-05-21 11:24 ` Kay Sievers
2010-05-21 15:15 ` Greg KH
2010-05-21 11:34 ` Alasdair G Kergon
2010-05-21 11:51 ` Kay Sievers
2010-05-21 13:11 ` Kay Sievers
2010-05-21 13:39 ` Nikanth Karthikesan
2010-05-21 13:55 ` Kay Sievers
2010-05-21 18:23 ` Alasdair G Kergon
2010-05-21 18:51 ` Kay Sievers
2010-05-21 19:32 ` [dm-devel] " Alasdair G Kergon
2010-05-21 20:20 ` Kay Sievers
2010-05-25 5:33 ` Luca Berra
2010-05-25 9:48 ` Alasdair G Kergon
2010-05-25 9:57 ` Kay Sievers
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=1274440317.2291.1.camel@localhost \
--to=raven@themaw.net \
--cc=agk@redhat.com \
--cc=chris.mason@oracle.com \
--cc=davem@davemloft.net \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=tigran@aivazian.fsnet.co.uk \
/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