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

Re: [PATCH v2 16/16] xen-blkback: Inform userspace that device has been opened


  • To: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 8 Jun 2023 12:08:55 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hWch4lippnOTCX/KUqLusehQC0U+PU7xym8rA7/K7JA=; b=fda2um28a2/muW29En8RgnxRfdRAKpSicr5tOmkGdNhQjk8zZsfSJsk/GZwDFakQvTFzTwsM94edWkUjG84RwZ4JO7s0OfEYHfMIuPfmp2DCJ2TDO5IkPrftaX74VbsLLh4WnknEkg1F0NI94nPSpssDhWcZaoMu8Ll3DwpE0O8W1EmXgvdZwRco/8rwEY+IkksY3VzJHAOGySvAroy6XiBk1rFDwxvpFUToU9ce2AQcB0Oi4Oha5Midn6hYGsrTRmWxdt4R0qQpHIERDwVR5GoJXWAA0i+5/3tu1b32oaXyg1Ge83Z+YeyB+JIhdxbfRqGdFd57+x4BoVNAQXmqGw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OKRiUIkexSloXOd++Y6kyvSK9RwARju3a3yo6XVHy1Brgva6f0fFgxH441NyQ14rWfFyfoGD07Bp9x6dw76rXKBr7aPboC0AiRIoisTJxenSIyaDclvYVmnjPJwdDOoOamou4hnKDjqzA46wEHg4mK9v/Hcjjlt52j5LMXraR88ZZFUlVDs0OzpsC9CCUDPKtKKRAB9SJM2SWp70P9YyWMCKqI2IDlXHp+6lNffTB2JPXIY83lbe2ESA2nOid/RAs/srBnytsemIgAgZxHo+LxGNHpe7JqE43qW+iZUIVrSLfDM21m5M52GRuxqwGGLQX7KUqQ/YqG2BowSMVgzFnA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jens Axboe <axboe@xxxxxxxxx>, Alasdair Kergon <agk@xxxxxxxxxx>, Mike Snitzer <snitzer@xxxxxxxxxx>, dm-devel@xxxxxxxxxx, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 08 Jun 2023 10:09:25 +0000
  • Ironport-data: A9a23:PNFkOasfGyImZBJ8qKAPs1rQ8OfnVBReMUV32f8akzHdYApBsoF/q tZmKTiDM6uCYGemLogiaYvjoR8FuZDVy9JgQQY6+yg1Fn8R+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg3HVQ+IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4rKq4Fv0gnRkPaoQ5AGGxyFMZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwIRkGSSivxO6K2rucZNFswcIxfdnuM9ZK0p1g5Wmx4fcOZ7nmGv+Pz/kImTA6i4ZJAOrUY NcfZXx3dhPcbhZTO1ARTpUjgOOvgXq5eDpdwL6XjfNvvy6Pk0osjf60boq9lt+iHK25mm6Co W3L5SLhCwwyP92D0zuVtHmrg4cjmAuiAdpNRebmr6YCbFu731A1EC0ZXEaB/uScgGTuaoJSe k8tw397xUQ13AnxJjXnZDW0rXuFlh8aRdtLEuc+5R2Ny6zb+AKQDC4PSTspQNU2vsg7bT8nz FmEm5XlBlRHubKWYWiQ+redsXW5Pi19BXQEZDMWQBEt4NT5pow3yBXVQb5LHKvwgtDrFDXY2 T2GrCEiwb4UiKYj0qyh+FndjjGEp57XTxU07AHaQmKk6AxiYIevIYev7DDz6fdGMZbcRF2Gt 3sshceT9qYNAIuLmSjLR/8CdJmt5vCYIHjfjERpEp0J6Tug4TigcJpW7TU4I11mWu4UdDmsb ELNtAd54J5IIGDsfaJxe5i2Cckh0e7nD9uNaxzPRt9HY5w0fgnX+ihrPBSUxzq0zhhqlrwjM 5CGd8rqFWwdFals0DuxQaEazKMvwSc9g2jUQPgX0iia7FZXX1bNIZ9tDbdERrlRAH+syOkNz +tiCg==
  • Ironport-hdrordr: A9a23:/dJHcqHbEErhENDQpLqEL8eALOsnbusQ8zAXP0AYc20yTiX4ra CTdZEgviMc5wxxZJhNo6HkBEDiewKkyXcW2/hoAV7KZmCP1wWVxelZnPDfKlbbaknDH4BmpM BdWpk7JefcSX5dpq/BjDVQFexL/PC3tJqFv6P16VBDbS9XUIlczyFfTjy2LyRNNWp7LKt8G5 qY6tBGtDa7EE57Uu2wGmMZWezOvP3n/aiWAyI7Ow==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, May 30, 2023 at 04:31:16PM -0400, Demi Marie Obenour wrote:
> Set "opened" to "0" before the hotplug script is called.  Once the
> device node has been opened, set "opened" to "1".
> 
> "opened" is used exclusively by userspace.  It serves two purposes:
> 
> 1. It tells userspace that the diskseq Xenstore entry is supported.
> 
> 2. It tells userspace that it can wait for "opened" to be set to 1.
>    Once "opened" is 1, blkback has a reference to the device, so
>    userspace doesn't need to keep one.
> 
> Together, these changes allow userspace to use block devices with
> delete-on-close behavior, such as loop devices with the autoclear flag
> set or device-mapper devices with the deferred-remove flag set.

Now that I think a bit more about this, how are you planning to handle
reboot with such devices?  It's fine for loop (because those get
instantiated by the block script), but likely not with other block
devices, as on reboot the toolstack will find the block device is
gone.

I guess the delete-on-close is only intended to be used for loop
devices? (or in general block devices that are instantiated by the
block script itself)

Thanks, Roger.



 


Rackspace

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