• Jakob Unterwurzacher's avatar
    fs: track most recent parent · a90e1f46
    Jakob Unterwurzacher authored
    Introduce the new struct inodeParents that wraps a map
    and one special slot for the most recent parent. Unit tests
    included.
    
    Because the map is lazily initialized, we should save some
    memory on the common single-parent case (= file with no hard links)
    compared to before.
    
    Benchmarking with gocryptfs shows no discernible change
    in performance. fsstress testing with gocryptfs shows no issues.
    
    TestStaleHardlinks the previous commit passes now.
    
    Change-Id: I8d69093abc906addde751a9e70dbd78a3a61371a
    a90e1f46
inode_parents.go 2.22 KB