]> git.baikalelectronics.ru Git - kernel.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)
commited7315a2ccf996bb629a59fb81d155ff30bb8ede
tree223f2de31c371175a8f96faeb0b27ff1f5789875
parentca5c5fd455a5e0ec64dd6dd020e9177287cafeef
Staging: zram: allow partial page operations

Commit cfffab03b17fb429fb37ea919e8a82fc6ebf0257 (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