1. 03 3月, 2010 1 次提交
  2. 10 12月, 2009 1 次提交
    • B
      [SCSI] libosd: Fix blk_put_request locking again · 5d0961fd
      Boaz Harrosh 提交于
      So libosd has decided to sacrifice some code simplicity for the sake of
      a clean API. One of these things is the possibility for users to call
      osd_end_request, in any condition at any state. This opens up some
      problems with calling blk_put_request when out-side of the completion
      callback but calling __blk_put_request when detecting a from-completion
      state.
      
      The current hack was working just fine until exofs decided to operate on
      all devices in parallel and wait for the sum of the requests, before
      deallocating all osd-requests at once. There are two new possible cases
      1. All request in a group are deallocated as part of the last request's
         async-done, request_queue is locked.
      2. All request in a group where executed asynchronously, but
         de-allocation was delayed to after the async-done, in the context of
         another thread. Async execution but request_queue is not locked.
      
      The solution I chose was to separate the deallocation of the osd_request
      which has the information users need, from the deallocation of the
      internal(2) requests which impose the locking problem. The internal
      block-requests are freed unconditionally inside the async-done-callback,
      when we know the queue is always locked. If at osd_end_request time we
      still have a bock-request, then we know it did not come from within an
      async-done-callback and we can call the regular blk_put_request.
      
      The internal requests were used for carrying error information after
      execution. This information is now copied to osd_request members for
      later analysis by user code.
      
      The external API and behaviour was unchanged, except now it really
      supports what was previously advertised.
      Reported-by: NVineet Agarwal <checkout.vineet@gmail.com>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Cc: Stable Tree <stable@kernel.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      5d0961fd
  3. 05 12月, 2009 4 次提交
    • B
      [SCSI] libosd: Error handling revamped · aa9fffbe
      Boaz Harrosh 提交于
      Administer some love to the osd_req_decode_sense function
      
      * Fix a bad bug with osd_req_decode_sense(). If there was no scsi
        residual, .i.e the request never reached the target, then all the
        osd_sense_info members where garbage.
      
      * Add grossly missing in/out_resid to osd_sense_info and fill them in
        properly.
      
      * Define an osd_err_priority enum which divides the possible errors into
        7 categories in ascending severity. Each category is also assigned a
        Linux return code translation.
      
        Analyze the different osd/scsi/block returned errors and set the
        proper osd_err_priority and Linux return code accordingly.
      
      * extra check a few situations so not to get stuck with inconsistent
        error view. Example an empty residual with an error code, and other
        places ...
      
      Lots of libosd's osd_req_decode_sense clients had this logic in some
      form or another. Consolidate all these into one place that should
      actually know about osd returns. Thous translating it to a more
      abstract error.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      aa9fffbe
    • B
      [SCSI] libosd: Bugfix of error handling in attributes-list decoding · eff21490
      Boaz Harrosh 提交于
      When an error was detected in an attribute list do to
      a target bug. We would print an error but spin endlessly
      regardless. Fix it.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      eff21490
    • B
      [SCSI] libosd: bug in osd_req_decode_sense_full() · 71ecb74b
      Boaz Harrosh 提交于
      The (never tested) osd_sense_attribute_identification case
      has never worked. The loop was never advanced on.
      Fix it to work as intended.
      
      On 10/30/2009 04:39 PM, Roel Kluin wrote:
        I found this by code analysis, searching for while
        loops that test a local variable, but do not modify
        the variable.
      Reported-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      71ecb74b
    • B
      [SCSI] libosd: osd_dev_info: Unique Identification of an OSD device · 2cdd6410
      Boaz Harrosh 提交于
      Define an osd_dev_info structure that Uniquely identifies an OSD
      device lun on the network. The identification is built from unique
      target attributes and is the same for all network/SAN machines.
      
      osduld_info_lookup() - NEW
          New API that will lookup an osd_dev by its osd_dev_info.
          This is used by pNFS-objects for cross network global device
          identification. And by exofs multy-device support, the device
          info is specified in the on-disk exofs device table.
      
      osduld_device_info() - NEW
          Given an osd_dev handle returns its associated osd_dev_info.
          The ULD fetches this information at startup and hangs it on
          each OSD device. (This is a fast operation that can be called
          at any condition)
      
      osduld_device_same() - NEW
          With a given osd_dev at one hand and an osd_dev_info
          at another, we would like to know if they are the same
          device.
          Two osd_dev handles can be checked by:
              osduld_device_same(od1, osduld_device_info(od2));
      
      osd_auto_detect_ver() - REVISED
          Now returns an osd_dev_info structure. Is only called once
          by ULD as before. See added comments for how to use.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      2cdd6410
  4. 10 6月, 2009 6 次提交
  5. 19 5月, 2009 2 次提交
  6. 11 5月, 2009 1 次提交
    • T
      block: cleanup rq->data_len usages · b0790410
      Tejun Heo 提交于
      With recent unification of fields, it's now guaranteed that
      rq->data_len always equals blk_rq_bytes().  Convert all non-IDE direct
      users to accessors.  IDE will be converted in a separate patch.
      
      Boaz: spotted incorrect data_len/resid_len conversion in osd.
      
      [ Impact: convert direct rq->data_len usages to blk_rq_bytes() ]
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b0790410
  7. 28 4月, 2009 4 次提交
  8. 03 4月, 2009 1 次提交
  9. 13 3月, 2009 9 次提交