• C
    block: add a proper block layer data direction encoding · 87374179
    Christoph Hellwig 提交于
    Currently the block layer op_is_write, bio_data_dir and rq_data_dir
    helper treat every operation that is not a READ as a data out operation.
    This worked surprisingly long, but the new REQ_OP_ZONE_REPORT operation
    actually adds a second operation that reads data from the device.
    Surprisingly nothing critical relied on this direction, but this might
    be a good opportunity to properly fix this issue up.
    
    We take a little inspiration and use the least significant bit of the
    operation number to encode the data direction, which just requires us
    to renumber the operations to fix this scheme.
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Reviewed-by: NShaun Tancheff <shaun.tancheff@seagate.com>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    87374179
fs.h 103.6 KB