• C
    block: add disk/bio-based accounting helpers · 956d510e
    Christoph Hellwig 提交于
    Add two new helpers to simplify I/O accounting for bio based drivers.
    Currently these drivers use the generic_start_io_acct and
    generic_end_io_acct helpers which have very cumbersome calling
    conventions, don't actually return the time they started accounting,
    and try to deal with accounting for partitions, which can't happen
    for bio based drivers.  The new helpers will be used to subsequently
    replace uses of the old helpers.
    
    The main API is the bio based wrappes in blkdev.h, but for zram
    which wants to account rw_page based I/O lower level routines are
    provided as well.
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Reviewed-by: NKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    956d510e
blk-core.c 50.1 KB