On Tue, 2009-10-06 at 09:24 +0200, Jan Damborsky wrote: > Hi Alex, > > looking at the code changes, I am not sure if we could just replace > td_umount_and_delete_swap() with td_umount_all(). > The reason is that there might be swap device added by previous > call to td_mount_and_add_swap() which we want to release once > we are done there. > > Going through the code, I can see that as far as dealing with regular > filesystems is concerned, TD keeps track of 'mounting' operations > carried out in linked list 'umount_head' (see td_mountall.c). > > When cleaning up is to be done, td_umount_all() walks through the > list and unmounts only filesystems recorded in that list. > > The same mechanism exists for 'swap' - TD keeps track of added swap > devices in 'unswap_head' linked list. > > However, it seems that when 'swap' devices are to be released, > td_unswap_all() ignores that list and removes all swap devices > available. I think that instead it should walk through the 'unswap_head' > list and release only those swap devices which were recorded there. > > As far as testing procedures are concerned, these changes are in code > which takes care of discovery of existing Solaris instances installed > on UFS filesystem (e.g. Solaris 10). > Target Discovery goes through existing slices, mounts them and tries to > find Solaris instance on them. Please see following document for more > details: > > http://www.opensolaris.org/os/project/caiman/files/dwarf_td_design.pdf > > Based on this, I might recommend following testing procedure: > > [1] Install Solaris on UFS - e.g. you could install SXCE release > obtained from > http://www.opensolaris.org/os/downloads/ > > [2] Create at least one non-global zone > > [3] Boot LiveCD environment, create swap device on one of free slices > and run tdmgtst test driver - verify that > > * it finds and reports UFS Solaris instance > * things are cleaned up correctly after discovery, i.e. > - no new mountpoints appeared > - nothing disappeared (swap device) > > Thank you, > Jan > Thanks Jan, going to test this.. --
::alhazred