From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: maintaining frontend state in libxl Date: Wed, 6 May 2015 13:23:45 +0200 Message-ID: <20150506112345.GA1578@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org While testing 'xl scsi-detach' I noticed that nothing removes the frontend directory from xenstore. In the example below /local/domain/8/device/vscsi/1/vscsi-devs/dev-2 becomes stale. Should xl actively remove also frontend related entries from xenstore, or is that all up to the frontend itself? Later I removed also the dev-3 related entry with 'scsi-detach', and reattached both devices. The result is that dev-2 and dev-3 are reused and the frontend worked just fine. So I think this is all just cosmetics. Also I think vscsi (and maybe pci) are the only ones affected, other types will most likely just wipe the entire device from xenstore because they handle just a single device. Olaf root@optiplex:~ # xenstore-ls -f |sort > 1 root@optiplex:~ # xl scsi-detach fv-13.1-pvscsi 2:0:0:2 root@optiplex:~ # xenstore-ls -f |sort > 2 root@optiplex:~ # diff -u 1 2 --- 1 2015-05-06 13:11:34.000000000 +0200 +++ 2 2015-05-06 13:11:46.000000000 +0200 @@ -138,11 +138,6 @@ /local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-1/p-devname = "/dev/shm/Fileio.2.1.link" /local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-1/state = "4" /local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-1/v-dev = "2:0:0:1" -/local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-2 = "" -/local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-2/p-dev = "naa.f3653dd5a6f244b9:2" -/local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-2/p-devname = "/dev/shm/Fileio.2.2.link" -/local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-2/state = "4" -/local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-2/v-dev = "2:0:0:2" /local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-3 = "" /local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-3/p-dev = "naa.f3653dd5a6f244b9:3" /local/domain/0/backend/vscsi/8/1/vscsi-devs/dev-3/p-devname = "/dev/shm/Fileio.2.3.link" @@ -306,7 +301,7 @@ /local/domain/8/device/vscsi/1/vscsi-devs/dev-1 = "" /local/domain/8/device/vscsi/1/vscsi-devs/dev-1/state = "4" /local/domain/8/device/vscsi/1/vscsi-devs/dev-2 = "" -/local/domain/8/device/vscsi/1/vscsi-devs/dev-2/state = "4" +/local/domain/8/device/vscsi/1/vscsi-devs/dev-2/state = "6" /local/domain/8/device/vscsi/1/vscsi-devs/dev-3 = "" /local/domain/8/device/vscsi/1/vscsi-devs/dev-3/state = "4" /local/domain/8/device/vscsi/2 = ""