[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/8] tools/oxenstored: Fix incorrect scope after an if statement


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 22 Nov 2022 15:20:36 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Edwin Torok <edvin.torok@xxxxxxxxxx>, Rob Hoes <Rob.Hoes@xxxxxxxxxx>
  • Delivery-date: Tue, 22 Nov 2022 15:21:13 +0000
  • Ironport-data: A9a23:4ifm4KNFDFveuKrvrR33l8FynXyQoLVcMsEvi/4bfWQNrUpxhWMBn DBJXDrSPveCMDf8KYt+atm+/ExSv8eHmN5mHAto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9SuvzrRC9H5qyo4mpB5AZmOZingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0rsmPnNP8 /EfFD4ESRW5lrrn5ryHVPY506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w/N3wsYDUWUrsTILs4kP2lmT/UdDpApUjOjaE2/3LS3Ep6172F3N/9KoDbH50JwB7wS mTu3VvZWxAlF96k4yeV2Wuyp/bszR7+YddHfFG/3qEz2wDCroAJMzUaXEW2ieO0gUm/X5RYM UN80jojq+0++VKmSvH5XgakuziUsxgEQd1SHuYmrgaXxcLpDx2xXzZeCGQbMZp/6ZFwFWdCO kK1c83BWG1QoryTRHWh+L6zqAmjYXkzI1McenpRJeca2OUPsL3fnzqWEIgySP7u14ykcd3j6 2vU9XZj3t3/meZOjvzmpg6f3lpAs7CTFmYIChPrsnVJB++TTKqsfMSW5FfS9p6sx67JHwDa7 BDodyVzhd3i7K1hdwTXGo3h5Jnzu5643MT02DaC3/AJrlxBAUKLc4FK+y1ZL0x0KMsCcjKBS BaN51IJucINYyH0M/Afj2eN5yMClPiIKDgYfqqMMoomjmZZKWdrAx2ClWbPhjuwwSDAYIk0O IuBcNbEMJrpIf0P8dd3Ls9DuYIWKtcWnz6PFcuilk7/uVdcDVbMIYo43JK1RrhRxMu5TM/9q L6z6+PiJ81jbdDD
  • Ironport-hdrordr: A9a23:YXERXaPQhTruqcBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3gqy nOpoV86faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrZ uIGJIeNDSfNzdHZL7BkWuFL+o=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

A debug statement got inserted into a single-expression if statement.

Insert brackets to give the intended meaning, rather than the actual meaning
where the "let con = Connections..." is outside and executed unconditionally.

This results in some unnecessary ring checks for domains which otherwise have
IO credit.

Fixes: 42f0581a91d4 ("tools/oxenstored: Implement live update for socket 
connections")
Reported-by: Edwin Török <edvin.torok@xxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Christian Lindig <christian.lindig@xxxxxxxxxx>
CC: David Scott <dave@xxxxxxxxxx>
CC: Edwin Torok <edvin.torok@xxxxxxxxxx>
CC: Rob Hoes <Rob.Hoes@xxxxxxxxxx>
---
 tools/ocaml/xenstored/xenstored.ml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/ocaml/xenstored/xenstored.ml 
b/tools/ocaml/xenstored/xenstored.ml
index ffd43a4eee64..c5dc7a28d082 100644
--- a/tools/ocaml/xenstored/xenstored.ml
+++ b/tools/ocaml/xenstored/xenstored.ml
@@ -475,7 +475,7 @@ let _ =
 
        let ring_scan_checker dom =
                (* no need to scan domains already marked as for processing *)
-               if not (Domain.get_io_credit dom > 0) then
+               if not (Domain.get_io_credit dom > 0) then (
                        debug "Looking up domid %d" (Domain.get_id dom);
                        let con = Connections.find_domain cons (Domain.get_id 
dom) in
                        if not (Connection.has_more_work con) then (
@@ -490,7 +490,8 @@ let _ =
                                        let n = 32 + 2 * (Domains.number 
domains) in
                                        info "found lazy domain %d, credit %d" 
(Domain.get_id dom) n;
                                        Domain.set_io_credit ~n dom
-                       ) in
+                       )
+               ) in
 
        let last_stat_time = ref 0. in
        let last_scan_time = ref 0. in
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.