]> git.karo-electronics.de Git - linux-beck.git/commit
Staging: zram: allow partial page operations
authorJerome Marchand <jmarchan@redhat.com>
Fri, 10 Jun 2011 13:28:48 +0000 (15:28 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Jul 2011 17:07:13 +0000 (10:07 -0700)
commit924bd88d703e53d30f393fac6117f8f1bc79aab6
tree223f2de31c371175a8f96faeb0b27ff1f5789875
parent8c921b2b43d47faa7c11eac1d2673bbe7fbc41dc
Staging: zram: allow partial page operations

Commit 7b19b8d45b216ff3186f066b31937bdbde066f08 (zram: Prevent overflow
in logical block size) introduced ZRAM_LOGICAL_BLOCK_SIZE constant to
prevent overflow of logical block size on 64k page kernel.
However, the current implementation of zram only allow operation on block
of the same size as a page. That makes theorically legit 4k requests fail
on 64k page kernel.

This patch makes zram allow operation on partial pages. Basically, it
means we still do operations on full pages internally, but only copy the
relevent segments from/to the user memory.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/zram/zram_drv.c
drivers/staging/zram/zram_drv.h