I was thinking about how to respond to Andreas's offer: On Fri, Aug 10, 2012 at 05:14:12PM -0600, Andreas Dilger wrote: > We have a patch to fix the 2-level htree and 2GB directory size limits > already, in case that is of interest to anyone. where in theory, I'd be interested, but there have been enough other performance problems with really large directories that it was never been clear to me it would be a huge win, and given the many other changes queued up, I was hesitant. ... and then I started thinking about this while I was in the shower, and I think I've come up with a really good solution to the problem. What if we also integrated the proposed extension that you guys have designed for storing additional metadata in the directory, and then for files that do not have hard links, we keep a copy of all of the fs metadata required for stat(2) in the directory? This would speed up the readdir() + stat(2) workload, which has always been the major problem, in the common case where a file is linked to via only a single directory. If a file gets hard-linked, we will need to drop the copy in the directory and then make sure the fields in the inode table are up-to-date. But if we do this, I think it would be a huge improvement for ext4. What do folks think? - Ted P.S. We might need to add a special case hack for the SELINUX sid, and put it in the extended directory entry as well, since otherwise every single stat operation will need to go to the inode table just to read the SELINUX extended attribute. But I don't really care about that, since my personal answer to SELINUX has been "just say no". But I do know there are enough people using it that we probably do need to accomodate those poor folks.... -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html