ia64/xen-unstable

changeset 12759:4b577c1909a9

Merge
author Alastair Tse <atse@xensource.com>
date Fri Dec 01 17:31:50 2006 +0000 (2006-12-01)
parents 5d0efb6f3983 107f74d363ea
children b37e66b08bf5 98413fa7826c
files
line diff
     1.1 --- a/tools/blktap/drivers/block-aio.c	Fri Dec 01 17:31:30 2006 +0000
     1.2 +++ b/tools/blktap/drivers/block-aio.c	Fri Dec 01 17:31:50 2006 +0000
     1.3 @@ -311,12 +311,8 @@ int tdaio_do_callbacks(struct td_state *
     1.4  		struct pending_aio *pio;
     1.5  		
     1.6  		pio = &prv->pending_aio[(long)io->data];
     1.7 -		
     1.8 -		if (ep->res != io->u.c.nbytes) {
     1.9 -			/* TODO: handle this case better. */
    1.10 -			DPRINTF("AIO did less than I asked it to. \n");
    1.11 -		}
    1.12 -		rsp += pio->cb(s, ep->res2, pio->id, pio->private);
    1.13 +		rsp += pio->cb(s, ep->res == io->u.c.nbytes ? 0 : 1,
    1.14 +			       pio->id, pio->private);
    1.15  
    1.16  		prv->iocb_free[prv->iocb_free_count++] = io;
    1.17  	}
     2.1 --- a/tools/blktap/drivers/block-qcow.c	Fri Dec 01 17:31:30 2006 +0000
     2.2 +++ b/tools/blktap/drivers/block-qcow.c	Fri Dec 01 17:31:50 2006 +0000
     2.3 @@ -1145,13 +1145,6 @@ int tdqcow_do_callbacks(struct td_state 
     2.4  
     2.5                  pio = &prv->pending_aio[(long)io->data];
     2.6  
     2.7 -                if (ep->res != io->u.c.nbytes) {
     2.8 -                        /* TODO: handle this case better. */
     2.9 -			ptr = (int *)&ep->res;
    2.10 -                        DPRINTF("AIO did less than I asked it to "
    2.11 -				"[%lu,%lu,%d]\n", 
    2.12 -				ep->res, io->u.c.nbytes, *ptr);
    2.13 -                }
    2.14  		aio_unlock(prv, pio->sector);
    2.15  		if (pio->id >= 0) {
    2.16  			if (prv->crypt_method)
    2.17 @@ -1162,7 +1155,7 @@ int tdqcow_do_callbacks(struct td_state 
    2.18  						&prv->aes_decrypt_key);
    2.19  			prv->nr_reqs[pio->qcow_idx]--;
    2.20  			if (prv->nr_reqs[pio->qcow_idx] == 0) 
    2.21 -				rsp += pio->cb(s, ep->res2, pio->id, 
    2.22 +			        rsp += pio->cb(s, ep->res == io->u.c.nbytes ? 0 : 1, pio->id, 
    2.23  					       pio->private);
    2.24  		} else if (pio->id == -2) free(pio->buf);
    2.25  
     3.1 --- a/tools/blktap/drivers/tapdisk.c	Fri Dec 01 17:31:30 2006 +0000
     3.2 +++ b/tools/blktap/drivers/tapdisk.c	Fri Dec 01 17:31:50 2006 +0000
     3.3 @@ -424,8 +424,7 @@ int send_responses(struct td_state *s, i
     3.4  	}
     3.5  	
     3.6  	if (res != 0) {
     3.7 -		DPRINTF("*** request error %d! \n", res);
     3.8 -		return 0;
     3.9 +	        blkif->pending_list[idx].status = BLKIF_RSP_ERROR;
    3.10  	}
    3.11  
    3.12  	blkif->pending_list[idx].count--;
     4.1 --- a/xen/common/domain.c	Fri Dec 01 17:31:30 2006 +0000
     4.2 +++ b/xen/common/domain.c	Fri Dec 01 17:31:50 2006 +0000
     4.3 @@ -283,8 +283,8 @@ void domain_shutdown(struct domain *d, u
     4.4      if ( d->domain_id == 0 )
     4.5          dom0_shutdown(reason);
     4.6  
     4.7 -    d->shutdown_code = reason;
     4.8 -    set_bit(_DOMF_shutdown, &d->domain_flags);
     4.9 +    if ( !test_and_set_bit(_DOMF_shutdown, &d->domain_flags) )
    4.10 +        d->shutdown_code = reason;
    4.11  
    4.12      for_each_vcpu ( d, v )
    4.13          vcpu_sleep_nosync(v);