Re: Slight change of vnode<-->vm object relationship.

From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 01/12/05

  • Next message: Stephan Uphoff: "Re: Slight change of vnode<-->vm object relationship."
    To: Peter Edwards <peadar.edwards@gmail.com>
    Date: Wed, 12 Jan 2005 00:08:35 +0100
    
    

    In message <34cb7c84050111145415980aa2@mail.gmail.com>, Peter Edwards writes:

    >How about mmap() mappings after the close()? These can persist post
    >VOP_CLOSE, can't they?

    I belive they hold a reference to the vnode so that it is in fact
    not really closed after all, it just looks that way from userland.

    If that wasn't the case, then we would be leaking diskspace all
    over the place if people did:

            create file
            fill with data
            mmap
            unlink file
            close file

    -- 
    Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
    phk@FreeBSD.ORG         | TCP/IP since RFC 956
    FreeBSD committer       | BSD since 4.3-tahoe    
    Never attribute to malice what can adequately be explained by incompetence.
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Stephan Uphoff: "Re: Slight change of vnode<-->vm object relationship."

    Relevant Pages

    • Re: devctl (alike?) for devfs
      ... Typical holder of the reference is the devfs vnode. ... ls did trigger DESTROY notifications. ... I slightly don't like a fact that parent-child destroy notifications ...
      (freebsd-hackers)
    • Re: nullfs and named pipes.
      ... What happens when a vnode in the bottom layer has its on-disk reference count drop to zero -- is the vnode in the top layer invalidated somehow? ... Vnode reclamation from lower layer cannot do anithing for corresponding nullfs vnode, but that vnode has reference from nullfs vnode. ...
      (freebsd-hackers)
    • Re: recent changes in Giant usage -> panic
      ... > I installed the new kernel, rebooted, and got this panic while mtree was ... > running in installworld. ... Here we've completely released the vnode, ... Here we reference something hanging off it. ...
      (freebsd-current)
    • Re: nullfs and named pipes.
      ... I'm wondering is some reference counting needed there? ... What happens when a vnode in the bottom ... Vnode reclamation from lower layer cannot do anithing for corresponding nullfs ...
      (freebsd-hackers)
    • Re[2]: vn_fullpath() again
      ... You are correct about the Unix file system organization, but does it mean reliable vnode to fullname conversation is not possible? ... in kernel, you can have a reference to a vnode with no ... background fsck may pull inodes off disk ...
      (freebsd-hackers)