Skip to contentSkip to conversation

xl: remove stale comment

PATCH In review Wei Liu 3 participants 6 messages Feb 2, 2017 – Feb 6, 2017

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 xl: remove stale comment

Obvious the DISK_EJECT event is for ejecting removable media.

---
Cc: Ian Jackson <[email protected]>

Ian, feel free to tell me that I'm wrong...

---
 tools/libxl/xl_cmdimpl.c | 1 -
 1 file changed, 1 deletion(-)
tools/libxl/xl_cmdimpl.c +0 -1
index 196b8a6851..9e63df9d27 100644
@@ -3205,7 +3205,6 @@ start:
             goto out;
 
         case LIBXL_EVENT_TYPE_DISK_EJECT:
-            /* XXX what is this for? */
             libxl_cdrom_insert(ctx, domid, &event->u.disk_eject.disk, NULL);
             break;
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

Wei Liu writes ("[PATCH] xl: remove stale comment"):

Quoted 1 line

Obvious the DISK_EJECT event is for ejecting removable media.

The question is...

Quoted 4 lines

case LIBXL_EVENT_TYPE_DISK_EJECT:
- /* XXX what is this for? */

             libxl_cdrom_insert(ctx, domid, &event->u.disk_eject.disk, NULL);
             break;

... why does xl respond to ejection of removeable media by calling libxl_cdrom_insert with an empty medium ?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#2 lore raw
Quoted 5 lines · Ian Jackson

Wei Liu writes ("[PATCH] xl: remove stale comment"):

Quoted 1 line

Obvious the DISK_EJECT event is for ejecting removable media.

The question is...

Quoted 7 lines
Quoted 4 lines

case LIBXL_EVENT_TYPE_DISK_EJECT:
- /* XXX what is this for? */

             libxl_cdrom_insert(ctx, domid, &event->u.disk_eject.disk, NULL);
             break;

... why does xl respond to ejection of removeable media by calling libxl_cdrom_insert with an empty medium ?

Oh, so maybe early days there is only one type of removable medium -- the cdrom -- but things have changed now?

Anyway, I don't know much about the history, just curious why this comment is here.

Wei.

Quoted 2 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw

Wei Liu writes ("Re: [PATCH] xl: remove stale comment"):

Quoted 7 lines · Ian Jackson
Quoted 6 lines

Wei Liu writes ("[PATCH] xl: remove stale comment"):

Quoted 4 lines

case LIBXL_EVENT_TYPE_DISK_EJECT:
- /* XXX what is this for? */

             libxl_cdrom_insert(ctx, domid, &event->u.disk_eject.disk, NULL);
             break;
Quoted 5 lines
Quoted 2 lines

... why does xl respond to ejection of removeable media by calling libxl_cdrom_insert with an empty medium ?

Oh, so maybe early days there is only one type of removable medium -- the cdrom -- but things have changed now?

No, that's not my point.

Quoted 2 lines

Anyway, I don't know much about the history, just curious why this comment is here.

The comment is there because I discovered when making libxl eventy that xl responded to disk eject events by re-ejecting the disk and didn't undrstand why. I still don't understand why.

Ie, why does xl have this code at all ? Why is its handling of LIBXL_EVENT_TYPE_DISK_EJECT not to simply ignore it ? Why does it even bother listening for this event ?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 19 lines · Ian Jackson

Wei Liu writes ("Re: [PATCH] xl: remove stale comment"):

Quoted 7 lines · Ian Jackson
Quoted 6 lines

Wei Liu writes ("[PATCH] xl: remove stale comment"):

Quoted 4 lines

case LIBXL_EVENT_TYPE_DISK_EJECT:
- /* XXX what is this for? */

             libxl_cdrom_insert(ctx, domid, &event->u.disk_eject.disk, NULL);
             break;
Quoted 5 lines
Quoted 2 lines

... why does xl respond to ejection of removeable media by calling libxl_cdrom_insert with an empty medium ?

Oh, so maybe early days there is only one type of removable medium -- the cdrom -- but things have changed now?

No, that's not my point.

Quoted 2 lines

Anyway, I don't know much about the history, just curious why this comment is here.

Quoted 7 lines

The comment is there because I discovered when making libxl eventy that xl responded to disk eject events by re-ejecting the disk and didn't undrstand why. I still don't understand why.

Ie, why does xl have this code at all ? Why is its handling of LIBXL_EVENT_TYPE_DISK_EJECT not to simply ignore it ? Why does it even bother listening for this event ?

Is it possible that this is a disk eject *request* event from the guest?

I can't seem to figure out where these events come from.

-George

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw

George Dunlap writes ("Re: [Xen-devel] [PATCH] xl: remove stale comment"):

Quoted 6 lines · Ian Jackson
Quoted 3 lines

Ie, why does xl have this code at all ? Why is its handling of LIBXL_EVENT_TYPE_DISK_EJECT not to simply ignore it ? Why does it even bother listening for this event ?

Is it possible that this is a disk eject *request* event from the guest?

Perhaps so! Much of this protocol is not really documented.

Quoted 1 line

I can't seem to figure out where these events come from.

libxl_evenable_disk_eject sets up a xenstore watch on /local/domain/GUEST/device/vbd/DEVID/eject.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel