Re: Cleaning up vgone.

From: Ian Dowse (iedowse_at_maths.tcd.ie)
Date: 03/11/05

  • Next message: Poul-Henning Kamp: "Re: HEADSUP: linux dev_t emulation"
    To: Jeff Roberson <jroberson@chesapeake.net>
    Date: Fri, 11 Mar 2005 02:31:04 +0000
    
    

    In message <20050310061419.Y20708@mail.chesapeake.net>, Jeff Roberson writes:

    [Good info about shared lock filesystems and VI_DOOMED snipped]

    >I'd much rather get rid of DOINGINACT and simply vhold the vnode so it
    >doesn't have a 0 ref count. It seems more natural to me to use a
    >reference than special case another flag. I like the idea of the patch
    >below, but it conflicts with the patch I just posted as I removed the
    >DOINGINACT check from VSHOULDFREE.

    Yes, I'm all for a cleaner way of doing this too. Many of the reasons
    for DOINGINACT will become unnecessary with your changes anyway,
    such as the code in nfs_inactive() that used to have to worry about
    the vnode going away while it did the sillyrename I/O.

    The only advantage I can think of for using a special flag instead
    of holding a reference in vgone() is the following: if code called
    by vgone() has a bug and drops one too many references, then the
    negative reference count will be caught sooner. It's worth at least
    making sure that we get a clean panic in this case since recursion
    caused by the reference count hitting zero twice can lead to messy
    panics that are difficult to debug.

    Ian
    _______________________________________________
    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: Poul-Henning Kamp: "Re: HEADSUP: linux dev_t emulation"

    Relevant Pages