ia64/xen-unstable

changeset 6319:dc8380497e98

Remove dead code from blkback.

Signed-off-by: Andrew Warfield <andrew.warfield@cl.cam.ac.uk>
author akw27@arcadians.cl.cam.ac.uk
date Sun Aug 21 12:24:21 2005 +0000 (2005-08-21)
parents 6721abf6b16d
children 342ccfca85d7
files linux-2.6-xen-sparse/drivers/xen/blkback/common.h linux-2.6-xen-sparse/drivers/xen/blkback/interface.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h	Sun Aug 21 11:41:45 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h	Sun Aug 21 12:24:21 2005 +0000
     1.3 @@ -53,7 +53,7 @@ typedef struct blkif_st {
     1.4      rb_root_t         vbd_rb;        /* Mapping from 16-bit vdevices to VBDs.*/
     1.5      spinlock_t        vbd_lock;      /* Protects VBD mapping. */
     1.6      /* Private fields. */
     1.7 -    enum { DISCONNECTED, DISCONNECTING, CONNECTED } status;
     1.8 +    enum { DISCONNECTED, CONNECTED } status;
     1.9      /*
    1.10       * DISCONNECT response is deferred until pending requests are ack'ed.
    1.11       * We therefore need to store the id from the original request.
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/interface.c	Sun Aug 21 11:41:45 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/interface.c	Sun Aug 21 12:24:21 2005 +0000
     2.3 @@ -7,7 +7,6 @@
     2.4   */
     2.5  
     2.6  #include "common.h"
     2.7 -#include <asm-xen/ctrl_if.h>
     2.8  #include <asm-xen/evtchn.h>
     2.9  
    2.10  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    2.11 @@ -138,52 +137,6 @@ int blkif_map(blkif_t *blkif, unsigned l
    2.12      return 0;
    2.13  }
    2.14  
    2.15 -static void __blkif_disconnect_complete(void *arg)
    2.16 -{
    2.17 -    blkif_t              *blkif = (blkif_t *)arg;
    2.18 -    ctrl_msg_t            cmsg;
    2.19 -    blkif_be_disconnect_t disc;
    2.20 -
    2.21 -    /*
    2.22 -     * These can't be done in blkif_disconnect() because at that point there
    2.23 -     * may be outstanding requests at the disc whose asynchronous responses
    2.24 -     * must still be notified to the remote driver.
    2.25 -     */
    2.26 -    unmap_frontend_page(blkif);
    2.27 -    vfree(blkif->blk_ring.sring);
    2.28 -
    2.29 -    /* Construct the deferred response message. */
    2.30 -    cmsg.type         = CMSG_BLKIF_BE;
    2.31 -    cmsg.subtype      = CMSG_BLKIF_BE_DISCONNECT;
    2.32 -    cmsg.id           = blkif->disconnect_rspid;
    2.33 -    cmsg.length       = sizeof(blkif_be_disconnect_t);
    2.34 -    disc.domid        = blkif->domid;
    2.35 -    disc.blkif_handle = blkif->handle;
    2.36 -    disc.status       = BLKIF_BE_STATUS_OKAY;
    2.37 -    memcpy(cmsg.msg, &disc, sizeof(disc));
    2.38 -
    2.39 -    /*
    2.40 -     * Make sure message is constructed /before/ status change, because
    2.41 -     * after the status change the 'blkif' structure could be deallocated at
    2.42 -     * any time. Also make sure we send the response /after/ status change,
    2.43 -     * as otherwise a subsequent CONNECT request could spuriously fail if
    2.44 -     * another CPU doesn't see the status change yet.
    2.45 -     */
    2.46 -    mb();
    2.47 -    BUG_ON(blkif->status != DISCONNECTING);
    2.48 -    blkif->status = DISCONNECTED;
    2.49 -    mb();
    2.50 -
    2.51 -    /* Send the successful response. */
    2.52 -    ctrl_if_send_response(&cmsg);
    2.53 -}
    2.54 -
    2.55 -void blkif_disconnect_complete(blkif_t *blkif)
    2.56 -{
    2.57 -    INIT_WORK(&blkif->work, __blkif_disconnect_complete, (void *)blkif);
    2.58 -    schedule_work(&blkif->work);
    2.59 -}
    2.60 -
    2.61  void free_blkif(blkif_t *blkif)
    2.62  {
    2.63      blkif_t     **pblkif;