It works, but I should delete if (guestfs_umount_all (destg) == -1) ??? exit (EXIT_FAILURE); inmain() function and /* Clean up. */ ? if (guestfs_umount_all (srcg) == -1) { ??? pthread_cancel (threaddata->mainthread); ??? exit (EXIT_FAILURE); ? } in the start_scrthread() function or it will return an error after the program finish: libguestfs: error: umount_all: umount: /sys/fs/cgroup/systemd: umount: /sys/fs/cgroup/systemd: device is busy. ??????? (In some cases useful info about processes that use ???????? the device is found by lsof(8) or fuser(1)) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20120330/69c9dcce/attachment.htm>
Richard W.M. Jones
2012-Mar-31 06:26 UTC
[Libguestfs] modifying open_guest function (copy_over.c)
On Fri, Mar 30, 2012 at 11:18:38PM -0700, THO HUYNH wrote:> It works, but I should delete > > if (guestfs_umount_all (destg) == -1) > ??? exit (EXIT_FAILURE);Yup, you don't want that in live code since it'll try to unmount all your disks (and fail, luckily). Rich.> inmain() function and > > /* Clean up. */ > ? if (guestfs_umount_all (srcg) == -1) { > ??? pthread_cancel (threaddata->mainthread); > ??? exit (EXIT_FAILURE); > ? } > > in the start_scrthread() function or it will return an error after the program finish: > > libguestfs: error: umount_all: umount: /sys/fs/cgroup/systemd: umount: /sys/fs/cgroup/systemd: device is busy. > ??????? (In some cases useful info about processes that use > ???????? the device is found by lsof(8) or fuser(1))> _______________________________________________ > Libguestfs mailing list > Libguestfs at redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Seemingly Similar Threads
- [PATCH 1/2] Close all file descriptors in the recovery process.
- [PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.
- [PATCH] Make Perl strings translatable
- [PATCH NOT TO BE APPLIED] builder: make-template: Add --encrypted
- [PATCH 0/2] Don't fail if 'type' (disk format) attribute is missing from libvirt XML (RHBZ#701814).