UPSTREAM: zram: add interface to specif backing device
authorMinchan Kim <minchan@kernel.org>
Wed, 6 Sep 2017 23:19:54 +0000 (16:19 -0700)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:24 +0000 (21:13 +0000)
commitd70dcf75b1ba3b8ac083290c1542722aa5846b2e
tree419e4413112abc47d859fe9a01776a94ce08a914
parentd916e698401b7f3cc9ec27331c2cd9071d2f472b
UPSTREAM: zram: add interface to specif backing device

For writeback feature, user should set up backing device before the zram
working.

This patch enables the interface via /sys/block/zramX/backing_dev.

Currently, it supports block device only but it could be enhanced for
file as well.

Link: http://lkml.kernel.org/r/1498459987-24562-5-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Juneho Choi <juno.choi@lge.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 013bf95a83ec760a2afc37fabd6bf13a9cdae205)
Signed-off-by: Peter Kalauskas <peskal@google.com>
Bug: 112488418
Change-Id: I4bbf12ed7496d476bddd574e756bac5c8a838089
drivers/block/zram/zram_drv.c
drivers/block/zram/zram_drv.h