Beispiel #1
0
void __liblustre_cleanup_(void)
{
#ifndef INIT_SYSIO
        /* guard against being called multiple times */
        static int cleaned = 0;

        if (cleaned)
                return;
        cleaned++;
#endif

        /* user app might chdir to a lustre directory, and leave busy pnode
         * during finaly libsysio cleanup. here we chdir back to "/".
         * but it can't fix the situation that liblustre is mounted
         * at "/".
         */
        if (!chdir("/")) {}
#if 0
        umount(lustre_path);
#endif
        /* we can't call umount here, because libsysio will not cleanup
         * opening files for us. _sysio_shutdown() will cleanup fds at
         * first but which will also close the sockets we need for umount
         * liblutre. this dilema lead to another hack in
         * libsysio/src/file_hack.c FIXME
         */
#ifdef INIT_SYSIO
        _sysio_shutdown();
        cleanup_lib_portals();
        LNetFini();
#endif
}
Beispiel #2
0
void
fini_lnet(void)
{
        int rc;

        rc = libcfs_deregister_ioctl(&lnet_ioctl_handler);
        LASSERT (rc == 0);

        LNetFini();
}