Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8F38C433FE for ; Wed, 9 Dec 2020 15:01:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D9F523A5A for ; Wed, 9 Dec 2020 15:01:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D9F523A5A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.48384.85546 (Exim 4.92) (envelope-from ) id 1kn0yD-0003k4-RJ; Wed, 09 Dec 2020 15:01:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 48384.85546; Wed, 09 Dec 2020 15:01:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kn0yD-0003jx-OH; Wed, 09 Dec 2020 15:01:33 +0000 Received: by outflank-mailman (input) for mailman id 48384; Wed, 09 Dec 2020 15:01:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kn0yC-0003jr-FK for xen-devel@lists.xenproject.org; Wed, 09 Dec 2020 15:01:32 +0000 Received: from wout3-smtp.messagingengine.com (unknown [64.147.123.19]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2a802157-34fe-463e-9be6-18d48d0d6f00; Wed, 09 Dec 2020 15:01:30 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D83E5AFB; Wed, 9 Dec 2020 10:01:28 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 09 Dec 2020 10:01:29 -0500 Received: from mail-itl (ip5b40aa59.dynamic.kabel-deutschland.de [91.64.170.89]) by mail.messagingengine.com (Postfix) with ESMTPA id 11C831080063; Wed, 9 Dec 2020 10:01:25 -0500 (EST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2a802157-34fe-463e-9be6-18d48d0d6f00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Jc/F6i K7o3PUb9Iz+/A5vMzJfnPabacuo83uCpBn6y0=; b=EWQksCubZPK5tzGqR9z1aB 19JQFgBR7bbwgcoSiNDOk4+LXxOLkZq0zL9awtR8Zcxe/WgdxQeLtJ/DI437/tmW yFudNwDoOGZeWXM6qPLGvFyGaRdW/kXls1VCDUzJHTsYGVZEvKB/zUXvTyVX3kMW Qa0F5r3MYUdqsjE4XVoLCncx4ODHF6SpTrlMio9AEieVvF0vQYRkPcTEG3npa0Pk 0FneNkf4CF1QPQ/y3vGKVcV3a4iaCSLoultj9dKLvtdBb9rpmvxN/scqFJFZEEgo 1j1t4SKCzmL3VqRNEY38bjiB7mMS4qvsQkfrnCF0w+ToGcAARTJMzq1ro4a4rIMg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudejkedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeetveff iefghfekhffggeeffffhgeevieektedthfehveeiheeiiedtudegfeetffenucfkpheple durdeigedrudejtddrkeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsg drtghomh X-ME-Proxy: Date: Wed, 9 Dec 2020 16:01:21 +0100 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Wei Liu , Anthony PERARD Subject: Re: [PATCH] libxl: cleanup remaining backend xs dirs after driver domain Message-ID: <20201209150121.GM1244@mail-itl> References: <20201108145942.3089012-1-marmarek@invisiblethingslab.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+nG9yj4eE4W6Oba0" Content-Disposition: inline In-Reply-To: <20201108145942.3089012-1-marmarek@invisiblethingslab.com> --+nG9yj4eE4W6Oba0 Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] libxl: cleanup remaining backend xs dirs after driver domain On Sun, Nov 08, 2020 at 03:59:42PM +0100, Marek Marczykowski-G=C3=B3recki w= rote: > When device is removed, backend domain (which may be a driver domain) is > responsible for removing backend entries from xenstore. But in case of > driver domain, it has no access to remove all of them - specifically the > directory named after frontend-id remains. This may accumulate enough to > exceed xenstore quote of the driver domain, breaking further devices. >=20 > Fix this by calling libxl__xs_path_cleanup() on the backend path from > libxl__device_destroy() in the toolstack domain too. Note > libxl__device_destroy() is called when the driver domain already removed > what it can (see device_destroy_be_watch_cb()->device_hotplug_done()). >=20 > Signed-off-by: Marek Marczykowski-G=C3=B3recki Ping? > --- > tools/libs/light/libxl_device.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/tools/libs/light/libxl_device.c b/tools/libs/light/libxl_dev= ice.c > index e081faf9a94e..f131a6c822c6 100644 > --- a/tools/libs/light/libxl_device.c > +++ b/tools/libs/light/libxl_device.c > @@ -763,6 +763,12 @@ int libxl__device_destroy(libxl__gc *gc, libxl__devi= ce *dev) > * from the backend path. > */ > libxl__xs_path_cleanup(gc, t, be_path); > + } else if (domid =3D=3D LIBXL_TOOLSTACK_DOMID && !libxl_only) { > + /* > + * Then, toolstack domain is in charge of removing the parent > + * directory if empty already. > + */ > + libxl__xs_path_cleanup(gc, t, be_path); > } > =20 > rc =3D libxl__xs_transaction_commit(gc, &t); --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --+nG9yj4eE4W6Oba0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAl/Q5sEACgkQ24/THMrX 1yxqPAgAgDxlOEfg0KtsT1B3Kyx/oFwD3mJAGzzu8Bz3HJrOXVGW4HnVtnY1ivMk bA1m3Eb6omGTEVym61QntXx36ZJgcI9fk/xOxfbvzP5UkANI3f7gHxWGhoJ0ADEo i3OZn7/Qhu540kmFn6sW2U4lqNHozota8iRfsDy2LJKtsUyfL2YpsCdkEN9EBOxf yy8vo5AVcWQuFKofqheJLzTrugttOlH8dQaXXOeBjN0j5uaY4AxJnfPzE9+2rK9C Ssyy2XdRYQbmIdykcSFtPdv0GN05Fk8RamvJhkFOiJK2VFTlN7OKtRkcKJiTM6u7 grzMP/aE1c9rY5U5fXgu8T2c+nTAcw== =dy9n -----END PGP SIGNATURE----- --+nG9yj4eE4W6Oba0--