1. 09 10月, 2008 11 次提交
  2. 11 9月, 2008 1 次提交
  3. 27 8月, 2008 3 次提交
  4. 02 8月, 2008 1 次提交
  5. 17 7月, 2008 1 次提交
  6. 16 7月, 2008 1 次提交
  7. 04 7月, 2008 1 次提交
  8. 03 7月, 2008 8 次提交
  9. 30 4月, 2008 2 次提交
  10. 29 4月, 2008 4 次提交
  11. 21 4月, 2008 2 次提交
    • A
      block: fix memory hotplug and bouncing in block layer · 2472892a
      Andi Kleen 提交于
      Only noticed this while hacking something else, no test case.
      
      blk_max_low_pfn is initialized once at bootup by the block layer from
      max_low_pfn.  But max_low_pfn is not necessarily constant over the runtime of
      the system when you consider memory hotplug.  What could happen if that
      someone adds memory later the block layer wouldn't get updated and then start
      bouncing memory unnecessarily.
      
      Also on 64bit blk_max_low_pfn actually isn't needed because it just disables
      bouncing essentially and there is no highmem.  And nobody can pass pfns >
      max_low_pfn to the block layer, because those wouldn't have a struct page and
      I suspect block layer wouldn't be very happy without that.
      
      So set BLK_BOUNCE_HIGH to infinity (-1ULL) on 64bit.  That avoids the problem
      of having to update it on memory hotadd.
      
      On 32bit I kept the same behaviour because at least on i386
      memory hotadd only adds HIGHMEM, never lowmem.
      
      BLK_BOUNCE_ANY is always set to infinity on both 32 and 64bit.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Acked-by: NYasunori Goto <y-goto@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      2472892a
    • F
      block: move the padding adjustment to blk_rq_map_sg · f18573ab
      FUJITA Tomonori 提交于
      blk_rq_map_user adjusts bi_size of the last bio. It breaks the rule
      that req->data_len (the true data length) is equal to sum(bio). It
      broke the scsi command completion code.
      
      commit e97a294e was introduced to fix
      the above issue. However, the partial completion code doesn't work
      with it. The commit is also a layer violation (scsi mid-layer should
      not know about the block layer's padding).
      
      This patch moves the padding adjustment to blk_rq_map_sg (suggested by
      James). The padding works like the drain buffer. This patch breaks the
      rule that req->data_len is equal to sum(sg), however, the drain buffer
      already broke it. So this patch just restores the rule that
      req->data_len is equal to sub(bio) without breaking anything new.
      
      Now when a low level driver needs padding, blk_rq_map_user and
      blk_rq_map_user_iov guarantee there's enough room for padding.
      blk_rq_map_sg can safely extend the last entry of a scatter list.
      
      blk_rq_map_sg must extend the last entry of a scatter list only for a
      request that got through bio_copy_user_iov. This patches introduces
      new REQ_COPY_USER flag.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      f18573ab
  12. 04 3月, 2008 2 次提交
  13. 19 2月, 2008 2 次提交
    • T
      block: implement request_queue->dma_drain_needed · 2fb98e84
      Tejun Heo 提交于
      Draining shouldn't be done for commands where overflow may indicate
      data integrity issues.  Add dma_drain_needed callback to
      request_queue.  Drain buffer is appened iff this function returns
      non-zero.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      2fb98e84
    • T
      block: add request->raw_data_len · 6b00769f
      Tejun Heo 提交于
      With padding and draining moved into it, block layer now may extend
      requests as directed by queue parameters, so now a request has two
      sizes - the original request size and the extended size which matches
      the size of area pointed to by bios and later by sgs.  The latter size
      is what lower layers are primarily interested in when allocating,
      filling up DMA tables and setting up the controller.
      
      Both padding and draining extend the data area to accomodate
      controller characteristics.  As any controller which speaks SCSI can
      handle underflows, feeding larger data area is safe.
      
      So, this patch makes the primary data length field, request->data_len,
      indicate the size of full data area and add a separate length field,
      request->raw_data_len, for the unmodified request size.  The latter is
      used to report to higher layer (userland) and where the original
      request size should be fed to the controller or device.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      6b00769f
  14. 08 2月, 2008 1 次提交
    • J
      block: fixup rq_init() a bit · 63a71386
      Jens Axboe 提交于
      Rearrange fields in cache order and initialize some fields that
      we didn't previously init. Remove init of ->completion_data, it's
      part of a union with ->hash. Luckily clearing the rb node is the same
      as setting it to null!
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      63a71386