1. 29 5月, 2014 2 次提交
    • V
      xen-blkback: defer freeing blkif to avoid blocking xenwatch · 814d04e7
      Valentin Priescu 提交于
      Currently xenwatch blocks in VBD disconnect, waiting for all pending I/O
      requests to finish. If the VBD is attached to a hot-swappable disk, then
      xenwatch can hang for a long period of time, stalling other watches.
      
       INFO: task xenwatch:39 blocked for more than 120 seconds.
       "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
       ffff880057f01bd0 0000000000000246 ffff880057f01ac0 ffffffff810b0782
       ffff880057f01ad0 00000000000131c0 0000000000000004 ffff880057edb040
       ffff8800344c6080 0000000000000000 ffff880058c00ba0 ffff880057edb040
       Call Trace:
       [<ffffffff810b0782>] ? irq_to_desc+0x12/0x20
       [<ffffffff8128f761>] ? list_del+0x11/0x40
       [<ffffffff8147a080>] ? wait_for_common+0x60/0x160
       [<ffffffff8147bcef>] ? _raw_spin_lock_irqsave+0x2f/0x50
       [<ffffffff8147bd49>] ? _raw_spin_unlock_irqrestore+0x19/0x20
       [<ffffffff8147a26a>] schedule+0x3a/0x60
       [<ffffffffa018fe6a>] xen_blkif_disconnect+0x8a/0x100 [xen_blkback]
       [<ffffffff81079f70>] ? wake_up_bit+0x40/0x40
       [<ffffffffa018ffce>] xen_blkbk_remove+0xae/0x1e0 [xen_blkback]
       [<ffffffff8130b254>] xenbus_dev_remove+0x44/0x90
       [<ffffffff81345cb7>] __device_release_driver+0x77/0xd0
       [<ffffffff81346488>] device_release_driver+0x28/0x40
       [<ffffffff813456e8>] bus_remove_device+0x78/0xe0
       [<ffffffff81342c9f>] device_del+0x12f/0x1a0
       [<ffffffff81342d2d>] device_unregister+0x1d/0x60
       [<ffffffffa0190826>] frontend_changed+0xa6/0x4d0 [xen_blkback]
       [<ffffffffa019c252>] ? frontend_changed+0x192/0x650 [xen_netback]
       [<ffffffff8130ae50>] ? cmp_dev+0x60/0x60
       [<ffffffff81344fe4>] ? bus_for_each_dev+0x94/0xa0
       [<ffffffff8130b06e>] xenbus_otherend_changed+0xbe/0x120
       [<ffffffff8130b4cb>] frontend_changed+0xb/0x10
       [<ffffffff81309c82>] xenwatch_thread+0xf2/0x130
       [<ffffffff81079f70>] ? wake_up_bit+0x40/0x40
       [<ffffffff81309b90>] ? xenbus_directory+0x80/0x80
       [<ffffffff810799d6>] kthread+0x96/0xa0
       [<ffffffff81485934>] kernel_thread_helper+0x4/0x10
       [<ffffffff814839f3>] ? int_ret_from_sys_call+0x7/0x1b
       [<ffffffff8147c17c>] ? retint_restore_args+0x5/0x6
       [<ffffffff81485930>] ? gs_change+0x13/0x13
      
      With this patch, when there is still pending I/O, the actual disconnect
      is done by the last reference holder (last pending I/O request). In this
      case, xenwatch doesn't block indefinitely.
      Signed-off-by: NValentin Priescu <priescuv@amazon.com>
      Reviewed-by: NSteven Kady <stevkady@amazon.com>
      Reviewed-by: NSteven Noonan <snoonan@amazon.com>
      Reviewed-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      814d04e7
    • O
      xen/blkback: disable discard feature if requested by toolstack · c926b701
      Olaf Hering 提交于
      Newer toolstacks may provide a boolean property "discard-enable" in the
      backend node. Its purpose is to disable discard for file backed storage
      to avoid fragmentation. Recognize this setting also for physical
      storage.  If that property exists and is false, do not advertise
      "feature-discard" to the frontend.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      c926b701
  2. 12 2月, 2014 1 次提交
  3. 08 2月, 2014 2 次提交
  4. 12 9月, 2013 1 次提交
  5. 04 7月, 2013 1 次提交
  6. 18 6月, 2013 1 次提交
    • K
      xen/blkback: Check for insane amounts of request on the ring (v6). · 8e3f8755
      Konrad Rzeszutek Wilk 提交于
      Check that the ring does not have an insane amount of requests
      (more than there could fit on the ring).
      
      If we detect this case we will stop processing the requests
      and wait until the XenBus disconnects the ring.
      
      The existing check RING_REQUEST_CONS_OVERFLOW which checks for how
      many responses we have created in the past (rsp_prod_pvt) vs
      requests consumed (req_cons) and whether said difference is greater or
      equal to the size of the ring, does not catch this case.
      
      Wha the condition does check if there is a need to process more
      as we still have a backlog of responses to finish. Note that both
      of those values (rsp_prod_pvt and req_cons) are not exposed on the
      shared ring.
      
      To understand this problem a mini crash course in ring protocol
      response/request updates is in place.
      
      There are four entries: req_prod and rsp_prod; req_event and rsp_event
      to track the ring entries. We are only concerned about the first two -
      which set the tone of this bug.
      
      The req_prod is a value incremented by frontend for each request put
      on the ring. Conversely the rsp_prod is a value incremented by the backend
      for each response put on the ring (rsp_prod gets set by rsp_prod_pvt when
      pushing the responses on the ring).  Both values can
      wrap and are modulo the size of the ring (in block case that is 32).
      Please see RING_GET_REQUEST and RING_GET_RESPONSE for the more details.
      
      The culprit here is that if the difference between the
      req_prod and req_cons is greater than the ring size we have a problem.
      Fortunately for us, the '__do_block_io_op' loop:
      
      	rc = blk_rings->common.req_cons;
      	rp = blk_rings->common.sring->req_prod;
      
      	while (rc != rp) {
      
      		..
      		blk_rings->common.req_cons = ++rc; /* before make_response() */
      
      	}
      
      will loop up to the point when rc == rp. The macros inside of the
      loop (RING_GET_REQUEST) is smart and is indexing based on the modulo
      of the ring size. If the frontend has provided a bogus req_prod value
      we will loop until the 'rc == rp' - which means we could be processing
      already processed requests (or responses) often.
      
      The reason the RING_REQUEST_CONS_OVERFLOW is not helping here is
      b/c it only tracks how many responses we have internally produced
      and whether we would should process more. The astute reader will
      notice that the macro RING_REQUEST_CONS_OVERFLOW provides two
      arguments - more on this later.
      
      For example, if we were to enter this function with these values:
      
             	blk_rings->common.sring->req_prod =  X+31415 (X is the value from
      		the last time __do_block_io_op was called).
              blk_rings->common.req_cons = X
              blk_rings->common.rsp_prod_pvt = X
      
      The RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, blk_rings->common.req_cons)
      is doing:
      
      	req_cons - rsp_prod_pvt >= 32
      
      Which is,
      	X - X >= 32 or 0 >= 32
      
      And that is false, so we continue on looping (this bug).
      
      If we re-use said macro RING_REQUEST_CONS_OVERFLOW and pass in the rp
      instead (sring->req_prod) of rc, the this macro can do the check:
      
           req_prod - rsp_prov_pvt >= 32
      
      Which is,
             X + 31415 - X >= 32 , or 31415 >= 32
      
      which is true, so we can error out and break out of the function.
      
      Unfortunatly the difference between rsp_prov_pvt and req_prod can be
      at 32 (which would error out in the macro). This condition exists when
      the backend is lagging behind with the responses and still has not finished
      responding to all of them (so make_response has not been called), and
      the rsp_prov_pvt + 32 == req_cons. This ends up with us not being able
      to use said macro.
      
      Hence introducing a new macro called RING_REQUEST_PROD_OVERFLOW which does
      a simple check of:
      
          req_prod - rsp_prod_pvt > RING_SIZE
      
      And with the X values from above:
      
         X + 31415 - X > 32
      
      Returns true. Also not that if the ring is full (which is where
      the RING_REQUEST_CONS_OVERFLOW triggered), we would not hit the
      same condition:
      
         X + 32 - X > 32
      
      Which is false.
      
      Lets use that macro.
      Note that in v5 of this patchset the macro was different - we used an
      earlier version.
      
      Cc: stable@vger.kernel.org
      [v1: Move the check outside the loop]
      [v2: Add a pr_warn as suggested by David]
      [v3: Use RING_REQUEST_CONS_OVERFLOW as suggested by Jan]
      [v4: Move wake_up after kthread_stop as suggested by Jan]
      [v5: Use RING_REQUEST_PROD_OVERFLOW instead]
      [v6: Use RING_REQUEST_PROD_OVERFLOW - Jan's version]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: NJan Beulich <jbeulich@suse.com>
      
      gadsa
      8e3f8755
  7. 08 6月, 2013 1 次提交
    • S
      xen/blkback: Use physical sector size for setup · 7c4d7d71
      Stefan Bader 提交于
      Currently xen-blkback passes the logical sector size over xenbus and
      xen-blkfront sets up the paravirt disk with that logical block size.
      But newer drives usually have the logical sector size set to 512 for
      compatibility reasons and would show the actual sector size only in
      physical sector size.
      This results in the device being partitioned and accessed in dom0 with
      the correct sector size, but the guest thinks 512 bytes is the correct
      block size. And that results in poor performance.
      
      To fix this, blkback gets modified to pass also physical-sector-size
      over xenbus and blkfront to use both values to set up the paravirt
      disk. I did not just change the passed in sector-size because I am
      not sure having a bigger logical sector size than the physical one
      is valid (and that would happen if a newer dom0 kernel hits an older
      domU kernel). Also this way a domU set up before should still be
      accessible (just some tools might detect the unaligned setup).
      
      [v2: Make xenbus write failure non-fatal]
      [v3: Use xenbus_scanf instead of xenbus_gather]
      [v4: Rebased against segment changes]
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      7c4d7d71
  8. 07 5月, 2013 1 次提交
  9. 19 4月, 2013 1 次提交
    • R
      xen-block: implement indirect descriptors · 402b27f9
      Roger Pau Monne 提交于
      Indirect descriptors introduce a new block operation
      (BLKIF_OP_INDIRECT) that passes grant references instead of segments
      in the request. This grant references are filled with arrays of
      blkif_request_segment_aligned, this way we can send more segments in a
      request.
      
      The proposed implementation sets the maximum number of indirect grefs
      (frames filled with blkif_request_segment_aligned) to 256 in the
      backend and 32 in the frontend. The value in the frontend has been
      chosen experimentally, and the backend value has been set to a sane
      value that allows expanding the maximum number of indirect descriptors
      in the frontend if needed.
      
      The migration code has changed from the previous implementation, in
      which we simply remapped the segments on the shared ring. Now the
      maximum number of segments allowed in a request can change depending
      on the backend, so we have to requeue all the requests in the ring and
      in the queue and split the bios in them if they are bigger than the
      new maximum number of segments.
      
      [v2: Fixed minor comments by Konrad.
      [v1: Added padding to make the indirect request 64bit aligned.
       Added some BUGs, comments; fixed number of indirect pages in
       blkif_get_x86_{32/64}_req. Added description about the indirect operation
       in blkif.h]
      Signed-off-by: NRoger Pau Monné <roger.pau@citrix.com>
      [v3: Fixed spaces and tabs mix ups]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      402b27f9
  10. 18 4月, 2013 3 次提交
    • R
      xen-blkback: make the queue of free requests per backend · bf0720c4
      Roger Pau Monne 提交于
      Remove the last dependency from blkbk by moving the list of free
      requests to blkif. This change reduces the contention on the list of
      available requests.
      Signed-off-by: NRoger Pau Monné <roger.pau@citrix.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: xen-devel@lists.xen.org
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      bf0720c4
    • R
      xen-blkback: implement LRU mechanism for persistent grants · 3f3aad5e
      Roger Pau Monne 提交于
      This mechanism allows blkback to change the number of grants
      persistently mapped at run time.
      
      The algorithm uses a simple LRU mechanism that removes (if needed) the
      persistent grants that have not been used since the last LRU run, or
      if all grants have been used it removes the first grants in the list
      (that are not in use).
      
      The algorithm allows the user to change the maximum number of
      persistent grants, by changing max_persistent_grants in sysfs.
      
      Since we are storing the persistent grants used inside the request
      struct (to be able to mark them as "unused" when unmapping), we no
      longer need the bitmap (unmap_seg).
      Signed-off-by: NRoger Pau Monné <roger.pau@citrix.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: xen-devel@lists.xen.org
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      3f3aad5e
    • R
      xen-blkback: use balloon pages for all mappings · c6cc142d
      Roger Pau Monne 提交于
      Using balloon pages for all granted pages allows us to simplify the
      logic in blkback, especially in the xen_blkbk_map function, since now
      we can decide if we want to map a grant persistently or not after we
      have actually mapped it. This could not be done before because
      persistent grants used ballooned pages, whereas non-persistent grants
      used pages from the kernel.
      
      This patch also introduces several changes, the first one is that the
      list of free pages is no longer global, now each blkback instance has
      it's own list of free pages that can be used to map grants. Also, a
      run time parameter (max_buffer_pages) has been added in order to tune
      the maximum number of free pages each blkback instance will keep in
      it's buffer.
      Signed-off-by: NRoger Pau Monné <roger.pau@citrix.com>
      Cc: xen-devel@lists.xen.org
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      c6cc142d
  11. 12 3月, 2013 1 次提交
  12. 20 2月, 2013 1 次提交
  13. 04 11月, 2012 1 次提交
    • R
      xen/blkback: persistent-grants fixes · cb5bd4d1
      Roger Pau Monne 提交于
      This patch contains fixes for persistent grants implementation v2:
      
       * handle == 0 is a valid handle, so initialize grants in blkback
         setting the handle to BLKBACK_INVALID_HANDLE instead of 0. Reported
         by Konrad Rzeszutek Wilk.
      
       * new_map is a boolean, use "true" or "false" instead of 1 and 0.
         Reported by Konrad Rzeszutek Wilk.
      
       * blkfront announces the persistent-grants feature as
         feature-persistent-grants, use feature-persistent instead which is
         consistent with blkback and the public Xen headers.
      
       * Add a consistency check in blkfront to make sure we don't try to
         access segments that have not been set.
      Reported-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NRoger Pau Monne <roger.pau@citrix.com>
      [v1: The new_map int->bool had already been changed]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      cb5bd4d1
  14. 30 10月, 2012 3 次提交
    • R
      xen/blkback: Persistent grant maps for xen blk drivers · 0a8704a5
      Roger Pau Monne 提交于
      This patch implements persistent grants for the xen-blk{front,back}
      mechanism. The effect of this change is to reduce the number of unmap
      operations performed, since they cause a (costly) TLB shootdown. This
      allows the I/O performance to scale better when a large number of VMs
      are performing I/O.
      
      Previously, the blkfront driver was supplied a bvec[] from the request
      queue. This was granted to dom0; dom0 performed the I/O and wrote
      directly into the grant-mapped memory and unmapped it; blkfront then
      removed foreign access for that grant. The cost of unmapping scales
      badly with the number of CPUs in Dom0. An experiment showed that when
      Dom0 has 24 VCPUs, and guests are performing parallel I/O to a
      ramdisk, the IPIs from performing unmap's is a bottleneck at 5 guests
      (at which point 650,000 IOPS are being performed in total). If more
      than 5 guests are used, the performance declines. By 10 guests, only
      400,000 IOPS are being performed.
      
      This patch improves performance by only unmapping when the connection
      between blkfront and back is broken.
      
      On startup blkfront notifies blkback that it is using persistent
      grants, and blkback will do the same. If blkback is not capable of
      persistent mapping, blkfront will still use the same grants, since it
      is compatible with the previous protocol, and simplifies the code
      complexity in blkfront.
      
      To perform a read, in persistent mode, blkfront uses a separate pool
      of pages that it maps to dom0. When a request comes in, blkfront
      transmutes the request so that blkback will write into one of these
      free pages. Blkback keeps note of which grefs it has already
      mapped. When a new ring request comes to blkback, it looks to see if
      it has already mapped that page. If so, it will not map it again. If
      the page hasn't been previously mapped, it is mapped now, and a record
      is kept of this mapping. Blkback proceeds as usual. When blkfront is
      notified that blkback has completed a request, it memcpy's from the
      shared memory, into the bvec supplied. A record that the {gref, page}
      tuple is mapped, and not inflight is kept.
      
      Writes are similar, except that the memcpy is peformed from the
      supplied bvecs, into the shared pages, before the request is put onto
      the ring.
      
      Blkback stores a mapping of grefs=>{page mapped to by gref} in
      a red-black tree. As the grefs are not known apriori, and provide no
      guarantees on their ordering, we have to perform a search
      through this tree to find the page, for every gref we receive. This
      operation takes O(log n) time in the worst case. In blkfront grants
      are stored using a single linked list.
      
      The maximum number of grants that blkback will persistenly map is
      currently set to RING_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST, to
      prevent a malicios guest from attempting a DoS, by supplying fresh
      grefs, causing the Dom0 kernel to map excessively. If a guest
      is using persistent grants and exceeds the maximum number of grants to
      map persistenly the newly passed grefs will be mapped and unmaped.
      Using this approach, we can have requests that mix persistent and
      non-persistent grants, and we need to handle them correctly.
      This allows us to set the maximum number of persistent grants to a
      lower value than RING_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST, although
      setting it will lead to unpredictable performance.
      
      In writing this patch, the question arrises as to if the additional
      cost of performing memcpys in the guest (to/from the pool of granted
      pages) outweigh the gains of not performing TLB shootdowns. The answer
      to that question is `no'. There appears to be very little, if any
      additional cost to the guest of using persistent grants. There is
      perhaps a small saving, from the reduced number of hypercalls
      performed in granting, and ending foreign access.
      Signed-off-by: NOliver Chick <oliver.chick@citrix.com>
      Signed-off-by: NRoger Pau Monne <roger.pau@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      [v1: Fixed up the misuse of bool as int]
      0a8704a5
    • W
      xen/blkback: use kmem_cache_zalloc instead of kmem_cache_alloc/memset · 654dbef2
      Wei Yongjun 提交于
      Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset().
      
      spatch with a semantic match is used to found this problem.
      (http://coccinelle.lip6.fr/)
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      654dbef2
    • K
      xen/blkback: Fix compile warning · 2911758f
      Konrad Rzeszutek Wilk 提交于
      drivers/block/xen-blkback/xenbus.c:260:5: warning: symbol 'xenvbd_sysfs_addif' was not declared. Should it be static?
      drivers/block/xen-blkback/xenbus.c:284:6: warning: symbol 'xenvbd_sysfs_delif' was not declared. Should it be static?
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      2911758f
  15. 19 4月, 2012 1 次提交
  16. 24 3月, 2012 2 次提交
  17. 05 1月, 2012 1 次提交
    • J
      Xen: consolidate and simplify struct xenbus_driver instantiation · 73db144b
      Jan Beulich 提交于
      The 'name', 'owner', and 'mod_name' members are redundant with the
      identically named fields in the 'driver' sub-structure. Rather than
      switching each instance to specify these fields explicitly, introduce
      a macro to simplify this.
      
      Eliminate further redundancy by allowing the drvname argument to
      DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from
      the ID table will be used for .driver.name).
      
      Also eliminate the questionable xenbus_register_{back,front}end()
      wrappers - their sole remaining purpose was the checking of the
      'owner' field, proper setting of which shouldn't be an issue anymore
      when the macro gets used.
      
      v2: Restore DRV_NAME for the driver name in xen-pciback.
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      73db144b
  18. 02 12月, 2011 1 次提交
  19. 19 11月, 2011 1 次提交
    • K
      xen/blk[front|back]: Enhance discard support with secure erasing support. · 5ea42986
      Konrad Rzeszutek Wilk 提交于
      Part of the blkdev_issue_discard(xx) operation is that it can also
      issue a secure discard operation that will permanantly remove the
      sectors in question. We advertise that we can support that via the
      'discard-secure' attribute and on the request, if the 'secure' bit
      is set, we will attempt to pass in REQ_DISCARD | REQ_SECURE.
      
      CC: Li Dongyang <lidongyang@novell.com>
      [v1: Used 'flag' instead of 'secure:1' bit]
      [v2: Use 'reserved' uint8_t instead of adding a new value]
      [v3: Check for nseg when mapping instead of operation]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      5ea42986
  20. 26 10月, 2011 1 次提交
  21. 13 10月, 2011 3 次提交
  22. 22 8月, 2011 2 次提交
    • J
      xen-blkback: fixed indentation and comments · 1bc05b0a
      Joe Jin 提交于
      This patch fixes belows:
      
      1. Fix code style issue.
      2. Fix incorrect functions name in comments.
      Signed-off-by: NJoe Jin <joe.jin@oracle.com>
      Cc: Jens Axboe <jaxboe@fusionio.com>
      Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      1bc05b0a
    • J
      xen-blkback: Don't disconnect backend until state switched to XenbusStateClosed. · 6f5986bc
      Joe Jin 提交于
      When do block-attach/block-detach test with below steps, umount hangs
      in the guest. Furthermore shutdown ends up being stuck when umounting file-systems.
      
      1. start guest.
      2. attach new block device by xm block-attach in Dom0.
      3. mount new disk in guest.
      4. execute xm block-detach to detach the block device in dom0 until timeout
      5. Any request to the disk will hung.
      
      Root cause:
      This issue is caused when setting backend device's state to
      'XenbusStateClosing', which sends to the frontend the XenbusStateClosing
      notification. When frontend receives the notification it tries to release
      the disk in blkfront_closing(), but at that moment the disk is still in use
      by guest, so frontend refuses to close. Specifically it sets the disk state to
      XenbusStateClosing and sends the notification to backend - when backend receives the
      event, it disconnects the vbd from real device, and sets the vbd device state to
      XenbusStateClosing. The backend disconnects the real device/file, and any IO
      requests to the disk in guest will end up in ether, leaving disk DEAD and set to
      XenbusStateClosing. When the guest wants to disconnect the disk, umount will
      hang on blkif_release()->xlvbd_release_gendisk() as it is unable to send any IO
      to the disk, which prevents clean system shutdown.
      
      Solution:
      Don't disconnect backend until frontend state switched to XenbusStateClosed.
      Signed-off-by: NJoe Jin <joe.jin@oracle.com>
      Cc: Daniel Stodden <daniel.stodden@citrix.com>
      Cc: Jens Axboe <jaxboe@fusionio.com>
      Cc: Annie Li <annie.li@oracle.com>
      Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>
      [v1: Modified description a bit]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      6f5986bc
  23. 01 7月, 2011 1 次提交
  24. 01 6月, 2011 1 次提交
  25. 13 5月, 2011 6 次提交