linux/drivers/block
Sergey Senozhatsky f635725c39 zram: do not waste zram_table_entry flags bits
zram_table_entry::flags stores object size in the lower bits and zram
pageflags in the upper bits.  However, for some reason, we use 24 lower
bits, while maximum zram object size is PAGE_SIZE, which requires
PAGE_SHIFT bits (up to 16 on arm64).  This wastes 24 - PAGE_SHIFT bits
that we can use for additional zram pageflags instead.

Also add a BUILD_BUG_ON() to alert us should we run out of bits in
zram_table_entry::flags.

Link: https://lkml.kernel.org/r/20220912152744.527438-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Brian Geffon <bgeffon@google.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-10-03 14:03:09 -07:00
..
aoe block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
drbd block: change the blk_queue_split calling convention 2022-08-02 17:22:53 -06:00
mtip32xx blk-mq: Drop 'reserved' arg of busy_tag_iter_fn 2022-07-06 06:33:53 -06:00
null_blk null_blk: fix ida error handling in null_add_dev() 2022-08-02 17:22:41 -06:00
paride block: Change the type of req_op() and bio_op() into enum req_op 2022-07-14 12:14:30 -06:00
rnbd block/rnbd-srv: Replace sess_dev_list with index_idr 2022-08-02 17:14:50 -06:00
xen-blkback xen: branch for v6.0-rc1b 2022-08-14 09:28:54 -07:00
zram zram: do not waste zram_table_entry flags bits 2022-10-03 14:03:09 -07:00
amiflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ataflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
brd.c block/brd: Use the enum req_op type 2022-07-14 12:14:31 -06:00
floppy.c block/floppy: Fix a sparse warning 2022-07-14 12:14:31 -06:00
Kconfig remove the sx8 block driver 2022-08-02 17:22:46 -06:00
loop.c loop: Check for overflow while configuring loop 2022-08-24 06:52:52 -06:00
Makefile remove the sx8 block driver 2022-08-02 17:22:46 -06:00
n64cart.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
nbd.c nbd: add missing definition of pr_fmt 2022-08-02 17:22:41 -06:00
pktcdvd.c block: change the blk_queue_split calling convention 2022-08-02 17:22:53 -06:00
ps3disk.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ps3vram.c block: change the blk_queue_split calling convention 2022-08-02 17:22:53 -06:00
rbd_types.h libceph, rbd: replace zero-length array with flexible-array 2020-06-01 13:22:53 +02:00
rbd.c We have a good pile of various fixes and cleanups from Xiubo, Jeff, 2022-08-11 12:41:07 -07:00
sunvdc.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim3.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
swim.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ublk_drv.c ublk_drv: do not add a re-issued request aborted previously to ioucmd's task_work 2022-08-16 06:16:19 -06:00
virtio_blk.c virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
xen-blkfront.c xen: branch for v6.0-rc1b 2022-08-14 09:28:54 -07:00
z2ram.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00