2013-09-09 15:58:41

by Tom Gundersen

[permalink] [raw]
Subject: [BUG?] staging: zram: Add auto loading of module if user opens /dev/zram.

Hi Konrad,

The above commit (c70bda9 in mainline) doesn't appear to work for me.
I.e., depmod does not create an entry in modules.devname and hence no
device node is created on boot.

If I understand correctly, you'd also need to create the correct
"char-major-<MAJOR>-<MINOR>" alias. But I don't really see how this is
meant to work as I thought zram only created /dev/zramX type device
nodes, and not /dev/zram, or am I missing something?

Cheers,

Tom


2013-09-09 16:42:23

by Kay Sievers

[permalink] [raw]
Subject: Re: [BUG?] staging: zram: Add auto loading of module if user opens /dev/zram.

On Mon, Sep 9, 2013 at 5:58 PM, Tom Gundersen <[email protected]> wrote:
> Hi Konrad,
>
> The above commit (c70bda9 in mainline) doesn't appear to work for me.
> I.e., depmod does not create an entry in modules.devname and hence no
> device node is created on boot.
>
> If I understand correctly, you'd also need to create the correct
> "char-major-<MAJOR>-<MINOR>" alias. But I don't really see how this is
> meant to work as I thought zram only created /dev/zramX type device
> nodes, and not /dev/zram, or am I missing something?

Please just remove it. "devname" is meant to be used for
single-instance devices with a static dev_t, never for things like
zramX.

It will not do anything useful here, it does nothing really without a
statically assigned dev_t, and it should not be used for devices of
this kind anyway.

Thanks,
Kay

2013-09-12 22:43:07

by Greg KH

[permalink] [raw]
Subject: Re: [BUG?] staging: zram: Add auto loading of module if user opens /dev/zram.

On Mon, Sep 09, 2013 at 06:41:48PM +0200, Kay Sievers wrote:
> On Mon, Sep 9, 2013 at 5:58 PM, Tom Gundersen <[email protected]> wrote:
> > Hi Konrad,
> >
> > The above commit (c70bda9 in mainline) doesn't appear to work for me.
> > I.e., depmod does not create an entry in modules.devname and hence no
> > device node is created on boot.
> >
> > If I understand correctly, you'd also need to create the correct
> > "char-major-<MAJOR>-<MINOR>" alias. But I don't really see how this is
> > meant to work as I thought zram only created /dev/zramX type device
> > nodes, and not /dev/zram, or am I missing something?
>
> Please just remove it. "devname" is meant to be used for
> single-instance devices with a static dev_t, never for things like
> zramX.
>
> It will not do anything useful here, it does nothing really without a
> statically assigned dev_t, and it should not be used for devices of
> this kind anyway.

I'll revert this after 3.12-rc1 is out, thanks,

greg k-h