Skip to contentSkip to conversation

qemu-nbd: remove unnecessary qemu_notify_event()

PATCH In review Paolo Bonzini 3 participants 4 messages Jul 27, 2015 – Jul 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-nbd: remove unnecessary qemu_notify_event()

This was needed when qemu-nbd was using qemu_set_fd_handler2. It is not needed anymore now that nbd_update_server_fd_handler is called whenever nbd_can_accept() can change from false to true. nbd_update_server_fd_handler will call qemu_set_fd_handler(), which will call qemu_notify_event().

---
 qemu-nbd.c | 1 -
 1 file changed, 1 deletion(-)
qemu-nbd.c +0 -1
index 5106b80..d9644b2 100644
@@ -362,7 +362,6 @@ static void nbd_client_closed(NBDClient *client)
         state = TERMINATE;
     }
     nbd_update_server_fd_handler(server_fd);
-    qemu_notify_event();
     nbd_client_put(client);
 }
 
Signature · 1 line
2.4.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Paolo Bonzini

This was needed when qemu-nbd was using qemu_set_fd_handler2. It is not needed anymore now that nbd_update_server_fd_handler is called whenever nbd_can_accept() can change from false to true. nbd_update_server_fd_handler will call qemu_set_fd_handler(), which will call qemu_notify_event().

---
  qemu-nbd.c | 1 -
  1 file changed, 1 deletion(-)
qemu-nbd.c +0 -0
index 5106b80..d9644b2 100644

qemu-nbd.c static void nbd_client_closed(NBDClient *client) · line 366

Quoted 6 lines
qemu-nbd.c +0 -1
@@ -362,7 +362,6 @@ static void nbd_client_closed(NBDClient *client)
          state = TERMINATE;
      }
      nbd_update_server_fd_handler(server_fd);
-    qemu_notify_event();
      nbd_client_put(client);
  }
Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 27 lines · Paolo Bonzini

This was needed when qemu-nbd was using qemu_set_fd_handler2. It is not needed anymore now that nbd_update_server_fd_handler is called whenever nbd_can_accept() can change from false to true. nbd_update_server_fd_handler will call qemu_set_fd_handler(), which will call qemu_notify_event().

---
 qemu-nbd.c | 1 -
 1 file changed, 1 deletion(-)
qemu-nbd.c +0 -1
index 5106b80..d9644b2 100644
@@ -362,7 +362,6 @@ static void nbd_client_closed(NBDClient *client)
         state = TERMINATE;
     }
     nbd_update_server_fd_handler(server_fd);
-    qemu_notify_event();
     nbd_client_put(client);
 }
 
Signature · 1 line
2.4.3

A question not related to this patch: unlike aio_set_fd_handler, qemu_set_fd_handler doesn't call qemu_notify_event for the "delete" branch. Is that intended?

#3 lore raw
Quoted 31 lines · Fam Zheng
Quoted 27 lines · Paolo Bonzini

This was needed when qemu-nbd was using qemu_set_fd_handler2. It is not needed anymore now that nbd_update_server_fd_handler is called whenever nbd_can_accept() can change from false to true. nbd_update_server_fd_handler will call qemu_set_fd_handler(), which will call qemu_notify_event().

---
 qemu-nbd.c | 1 -
 1 file changed, 1 deletion(-)
qemu-nbd.c +0 -1
index 5106b80..d9644b2 100644
@@ -362,7 +362,6 @@ static void nbd_client_closed(NBDClient *client)
         state = TERMINATE;
     }
     nbd_update_server_fd_handler(server_fd);
-    qemu_notify_event();
     nbd_client_put(client);
 }
 
Signature · 1 line
2.4.3
Quoted 3 lines

A question not related to this patch: unlike aio_set_fd_handler, qemu_set_fd_handler doesn't call qemu_notify_event for the "delete" branch. Is that intended?

Yes. In fact I think qemu_notify_event() is not needed at all in qemu_set_fd_handler() because there are no concurrent ppoll() calls during a qemu_set_fd_handler().

Paolo