diff options
author | Minchan Kim <minchan@kernel.org> | 2017-09-06 16:19:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-06 17:27:25 -0700 |
commit | 013bf95a83ec760a2afc37fabd6bf13a9cdae205 (patch) | |
tree | 450ec54a3f10553b66d144554f47a7712fa2a599 /drivers/block/zram/zram_drv.h | |
parent | 693dc1ce25b8c8fa33f930d47cd8f926eeb90812 (diff) | |
download | linux-stable-013bf95a83ec760a2afc37fabd6bf13a9cdae205.tar.gz linux-stable-013bf95a83ec760a2afc37fabd6bf13a9cdae205.tar.bz2 linux-stable-013bf95a83ec760a2afc37fabd6bf13a9cdae205.zip |
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>
Diffstat (limited to 'drivers/block/zram/zram_drv.h')
-rw-r--r-- | drivers/block/zram/zram_drv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h index e34e44d02e3e..113a41118918 100644 --- a/drivers/block/zram/zram_drv.h +++ b/drivers/block/zram/zram_drv.h @@ -115,5 +115,10 @@ struct zram { * zram is claimed so open request will be failed */ bool claim; /* Protected by bdev->bd_mutex */ +#ifdef CONFIG_ZRAM_WRITEBACK + struct file *backing_dev; + struct block_device *bdev; + unsigned int old_block_size; +#endif }; #endif |