This commit is contained in:
ack@kneesa.uk.xensource.com committed 2006-04-06 18:58:39 +01:00
commit 08d906dfa1
3 files changed
+24 -17

No files matched your search

@@ -287,7 +287,7 @@ static int end_block_io_op(struct bio *bio, unsigned int done, int error)
* NOTIFICATION FROM GUEST OS.
*/
void blkif_notify_work(blkif_t *blkif)
static void blkif_notify_work(blkif_t *blkif)
{
blkif->waiting_reqs = 1;
wake_up(&blkif->wq);
@@ -129,7 +129,6 @@ void blkif_interface_init(void);
void blkif_xenbus_init(void);
void blkif_notify_work(blkif_t *blkif);
irqreturn_t blkif_be_int(int irq, void *dev_id, struct pt_regs *regs);
int blkif_schedule(void *arg);
@@ -46,10 +46,29 @@ static void backend_changed(struct xenbus_watch *, const char **,
static void update_blkif_status(blkif_t *blkif)
{
if (blkif->irq && blkif->vbd.bdev &&
(blkif->be->dev->state != XenbusStateConnected)) {
connect(blkif->be);
blkif_notify_work(blkif);
int err;
/* Not ready to connect? */
if (!blkif->irq || !blkif->vbd.bdev)
return;
/* Already connected? */
if (blkif->be->dev->state == XenbusStateConnected)
return;
/* Attempt to connect: exit if we fail to. */
connect(blkif->be);
if (blkif->be->dev->state != XenbusStateConnected)
return;
blkif->xenblkd = kthread_run(blkif_schedule, blkif,
"xvd %d %02x:%02x",
blkif->domid,
blkif->be->major, blkif->be->minor);
if (IS_ERR(blkif->xenblkd)) {
err = PTR_ERR(blkif->xenblkd);
blkif->xenblkd = NULL;
xenbus_dev_error(blkif->be->dev, err, "start xenblkd");
}
}
@@ -215,17 +234,6 @@ static void backend_changed(struct xenbus_watch *watch,
return;
}
be->blkif->xenblkd = kthread_run(blkif_schedule, be->blkif,
"xvd %d %02x:%02x",
be->blkif->domid,
be->major, be->minor);
if (IS_ERR(be->blkif->xenblkd)) {
err = PTR_ERR(be->blkif->xenblkd);
be->blkif->xenblkd = NULL;
xenbus_dev_error(dev, err, "start xenblkd");
return;
}
device_create_file(&dev->dev, &dev_attr_physical_device);
device_create_file(&dev->dev, &dev_attr_mode);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.