1. 12 7月, 2008 1 次提交
    • J
      [SCSI] bsg: fix oops on remove · 8df5fc04
      James Bottomley 提交于
      If you do a modremove of any sas driver, you run into an oops on
      shutdown when the host is removed (coming from the host bsg device).
      The root cause seems to be that there's a use after free of the
      bsg_class_device:  In bsg_kref_release_function, this is used (to do a
      put_device(bcg->parent) after bcg->release has been called.  In sas (and
      possibly many other things) bcd->release frees the queue which contains
      the bsg_class_device, so we get a put_device on unreferenced memory.
      Fix this by taking a copy of the pointer to the parent before releasing
      bsg.
      Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      8df5fc04
  2. 02 5月, 2008 1 次提交
  3. 01 5月, 2008 1 次提交
  4. 23 4月, 2008 1 次提交
    • F
      [SCSI] bsg: add release callback support · 97f46ae4
      FUJITA Tomonori 提交于
      This patch adds release callback support, which is called when a bsg
      device goes away. bsg_register_queue() takes a pointer to a callback
      function. This feature is useful for stuff like sas_host that can't
      use the release callback in struct device.
      
      If a caller doesn't need bsg's release callback, it can call
      bsg_register_queue() with NULL pointer (e.g. scsi devices can use
      release callback in struct device so they don't need bsg's callback).
      
      With this patch, bsg uses kref for refcounts on bsg devices instead of
      get/put_device in fops->open/release. bsg calls put_device and the
      caller's release callback (if it was registered) in kref_put's
      release.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      97f46ae4
  5. 20 4月, 2008 1 次提交
  6. 19 4月, 2008 5 次提交
  7. 04 3月, 2008 1 次提交
    • F
      block: restore the meaning of rq->data_len to the true data length · 7a85f889
      FUJITA Tomonori 提交于
      The meaning of rq->data_len was changed to the length of an allocated
      buffer from the true data length. It breaks SG_IO friends and
      bsg. This patch restores the meaning of rq->data_len to the true data
      length and adds rq->extra_len to store an extended length (due to
      drain buffer and padding).
      
      This patch also removes the code to update bio in blk_rq_map_user
      introduced by the commit 40b01b9b.
      The commit adjusts bio according to memory alignment
      (queue_dma_alignment). However, memory alignment is NOT padding
      alignment. This adjustment also breaks SG_IO friends and bsg. Padding
      alignment needs to be fixed in a proper way (by a separate patch).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <axboe@carl.home.kernel.dk>
      7a85f889
  8. 19 2月, 2008 1 次提交
    • 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
  9. 31 1月, 2008 1 次提交
  10. 12 1月, 2008 1 次提交
  11. 16 10月, 2007 1 次提交
  12. 13 10月, 2007 1 次提交
  13. 31 7月, 2007 1 次提交
  14. 24 7月, 2007 3 次提交
  15. 21 7月, 2007 3 次提交
  16. 20 7月, 2007 2 次提交
  17. 17 7月, 2007 7 次提交
  18. 16 7月, 2007 8 次提交