[PATCH 0/2] make automatic device_id generation possible

Sergey Senozhatsky
2015-03-04T14:16:22Z

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

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