In message <[EMAIL PROTECTED]>,Rainer Toebbicke writes: >The fact that in Linux inodes are somehow grafted on dentries doesn't >make things easy of course - e.g. when it comes to running the cache
i wouldn't call it grafted. i see it was the functionality being split across two layers, the inode layer and dentry layer. inodes are just containers for the filesystem objects. dentries hold the name to container mappings. to use an inode though you need a dentry that points to it. an inode without a dentry is essentially inactive. >in put_inode (or after your patch in dentry_iput) you need to clean >up, i.e. call afs_InactiveVCache(). For that you need the global lock >- which you cannot always obtain e.g. if you hold it already. which tells me that the code is probably doing something wrong. >"less often" is not enough - you'd have to guarantee that you you >never run into it already holding the lock. Or somebody waiting for >"you" holding the lock which can happen in the kmalloc() chain - then >"you" that's "kswapd". I doubt that by moving the call from inode >cleanup to dentry cleanup avoids the scenario altogether. kmalloc() should be running under GFP_NOFS which should keep the the filesystem from deadlocking on AFS_GLOCK. however, for large allocations, we fall over to vmalloc() which doesnt have the same guarantee. typically vmalloc() only happens at init/startup time. this probably needs fixed eventually. i now believe its probably not wise to share a global lock (with the exception of the BKL) between the inode and the dentry layers. i also believe the dentry layer already protects itself against deadlocking with prune_dcache() already. _______________________________________________ OpenAFS-devel mailing list [email protected] https://lists.openafs.org/mailman/listinfo/openafs-devel
