• Bob Liu's avatar
    driver: xen-blkfront: move talk_to_blkback to a more suitable place · 8ab0144a
    Bob Liu authored
    The major responsibility of talk_to_blkback() is allocate and initialize
    the request ring and write the ring info to xenstore.
    But this work should be done after backend entered 'XenbusStateInitWait' as
    defined in the protocol file.
    See xen/include/public/io/blkif.h in XEN git tree:
    Front                                Back
    =================================    =====================================
    XenbusStateInitialising              XenbusStateInitialising
     o Query virtual device               o Query backend device identification
       properties.                          data.
     o Setup OS device instance.          o Open and validate backend device.
                                          o Publish backend features and
                                            transport parameters.
                                                         |
                                                         |
                                                         V
                                         XenbusStateInitWait
    
    o Query backend features and
      transport parameters.
    o Allocate and initialize the
      request ring.
    
    There is no problem with this yet, but it is an violation of the design and
    furthermore it would not allow frontend/backend to negotiate 'multi-page'
    and 'multi-queue' features.
    
    Changes in v2:
     - Re-write the commit message to be more clear.
    Signed-off-by: default avatarBob Liu <bob.liu@oracle.com>
    Acked-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    8ab0144a
xen-blkfront.c 55.5 KB