On Wed, 06.10.10 14:17, Karel Zak (k...@redhat.com) wrote:

> > +static int mount_points_list_umount(MountPoint **mount_point_list_head) {
> > +        MountPoint *mp, *mp_next;
> > +        int failed = 0;
> > +
> > +        LIST_FOREACH_SAFE(mount_point, mp, mp_next, 
> > *mount_point_list_head) {
> 
>  you have to umount filesystems in reverse order, it means /foo/bar
>  before /foo, it's also possible that on the same mountpoint are
>  mounted two different filesystems.

The linked list is actually build in reverse order (because we prepend
to it, not append to it), hence Gustavo's patch should be fine
here. Also we call this all in a loop.

> 
> > +                if (streq(mp->path, "/"))
> > +                        continue;
> > +
> > +                /* Trying to umount. Forcing to umount if busy (only for 
> > NFS mounts) */
> > +                if (umount2(mp->path, MNT_FORCE) == 0)
> 
>  You have to execute things like /sbin/umount.<type> if you want to run your 
>  code on systems with NFS or cluster filesystems.

Can you elaborate on this? what does the umount.nfs tool do that matters
here? I can only see /bin/umount.udisks in my install here...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to