1. 04 Nov, 2016 4 commits
  2. 03 Nov, 2016 1 commit
  3. 02 Nov, 2016 16 commits
  4. 01 Nov, 2016 16 commits
  5. 28 Oct, 2016 3 commits
    • Christoph Hellwig's avatar
      block: add a proper block layer data direction encoding · 87374179
      Christoph Hellwig authored
      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: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarShaun Tancheff <shaun.tancheff@seagate.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      87374179
    • Christoph Hellwig's avatar
      block: better op and flags encoding · ef295ecf
      Christoph Hellwig authored
      Now that we don't need the common flags to overflow outside the range
      of a 32-bit type we can encode them the same way for both the bio and
      request fields.  This in addition allows us to place the operation
      first (and make some room for more ops while we're at it) and to
      stop having to shift around the operation values.
      
      In addition this allows passing around only one value in the block layer
      instead of two (and eventuall also in the file systems, but we can do
      that later) and thus clean up a lot of code.
      
      Last but not least this allows decreasing the size of the cmd_flags
      field in struct request to 32-bits.  Various functions passing this
      value could also be updated, but I'd like to avoid the churn for now.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      ef295ecf
    • Christoph Hellwig's avatar
      block: split out request-only flags into a new namespace · e8064021
      Christoph Hellwig authored
      A lot of the REQ_* flags are only used on struct requests, and only of
      use to the block layer and a few drivers that dig into struct request
      internals.
      
      This patch adds a new req_flags_t rq_flags field to struct request for
      them, and thus dramatically shrinks the number of common requests.  It
      also removes the unfortunate situation where we have to fit the fields
      from the same enum into 32 bits for struct bio and 64 bits for
      struct request.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarShaun Tancheff <shaun.tancheff@seagate.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      e8064021