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

Minchan Kim
2015-03-05T00:20:28Z

Hello Sergey,

On Wed, Mar 04, 2015 at 11:16:39PM +0900, Sergey Senozhatsky wrote:
> Hello,
>
> Make zram-contol/zram_add interface easier to use. Extend it to support
> read and write operations.
>
> Write operation remains the same:
>
> echo X > /sys/class/zram-control/zram_add
>
> will add /dev/zramX (or return error).
>
>
> Read operation is treated as 'pick up available device_id, add new
> device and return device_id'.
>
> Example:
> cat /sys/class/zram-control/zram_add
> 2
> cat /sys/class/zram-control/zram_add
> 3

Thanks for handling my concern quickly and sorry for not sending
active feedback in realtime. Maybe I should turn on CONFIG_PREEMPT
in my brain.

I'm not against but I want to know why we should support
user-defined device id. What usecase do you have in mind?

Could we support automatic id support only at this moment?
Then, if some user complains about that in future, we could turn
on user-defined device id easily and we could know the usecase.

In summary, I want to support only "cat /sys/class/zram-control/zram_add"
unless you have feasible usecase.

What do you think about it?

>
> Sergey Senozhatsky (2):
> zram: return zram device_id value from zram_add()
> zram: introduce automatic device_id generation
>
> Documentation/ABI/testing/sysfs-class-zram | 7 ++++--
> Documentation/blockdev/zram.txt | 10 ++++++++
> drivers/block/zram/zram_drv.c | 37 ++++++++++++++++++++++++++----
> 3 files changed, 47 insertions(+), 7 deletions(-)
>
> --
> 2.3.1.167.g7f4ba4b
>

--
Kind regards,
Minchan Kim