• Christoph Hellwig's avatar
    block: remove ->rw_page · 3222d8c2
    Christoph Hellwig authored
    The ->rw_page method is a special purpose bypass of the usual bio handling
    path that is limited to single-page reads and writes and synchronous which
    causes a lot of extra code in the drivers, callers and the block layer.
    
    The only remaining user is the MM swap code.  Switch that swap code to
    simply submit a single-vec on-stack bio an synchronously wait on it based
    on a newly added QUEUE_FLAG_SYNCHRONOUS flag set by the drivers that
    currently implement ->rw_page instead.  While this touches one extra cache
    line and executes extra code, it simplifies the block layer and drivers
    and ensures that all feastures are properly supported by all drivers, e.g.
    right now ->rw_page bypassed cgroup writeback entirely.
    
    [akpm@linux-foundation.org: fix comment typo, per Dan]
    Link: https://lkml.kernel.org/r/20230125133436.447864-8-hch@lst.deSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDan Williams <dan.j.williams@intel.com>
    Cc: Dave Jiang <dave.jiang@intel.com>
    Cc: Ira Weiny <ira.weiny@intel.com>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Keith Busch <kbusch@kernel.org>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Vishal Verma <vishal.l.verma@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    3222d8c2
brd.c 11.8 KB