1. 05 12月, 2009 3 次提交
    • 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
    • B
      [SCSI] osduld: Use device->release instead of internal kref · d6ae4333
      Boaz Harrosh 提交于
      The true logic of this patch will be clear in the next patch where we
      use the class_find_device() API. When doing so the use of an internal
      kref leaves us a narrow window where a find is started while the actual
      object can go away. Using the device's kobj reference solves this
      problem because now the same kref is used for both operations. (Remove
      and find)
      
      Core changes
      * Embed a struct device in uld_ structure and use device_register
        instead of devie_create. Set __remove to be the device release
        function.
      * __uld_get/put is just get_/put_device. Now every thing is accounted
        for on the device object. Internal kref is removed.
      * At __remove() we can safely de-allocate the uld_ structure. (The
        function has moved to avoid forward declaration)
      
      Some cleanups
      * Use class register/unregister is cleaner for this driver now.
      * cdev ref-counting games are no longer necessary
      
      I have incremented the device version string in case of new bugs.
      
      Note: Previous bugfix of taking the reference around fput() still
            applies.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      d6ae4333
    • B
      [SCSI] libosd: osd_dev_is_ver1 - Minor API cleanup · d531b379
      Boaz Harrosh 提交于
      define a new osd_dev_is_ver1 that operates on devices
      and the old osd_req_is_ver1 uses that new API.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      d531b379
  2. 10 6月, 2009 4 次提交
  3. 13 3月, 2009 6 次提交