Here is a different approach to the problem of i_ino uniqueness. Again, I'll refer to my original email and patch for a description of the problem... With this patch, I'm taking the approach of only assigning out an i_ino value when it's actually needed. This adds a lazy_getattr function. If i_ino is 0, then this does an iunique and hashes the inode before doing the actual getattr. This patch is still a proof-of-concept. For a "real" patch, we'd need to: 1) add lazy functions for readdir and encode_fh (maybe also others) 2) clean up how root inode i_ino values are handled in superblocks 3) probably just have new_inode not have a counter, so that new inodes created by it always get i_ino=0 4) convert all callers of new_inode that don't have a scheme to ensure uniqueness This patch does hash inodes in the standard way, but the lazy approach could also be combined with the earlier patch I posted that uses IDR, or a different hashing scheme that keeps these out of the normal inode_hashtable. I figured I'd go with the approach of not adding more infrastructure than was necessary as a first stab. If this general approach seems alright, then could someone confirm whether using generic_delete_inode as the drop_inode function is OK, or whether I need to have pipefs actually handle the nlink counter correctly and use generic_drop_inode? Signed-off-by: Jeff Layton