1. 04 Nov, 2016 5 commits
  2. 03 Nov, 2016 1 commit
  3. 02 Nov, 2016 16 commits
  4. 01 Nov, 2016 16 commits
  5. 28 Oct, 2016 2 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