linux/drivers/block
Christoph Hellwig a70aae1250 zram: always compile read_from_bdev_sync
Patch series "zram I/O path cleanups and fixups", v3.

This series cleans up the zram I/O path, and fixes the handling of
synchronous I/O to the underlying device in the writeback_store function
or for > 4K PAGE_SIZE systems.

The fixes are at the end, as I could not fully reason about them being
safe before untangling the callchain.


This patch (of 17):

read_from_bdev_sync is currently only compiled for non-4k PAGE_SIZE, which
means it won't be built with the most common configurations.

Replace the ifdef with a check for the PAGE_SIZE in an if instead.  The
check uses an extra symbol and IS_ENABLED to allow the compiler to
eliminate the dead code, leading to the same generated code size:

   text	   data	    bss	    dec	    hex	filename
  16709	   1428	     12	  18149	   46e5	drivers/block/zram/zram_drv.o.old
  16709	   1428	     12	  18149	   46e5	drivers/block/zram/zram_drv.o.new

Link: https://lkml.kernel.org/r/20230411171459.567614-1-hch@lst.de
Link: https://lkml.kernel.org/r/20230411171459.567614-2-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-04-18 16:29:56 -07:00
..
aoe
drbd
mtip32xx
null_blk block: null_blk: cleanup null_queue_rq() 2023-03-15 06:50:24 -06:00
rnbd
xen-blkback
zram zram: always compile read_from_bdev_sync 2023-04-18 16:29:56 -07:00
amiflop.c
ataflop.c
brd.c
floppy.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
Kconfig
loop.c
Makefile
n64cart.c
nbd.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c
rbd_types.h
sunvdc.c block: sunvdc: add check for mdesc_grab() returning NULL 2023-03-15 08:48:58 -06:00
swim.c
swim3.c
swim_asm.S
ublk_drv.c block/io_uring: pass in issue_flags for uring_cmd task_work handling 2023-03-20 20:01:25 -06:00
virtio_blk.c
xen-blkfront.c
z2ram.c