Re: d_splice_alias() problem.

From: Greg Banks (gnb_at_melbourne.sgi.com)
Date: 05/13/04

  • Next message: clemens kurtenbach: "Re: cpufreq and p4 prescott"
    Date:	Thu, 13 May 2004 17:15:04 +1000
    To: Neil Brown <neilb@cse.unsw.edu.au>
    
    

    Neil Brown wrote:
    >
    > > Of course I now have an issue with the misleading name ;-)
    >
    > Maybe: DCACHE_NOT_KNOWN_TO_BE_CONNECTED.
    > Unfortunately the absence of the flags is stronger information that
    > it's presence and that makes it hard to name...

    ;-)

    > > What I'm wondering is, do we still need DCACHE_DISCONNECTED at all?
    > > Perhaps the uses of it could be replaced with combinations of checks
    > > of IS_ROOT() and (d == d->d_sb->s_root) ?
    >
    > It is still needed.
    > Suppose one thread creates a disconnected dentry, and then starts building
    > the path from the bottom up.
    > When it is half way up another request comes in for the same
    > filehandle. The same dentry is found. It is now not IS_ROOT, but
    > still DCACHE_DISCONNECTED. Until it is fully connected the second
    > request shouldn't proceed, and without the DCACHE_DISCONNECTED flag it
    > is expensive to test for connected-ness. !IS_ROOT certainly isn't
    > enough.

    Sure, IS_ROOT() only tells you whether a dentry is connected to its parent
    and to tell if its connected to the fs root you need to traverse all the
    parents. But nfsd_acceptable() already does this to do permission checks
    in the (default) subtree_check case.

    So it seems that what the flag gives you is that when its absent and
    nosubtree_check is in effect, you know you can short-circuit the connection
    walk. Fair enough.

    Greg.

    -- 
    Greg Banks, R&D Software Engineer, SGI Australian Software Group.
    I don't speak for SGI.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: clemens kurtenbach: "Re: cpufreq and p4 prescott"

    Relevant Pages

    • Re: d_splice_alias() problem.
      ... After reading your comments below the semantics of the flag ... Suppose one thread creates a disconnected dentry, ... When it is half way up another request comes in for the same ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Fix up befs compile.
      ... * flag is set. ... -static int ... befs_follow_link(struct dentry *dentry, struct nameidata *nd) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH 2.6.13-rc6-rt9] PI aware dynamic priority adjustment
      ... means that the MUTEX_IRQS_OFF flag and all related changes needs to be ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH 1/9] add defrag flags
      ... We may not be able to use the same flag after all due to our need to mark buffer ... > the code change: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] set membase in serial8250_request_port
      ... > doesn't restore membase, causing a read from a bad address. ... happens if we call request_port where we have set mapbase and pre- ... must obey the UPF_IOREMAP flag here. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)