The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

VOP_INACTIVE (9)
  • >> VOP_INACTIVE (9) ( FreeBSD man: Ядро )

  • BSD mandoc
     

    NAME

    VOP_INACTIVE
    
     
    VOP_RECLAIM
    
     - reclaim file system resources for a vnode
    
     
    

    SYNOPSIS

       #include <sys/param.h>
       #include <sys/vnode.h>
    int VOP_INACTIVE (struct vnode *vp struct thread *td);
    int VOP_RECLAIM (struct vnode *vp struct thread *td);
     

    DESCRIPTION

    The arguments are:

    Fa vp
    The vnode being reclaimed.

    VOP_INACTIVE ();
    is called when the kernel is no longer using the vnode. This may be because the reference count reaches zero or it may be that the file system is being forcibly unmounted while there are open files. It can be used to reclaim space for `open but deleted' files.

    VOP_RECLAIM ();
    is called when a vnode is being reused for a different file system. Any file system specific resources associated with the vnode should be freed.  

    LOCKS

    For VOP_INACTIVE, the Fa vp will be locked on entry. Your VOP_INACTIVE code must unlock the Fa vp prior to returning.

    For VOP_RECLAIM, the Fa vp will not be locked on entry and should be left unlocked on return.  

    PSEUDOCODE

    int
    vop_inactive(struct vnode *vp, struct thread *td)
    {
        if (link count of vp == 0) {
            /*
             * Reclaim space in file system for vp.
             */
            ...;
        }
        VOP_UNLOCK(vp, 0, td);
    
        return 0;
    }
    
    int
    vop_reclaim(struct vnode *vp, struct thread *td)
    {
        /*
         * Clean out the name cache.
         */
        cache_purge(vp);
    
        /*
         * Free file system related data.
         */
        ...;
    
        return 0;
    }
    
     

    SEE ALSO

    vnode(9)  

    AUTHORS

    This manual page was written by An Doug Rabson .


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    LOCKS
    PSEUDOCODE
    SEE ALSO
    AUTHORS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру