Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208277
b: refs/heads/master
c: 1fa73be
h: refs/heads/master
i:
  208275: 0669042
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Jens Axboe committed Aug 7, 2010
1 parent 7b557b1 commit 8ccb0fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d7ed20e822ef82117a4d9928b030fa0247b789d
refs/heads/master: 1fa73be6be65028a7543bba8f14474b42e064a1b
19 changes: 17 additions & 2 deletions trunk/drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,9 +930,24 @@ static void blkfront_connect(struct blkfront_info *info)
unsigned int binfo;
int err;

if ((info->connected == BLKIF_STATE_CONNECTED) ||
(info->connected == BLKIF_STATE_SUSPENDED) )
switch (info->connected) {
case BLKIF_STATE_CONNECTED:
/*
* Potentially, the back-end may be signalling
* a capacity change; update the capacity.
*/
err = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
"sectors", "%Lu", &sectors);
if (XENBUS_EXIST_ERR(err))
return;
printk(KERN_INFO "Setting capacity to %Lu\n",
sectors);
set_capacity(info->gd, sectors);

/* fall through */
case BLKIF_STATE_SUSPENDED:
return;
}

dev_dbg(&info->xbdev->dev, "%s:%s.\n",
__func__, info->xbdev->otherend);
Expand Down

0 comments on commit 8ccb0fa

Please sign in to comment.