Re: [PATCH 0/2] make automatic device_id generation possible

From: Sergey Senozhatsky
Date: Wed Mar 04 2015 - 20:47:54 EST

On (03/05/15 10:33), Minchan Kim wrote:
> > hm, I can think of a huge build server with tons of users. /dev/zram$(id -u)
> > created during user login and destroyed during logout. so users use theirs own
> > zram devices with predictable device ids (which also makes it simpler for admin)
> > for compilation/etc., and don't pressure hdds that much.
> They upgraded the system and from now on, one of app tries automatic
> id with zram for some reason. What happens if he gets some user id
> before the user login? The system should have fallback in the case of
> failing to create own userid assignment.

we upgraded our scripts but landed some bugs there? it's up to particular
implementation. in your example, I assume, someone used zram with num_devices >= 1000?
that's impossible. current num_devices limitation is 32. and uid-s start from 1000.

these scripts should check if device has been created anyway, it just adds -EEXIST
check. in general "what if user space does something wrong" thing can be beaten by
"what if user space does everything right" argument. when script fails we just go
and fix that script, I guess.


> Hmm, Coexisting specific and automatic id assign seem to be not a
> godd idea.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at