1. 18 1月, 2013 31 次提交
  2. 21 12月, 2012 1 次提交
  3. 18 12月, 2012 1 次提交
    • A
      rbd: don't use ENOTSUPP · b8f5c6ed
      Alex Elder 提交于
      ENOTSUPP is not a standard errno (it shows up as "Unknown error 524"
      in an error message).  This is what was getting produced when the
      the local rbd code does not implement features required by a
      discovered rbd image.
      
      Change the error code returned in this case to ENXIO.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      b8f5c6ed
  4. 17 12月, 2012 2 次提交
    • A
      rbd: get rid of RBD_MAX_SEG_NAME_LEN · 2fd82b9e
      Alex Elder 提交于
      RBD_MAX_SEG_NAME_LEN represents the maximum length of an rbd object
      name (i.e., one of the objects providing storage backing an rbd
      image).
      
      Another symbol, MAX_OBJ_NAME_SIZE, is used in the osd client code to
      define the maximum length of any object name in an osd request.
      
      Right now they disagree, with RBD_MAX_SEG_NAME_LEN being too big.
      
      There's no real benefit at this point to defining the rbd object
      name length limit separate from any other object name, so just
      get rid of RBD_MAX_SEG_NAME_LEN and use MAX_OBJ_NAME_SIZE in its
      place.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      2fd82b9e
    • A
      rbd: do not allow remove of mounted-on image · 42382b70
      Alex Elder 提交于
      There is no check in rbd_remove() to see if anybody holds open the
      image being removed.  That's not cool.
      
      Add a simple open count that goes up and down with opens and closes
      (releases) of the device, and don't allow an rbd image to be removed
      if the count is non-zero.
      
      Protect the updates of the open count value with ctl_mutex to ensure
      the underlying rbd device doesn't get removed while concurrently
      being opened.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NSage Weil <sage@inktank.com>
      42382b70
  5. 01 11月, 2012 5 次提交
    • A
      rbd: get additional info in parent spec · 9e15b77d
      Alex Elder 提交于
      When a layered rbd image has a parent, that parent is identified
      only by its pool id, image id, and snapshot id.  Images that have
      been mapped also record *names* for those three id's.
      
      Add code to look up these names for parent images so they match
      mapped images more closely.  Skip doing this for an image if it
      already has its pool name defined (this will be the case for images
      mapped by the user).
      
      It is possible that an the name of a parent image can't be
      determined, even if the image id is valid.  If this occurs it
      does not preclude correct operation, so don't treat this as
      an error.
      
      On the other hand, defined pools will always have both an id and a
      name.   And any snapshot of an image identified as a parent for a
      clone image will exist, and will have a name (if not it indicates
      some other internal error).  So treat failure to get these bits
      of information as errors.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      9e15b77d
    • A
      rbd: get parent spec for version 2 images · 86b00e0d
      Alex Elder 提交于
      Add support for getting the the information identifying the parent
      image for rbd images that have them.  The child image holds a
      reference to its parent image specification structure.  Create a new
      entry "parent" in /sys/bus/rbd/image/N/ to report the identifying
      information for the parent image, if any.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      86b00e0d
    • A
      rbd: allow null image name · a92ffdf8
      Alex Elder 提交于
      Format 2 parent images are partially identified by their image id,
      but it may not be possible to determine their image name.  The name
      is not strictly needed for correct operation, so we won't be
      treating it as an error if we don't know it.  Handle this case
      gracefully in rbd_name_show().
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      a92ffdf8
    • A
      rbd: allow null image name · 2c0d0a10
      Alex Elder 提交于
      We will know the image id for format 2 parent images, but won't
      initially know its image name.  Avoid making the query for an image
      id in rbd_dev_image_id() if it's already known.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      2c0d0a10
    • A
      rbd: encapsulate last part of probe · 83a06263
      Alex Elder 提交于
      Group the activities that now take place after an rbd_dev_probe()
      call into a single function, and move the call to that function
      into rbd_dev_probe() itself.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      83a06263