summaryrefslogtreecommitdiffstats
path: root/drivers/block/zram/zram_drv.h
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2017-09-07 01:19:54 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-07 02:27:25 +0200
commit013bf95a83ec760a2afc37fabd6bf13a9cdae205 (patch)
tree450ec54a3f10553b66d144554f47a7712fa2a599 /drivers/block/zram/zram_drv.h
parentzram: rename zram_decompress_page to __zram_bvec_read (diff)
downloadlinux-013bf95a83ec760a2afc37fabd6bf13a9cdae205.tar.xz
linux-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.h5
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